map.flyTo({ center: someCenter, padding: somePadding }) ignores padding
mapbox-gl-js version: v3.2.0 (works in v3.1.0)
browser: Mozilla Firefox v124.0.2 (also tested it in Chrome v124.0.6367.61, doesn't work either)
Steps to Trigger Behavior
- Create map
- map.flyTo({ center: someCenter, padding: somePadding });
- profit ????
Link to Demonstration
https://jsbin.com/nefawexopu/edit?html,console,output Apparently, there is an error sometimes. The behaviour I experience on browser is this one. The red line is the center, the Golden Gate Bridge should be off center by 1000px.
Expected Behavior
I expected there to be padding. This pull request explains the expected behaviour.
Actual Behavior
There was no padding.
In all versions before v3.2.0 (since v1.9.0) I tested, there is padding, an offset to the center so that maps partly hidden behind some content for example don't also hide the important content of the map.
Im also getting this bug with the new version, any updates on this?
I just downgraded to v3.1.2 for the time being.
Thanks for the reports, everyone, investigating... Related to our attempt to fix #11831.
Hey everyone! This will be fixed in the upcoming GL JS v3.4.0
Hey all! Please update the latest GL JS v3.4.0. I'll close this issue, but feel free to reopen if there are any questions.