AddInteraction API supported types
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**:
### Question
Which interaction types are supported in the new Interactions API? I just can find statements like:
> To use the API, you define interaction handlers for events like 'click' or 'mouseenter'
But which types are realy supported?
```
map.addInteraction('my-polygon-click-interaction', {
type: 'click',
target: 'polygons',
handler: (e) => {
map.setFeatureState(e.feature, {highlight: true});
}
});
```
### Links to related documentation
https://docs.mapbox.com/mapbox-gl-js/guides/user-interactions/interactions/
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 User Interactions guide and trace the AddInteraction API's supported type values from the documented API surface. Update the guide so it explicitly lists the supported interaction types and confirms the example. Done means a reader can find the complete list without opening an issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100