-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Map.flyTo() allows zooming past maxZoom #4724
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report. The
flyTo()
functionality doesn't perform a sanity check on the requested zoom, so that a user can zoom past the map'smaxZoom
.The final zoom level is the map's
maxZoom
, but the map center jumps to an arbitrary location.Minimal reproducible case:
I've put that code in a jsbin over here. That jsbin uses v0.37.0.
Expected behaviour: final state of the map's camera would be zoom = map's maxzoom, center ≃ [10.39, 63.43].
Actual behaviour: final state of the map's camera would be zoom = map's maxzoom, center ≃ [89.25, 38.99] (more than 10000km away from expected center).
The text was updated successfully, but these errors were encountered: