-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
When using the Mapbox terrain layer, zooming in closely causes markers to behave inconsistently — they flicker or jump back and forth instead of staying stable.
This is a screenshots:
And this is the code:
<Map key={mapBoxStyle} ref={mapRefCallback} mapboxAccessToken={mapBoxAccessToken} initialViewState={viewport} mapStyle={mapBoxStyle} onMouseMove={onMouseMove} onMove={evt => setViewport(evt.viewState)} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} projection='globe' onClick={onClick} onContextMenu={onContextMenu} interactiveLayerIds={['docks', 'drones']} terrain={{ source: 'mapbox-raster-dem', exaggeration: 1, }} // maxZoom={19} > <Source id='mapbox-raster-dem' type='raster-dem' url='mapbox://mapbox.mapbox-terrain-dem-v1' tileSize={512} maxzoom={20} /> </Map>
Expected Behavior
Markers should remain stable and fixed in place when zooming.
Steps to Reproduce
- Enable the terrain layer.
- Zoom in deeply on the map.
- Observe the marker positions.
Environment
- Framework version: "react-map-gl": "^8.0.1",
- Map library: Mapbox (mapbox-gl)- "^3.9.4",
- Browser: Chrome and Firefox.
- OS: Mac and Linux.
Logs
No response