-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong zoom level when setMaxBounds #10209
Comments
also #6969 |
In short the current implementation say ensure that no part of the map shows something outside of the maxBounds, hence to ensure that remains regardless of your bounds aspect ratio and viewport aspect ratio, you won't usually be able to fitBounds to the maxBounds and have all the maxBounds showing (unless their aspect ratio match). For many use cases, this is not very useful because you still want to let users zoom out to see a whole country in the one view (for example), but not pan outside that country. The current implementation doesn't allow this. |
Yes, thanks for summarizing this well @andrewharvey — let's keep the discussion centralized in #6969. |
"mapbox-gl": "^1.12.0",
when using setMaxBounds

When using fitBounds
There is a bug or wrong implementation ?
The text was updated successfully, but these errors were encountered: