-
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
Markers moves to incorrect positions when using a "globe" projection with a non-integer zoom level #12592
Comments
Hi @benoitv-code, Thanks for reporting this issue. It seems that this issue appears on the Globe to Mercator transition zoom levels. |
I have a similar issue, possibly related: while on edit: my layers disappear after the zoom level is >=6 My ugly workaround right now: <MapGL
projection={zoom < 6 ? "globe": "mercator"} //TODO: fix me
initialViewState={mapSettings.defaults}
...
/> |
any plans for the fix @benoitv-code ? |
@tonnoz I did the same as you, switching to mercator as the trade-off is acceptable for me. Will switch back to default ("globe") if it gets fixed on mapbox-gl side. |
it seems like a proper bug, would love some clarification from the team |
Hello, I have a similar problem, but my markers are directly offseted on Y and don't seem to be anchored to the map, but rather to the camera, as when I zoom in and out they move. I put it here in case this issue hasn't been solved. Switching projection to mercator does not fix it, or any projection for that matter. Location coordinates are the same for the markers and the popups. bueno3.mp4The code I have:
` |
Markers are moving out-of-position when dragging the map when using a "globe" projection with a non-integer zoom level (either set programmatically or when a user is zooming in / zooming out)
mapbox-gl-js version: 2.13.0
browser: Chrome 110.0.5481.178
Steps to Trigger Behavior
mapbox://styles/mapbox/streets-v12
(or theglobe
projection mode) with azoom: 5.5
[-0.481707, 48.916776]
)Link to Demonstration
Simple repro: https://codepen.io/benoit42/pen/yLxVMMo
Expected Behavior
Marker stays at a correct position when dragging the map
Actual Behavior
Marker moves to incorrect positions when dragging the map from left to right:
Workaround
Not great, but setting the projection mode to
mercator
fixes the issue:The text was updated successfully, but these errors were encountered: