This is my folium code:
import folium
mp = folium.Map(location=[37, -102],
zoom_start=1,
tiles="Stamen Terrain",
)
display(mp)
There are two problems with leaflet map:
- The continents are displayed 2 times or more in a loop.
- The map can be panned endlessly from left to right or vice-versa, in a loop.
Both of these are nuisance. The first issue can be addressed temporarily by setting the zoom_start
to something else than 1. But even then, zooming out of the map bring this issue back again. The less said about the second one the better.
Now what I want is to limit the boundary of my map to, say, [-150, 150, -70, 70] or smaller. And I don't want to display beyond this bound, either by panning or zooming. Neither do I want my map to pan infinitely in a loop.
Is it possible to do that in Folium?