symbol-sort-key doesnt influence feature order of queryRenderedFeatures
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
If symbol-sort-key is used the markers are visuell sorted by a property. But by click on the higher marker the lower will be first in the list of queryRenderedFeatures.
**mapbox-gl-js version**: 2.3.1
**browser**: Chrome
### Steps to Trigger Behavior
1. open example
2. zoom out until markers overlaps each others
3. click on a marker
### Link to Demonstration
https://jsfiddle.net/7t02vbhc/63/
### Expected Behavior
console should output A
### Actual Behavior
console output B
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 with the linked JSFiddle and trace the queryRenderedFeatures result ordering for overlapping markers using symbol-sort-key in mapbox-gl-js 2.3.1. Reproduce the Chrome behavior by zooming out and clicking a marker; done means the console reports A, with the higher visually sorted marker first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100