Why GeoJSON data is not visible on duplicate maps when scrolling horizontally?

24 views Asked by At

If we look into the Interactive Choropleth Map example (https://leafletjs.com/examples/choropleth/), if we zoom out, we can observe that GeoJSON data are not displayed on duplicate maps. The United States appears several times but GeoJSON data only appears once. The OpenStreetMap tile is used.

Do you know what is the origin of this behavior/problem ? How can we solve it ? Is it linked to leaflet itself or to the tile ?

I have seen on two websites that use two different tiles (https://www.coordonnees-gps.fr/carte/pays/US - tile: Apple Maps / https://france-geojson.gregoiredavid.fr/ - tile: Map Box), GeoJSON data are displayed on duplicate maps. If you zoom out and scroll horizontally, you can see it.

This behavior bothers me because in the React App that I am working on, I can't zoom on the "Oceania" region because its boundaries are located both at the start and at the end of the map and there is no GeoJSON data on the duplicated maps. I am using react leaflet but I am facing the same problem.

I tried to use tiles from cartocdn but I observed the same behavior. GeoJSON data are not duplicated.

Expectations: Having the GeoJSON data displayed on each replica of the map and not just on one map.

0

There are 0 answers