mapbox / mapbox/mapbox-gl-js

AddInteraction API supported types

Open
#13,558 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged docs :scroll:
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.