Leaflet config not working (worldCopyJump)

  • Hi, we are creating our system, incorporating your Windy API, Leaflet, and our internal position info.
    We are having difficulties only during Windy mode (when windy API info is displayed)
    It seems that the Zoom/Bounds options are working correctly, but the worldCopyJump is not working correctly,
    and causing the icons to jump to the other side of the map.

    Please advise us if there is a way to incorporate the worldCopyJump properly.

    Image 1: target code/option

    Image 2: Leaflet situation (when the center crosses the international day line, icons still appear)

    Image 3: Windy situation (when the center crosses the international day line, icons disappear)

  • sorry, seems the other 2 GIF images are too big.
    I have sent the files to Simona Poláčková for reference.

  • Administrator

    @BSS_LH We use worldCopyJump: true at Windy website. Are you sure this property is not overwritten by our setting?

  • @marekd
    We want to use "worldCopyJump: false" in our system, but it seems that it is being overwritten to "true" somehow.
    We were confirming the API specifications and other user manuals of Windy, and it has not stated about the "worldCopyJump" or any other features which are being restricted through API.

    Thus, we want to confirm why this is happening.

  • Administrator

    @BSS_LH According to this Stackoverflow question (https://stackoverflow.com/questions/51947327/how-to-change-worldcopyjump-value-dynamically-in-leaflet) you can change the value dynamically. Just put it into windyInit function:

    windyInit(options, ({ map }) => {
        delete map.dragging._draggable;
        map.options.worldCopyJump = false;
        // your current code

    It is kind of hack, but at this moment probably the only option.

  • Dear @marekd

    We have tested and seems the hack you have shared us, has worked as expected.
    Thank you for your support!

Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps
Terms and Conditions     Privacy Policy