-
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
Calling map.easeTo() after map.fitBounds() with a padding does not preserve the padding #9643
Comments
Hi @waissbluth , I agree that this is confusing, but FWIW its actually intended behaviour and a sideffect of introducing two different concepts with the same name. Theres a lot more context in In your case the first call to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
As I was trying to work around issue #9641 by using
map.easeTo()
instead ofmap.fitBounds()
, I encountered that easeTo applies an additional padding if fitBounds was already called with a padding from the same side. I was expecting easeTo to respect the original padding that was passed to fitBounds, but that does not seem to be the case.mapbox-gl-js version: v.10.0
browser: Chome for Mac 81.0.4044.113
Steps to Trigger Behavior
map.fitBounds(bbox, {padding: {top: 100})
map.easeTo({padding: {top: 100, left: 100})
Link to Demonstration
https://jsfiddle.net/xqc2br59/
Expected Behavior
To have the bounding box be centered on the screen with 100px at the top.
Actual Behavior
The bounding box has a 200px padding at the top.
The text was updated successfully, but these errors were encountered: