Skip to content
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({ center: someCenter, padding: somePadding }) ignores padding #13152

Open
leap95 opened this issue Apr 17, 2024 · 4 comments
Open

map.flyTo({ center: someCenter, padding: somePadding }) ignores padding #13152

leap95 opened this issue Apr 17, 2024 · 4 comments

Comments

@leap95
Copy link

leap95 commented Apr 17, 2024

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

  1. Create map
  2. map.flyTo({ center: someCenter, padding: somePadding });
  3. 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.

@ricardoweiss
Copy link

Im also getting this bug with the new version, any updates on this?

@leap95
Copy link
Author

leap95 commented Apr 22, 2024

I just downgraded to v3.1.2 for the time being.

@mourner
Copy link
Member

mourner commented Apr 23, 2024

Thanks for the reports, everyone, investigating... Related to our attempt to fix #11831.

@stepankuzmin
Copy link
Contributor

Hey everyone! This will be fixed in the upcoming GL JS v3.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants