Make "queryRenderedFeatures" respect "icon-translate"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
(Moving from [stackexchange](http://stackoverflow.com/questions/37581950/mapboxgl-when-using-icon-translate-queryrenderedfeatures-result-unaffected), because it's seeming more like a bug.)
When “icon-translate” is set for an icon feature, queryRenderedFeatures returns the icon feature only when querying the original location.
Example: open console to see you get query results below marker.
http://jsfiddle.net/k5y3n1yf/16/
[updated for clarity: http://jsfiddle.net/k5y3n1yf/19/ ]
(My workaround for now is to translate the query point for specific layers with translated icons, but this seems hackish.)
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 at the queryRenderedFeatures entry point and reproduce the behavior with the updated jsfiddle example, focusing on an icon using icon-translate. Trace how the query location is compared with rendered icon placement; done means querying the translated icon location returns the icon feature rather than only the original location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100