Easier way to disable all rotation and pitch
@karimnaaji is already working on this.
Since Jul 9, 2021.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Sadly, most of the maps that I work on have no need for any 3D features or orientations other than north-up. But by default all these navigation features are enabled, which means eventually some poor user accidentally holds down control and gets very confused. Then I fumble through finding how to disable them all:
```
var map = new mapboxgl.Map({
...
pitchWithRotate: false,
dragRotate: false,
touchZoomRotate: false
).addControl(new mapboxgl.NavigationControl({ showCompass: false }), 'top-left');
```
Just a suggestion to consider making this easier, like maybe an option such as "fixedViewport: true" that would imply the others. Or just a note in the documentation explaining the above.
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.
Assessment
This issue has not been assessed yet.