Leaflet / Leaflet.VectorGrid

Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
593 stars 192 forks source link

Prevent VectorGrid from looping around the globe #222

Open arthurgailes opened 4 years ago

arthurgailes commented 4 years ago

Hello,

I've found that the polygons draw in repeat around the globe when adding the vectorgrid to the map (doesn't happen in L.geoJson). This causes some interaction problems where mouseover effects will render on the repeat of the globe rather than the globe itself

Thanks for all of your hard work on this wonderful plugin.

In L.geoJson: image

In VectorGrid: image

Mouseover clear split on repeat: image

VicAv99 commented 4 years ago

Are there any updates to this issue?

am2222 commented 4 years ago

I have also noticed that sometimes tiles are only loaded in one of the globes and when I zoom on on side of the globe it does not show anything. so I have to move to the other side of globe to see it

am2222 commented 4 years ago

I guess setting nowrap:true in layer option fixes this issue

arthurgailes commented 4 years ago

@am2222 Have you tried it? And if so, would you mind giving a quick pseudo code example? Thanks!

filip84 commented 3 years ago

I'm having the same issue, nowrap does not seem to effect the vectorGrid, only the base layers.