Expose event for camera change
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Our libraries [react-map-gl](https://github.com/uber/react-map-gl) and [deck.gl](https://github.com/uber/deck.gl) both use Mapbox GL as a controlled React component. All viewport states are synced with a data store. Currently there is no event that is:
- reliably fired for every camera change as a result of user interaction or flyTo()
- fired *before* update (a controlled component does not rerender until props change)
As a result, we have been implementing our own mouse/touch interaction in order to use Mapbox in a React/Redux paradigm. It would be nice if there is an event that we can subscribe to to dispatch requests for camera change.
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 reviewing the camera-change handling in mapbox-gl-js and the existing user-interaction and flyTo() event paths. Define an event that fires before controlled-component updates and covers both interaction and flyTo() changes. Done means React/Redux consumers can subscribe and dispatch camera-change requests without custom mouse/touch handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100