Vector layers don't wrap every 360 longitude degrees #5179

Open
jblarsen opened this Issue Dec 9, 2016 · 2 comments

Projects

None yet

2 participants

@jblarsen
jblarsen commented Dec 9, 2016 edited
  • I'm reporting a bug, not asking for help
  • I've looked at the documentation to make sure the behaviour is documented and expected
  • I'm sure this is a Leaflet code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
  • I've searched through the issues to make sure it's not yet reported

How to reproduce

What behaviour I'm expecting and which behaviour I'm seeing

The GeoJSON features are only shown in the "middle" USA. They are not shown on the "left" or "right" USA. I would expect them to be present in all of them. Just like the tile layers are present in all of them.

We are using GeoJSON to show some safety information. And we do not want it to "disappear" if the user is zooming in on the place of interest but 360 degrees shifted. Since we present global stuff it is also inconvenient for the user if we add bounds to the map.

Minimal example reproducing the issue

  • this example is as simple as possible
  • this example does not rely on any third party code

Please see the above link to the leafletjs.com web page. I can produce a minimal example if you agree on the behaviour I expect (described above).

Best regards,
Jesper

@IvanSanchez IvanSanchez changed the title from GeoJSON layers not shown at longitude+360 degrees to Vector layers don't wrap every 360 longitude degrees Dec 9, 2016
@IvanSanchez IvanSanchez added this to the future milestone Dec 9, 2016
@IvanSanchez
Member

I'm unsure of this as a core feature right now.

In the meantime you're welcome to try out https://github.com/Leaflet/Leaflet.VectorGrid , specifically with sliced GeoJSON as shown in https://leaflet.github.io/Leaflet.VectorGrid/dist/demo/demo-geojson.html

@jblarsen
jblarsen commented Dec 9, 2016

Thanks Ivan. We will try your plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment