-
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
Add bounds parameter to flyTo() #4894
Comments
Hi @gagecarto, thanks for using Mapbox. You can use |
Thanks @mollymerp - I am looking to add bounds to a flyTo() event so that the animation is seamless with pitch, bearing and bounds. |
you can pass |
looks like pitch works in fitBounds but not bearing. trying like below
or am i doing it wrong @mollymerp ? |
Oh yes you're right. We overwrite |
Oh heck.. Any way to overwrite that options.bearing=0 when calling fitBounds() @mollymerp |
@gagecarto I wonder if you could possible use https://github.com/mapbox/geo-viewport to get the center, zoom from your bounds and then use |
@andrewharvey That was looking promising until the |
Motivation
When using flyTo() it would be useful to be able to include bounds rather than just center and zoom.
There are many instances when exact map bounds are important, especially when the bearing and pitch is also being adjusted.
Mock-Up
The text was updated successfully, but these errors were encountered: