Hello,
As I was trying to work around issue #9641 by using map.easeTo() instead of map.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
- call
map.fitBounds(bbox, {padding: {top: 100})
- call
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.