map.addInteraction not handle while feature id is a real string
Open
Nobody has claimed this yet.
auto-triaged
bug :lady_beetle:
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
mapbox-gl-js version
v3.16.0-beta.2
Browser and version
all
Expected behavior
Features Id with string should be handle by interaction ("click")
Actual behavior
Features Id with strings not handled, with string number works.
Link to the demonstration
https://jsbin.com/vajabic/edit?html,console,output
Steps to trigger the unexpected behavior
click on each elephants, one with "12" id works and log info on console, the other "12a" does not.
Relevant log output
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 issue with the linked JSBin and inspect the map.addInteraction handling for feature IDs. Compare clicks on the numeric-string ID "12" and the nonnumeric string ID "12a". Done means interactions handle both string IDs consistently and the relevant behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100