You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this an old issue, but I found that there are minZoom and maxZoom props, maybe you can use them to get the behavior you want? I'm using it like this to prevent the map from zooming in too much when the bounds are empty:
Yea the minZoom and maxZoom are very handy, but it would also be nice to have a restriction bound as described in Restricting Map Bounds
Would be really awesome if it would work with something like this:
Is there any way I can restrict the map to a boundary with latLngBounds?
I tried to add the same example shown here but it seems it is still not implemented yet😞
Activity
Ninjaman494 commentedon Apr 28, 2020
I know this an old issue, but I found that there are
minZoomandmaxZoomprops, maybe you can use them to get the behavior you want? I'm using it like this to prevent the map from zooming in too much when the bounds are empty:martinlundin commentedon May 16, 2020
Yea the
minZoomandmaxZoomare very handy, but it would also be nice to have a restriction bound as described in Restricting Map BoundsWould be really awesome if it would work with something like this:
I tried it but unfortunately it doesn't seems to be implemented.
stefan-francis commentedon May 6, 2021
Is there any way I can restrict the map to a boundary with
latLngBounds?I tried to add the same example shown here but it seems it is still not implemented yet😞