0

In reference to an earlier question I would like to know: Using leaflet, is it possible to draw markers in multiple adjacent worlds(leaflet's continuousWorld) WITHOUT adjusting their longitudes?

Please understand, I don't want to use leaflet's worldcopyjump as it does not show markers in multiple worlds simultaneously.

A workaround is to change longitudes by 360 degrees (-900 to -540, -540 to -180 etc. to one side and 180 to 540, 540 to 900 etc. to the other side) while maintaining latitudes.

Apparently, leaflet does not offer automated marker repeat due to "performance concerns" (Quote from 2013). Yet, Google Maps offer this.

With a practical view to resolve this problem, I see two solutions and I'd appreciate comments on this:

  1. Use Google visualization instead
  2. Copy my list of nodes a few times each direction and adjust their longitudes (this is assuming the conventional consumer would not keep drag-droping the world ca. two-three times around)

Many thanks in advance, Naibaf

Community
  • 1
  • 1
Naibaf
  • 417
  • 5
  • 15
  • Just a note regarding your solution 2: combined with `wordcopyjump`, you would just need a few adjacent copies (enough to fill your map at minimum zoom) and your user should never have an empty map whatever the extent of panning. – ghybs May 30 '16 at 15:38
  • Thanks, but why use worldcopyjump at all in what you propose? If my understanding is correct, worldcopyjumps replicates the layer of 180 to -180 across -540 to -180 and so forth WHILST removing the layer from 180 to -180 or the previously present range when crossing its range threshold. That's exactly what I'm trying to avoid. – Naibaf May 30 '16 at 15:46
  • 1
    It seems to me that this option does not replicate anything, but changes the view back to [-180; 180] without the user noticing it. Give it a try. – ghybs May 30 '16 at 16:58

0 Answers0