mapbox / mapbox/mapbox-gl-leaflet
Leaflet markers move around on pan, depending on Zoom
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 546
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
When creating a mapgox-gl-leaflet map and adding Leaflet markers to it, these markers are not stable.
Markers move around (all at once) as the map is panned, so they are no longer where they are supposed to be.
To reproduce, simply check out this code pen.
It's a simple copy-paste of the Basic example from this project, with versions updated to mapbox-gl v2.5.1 and leaflet 1.7.1, and an added 2nd Leaflet marker.
You can see that markers move around as the map is panned (also recorded in this video).
In other experiments I made (but unfortunately I didn't capture these), this would happen only at some zoom levels. So if I start at zoom level 5 everything is cool, then I zoom out and it breaks, I zoom out some more and it's ok, I zoom out some more and it breaks again.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked CodePen reproduction based on the project's Basic example with Mapbox GL v2.5.1 and Leaflet 1.7.1. Inspect marker positioning while panning and across the reported zoom levels; the issue is done when all Leaflet markers remain at their intended locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100