Marker's pixel position is incorrect when map container's width very large.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**:
mapbox 2.9.1
**browser**:
Chrome 103.0.5060.66
FireFox 102.0
### Steps to Trigger Behavior
1. open the demonstration and move scroller to center
2. find the marker
3. move or zoom map
### Link to Demonstration
https://jsfiddle.net/domore/1Lpza0c5/2/
### Expected Behavior
marker can stay it's coordinate correctly (offset was increased by the width of container)
### Actual Behavior
marker looks like drift
https://user-images.githubusercontent.com/29765615/179920486-7bcb9450-14c2-4c7a-888c-f8f5f7034862.mp4
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 reproducing the marker drift in the linked JSFiddle with a very wide map container, then trace the marker positioning behavior in the mapbox-gl-js source. Verify the fix by moving and zooming the map and confirming that the marker remains at its coordinate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100