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
- Use
mapbox://styles/mapbox/streets-v12 (or the globe projection mode) with a zoom: 5.5
- Set a marker somewhere (like on
[-0.481707, 48.916776])
- Move the map far to the left and the right, and see the marker moving in wrong positions
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:
let map = new mapboxgl.Map({
/* ... */
projection: { name: "mercator" },
});