mapbox / mapbox/mapbox-gl-js

How to enable touch rotation only but touch zoom?

Open
#7,738 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api :memo: feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**:
v0.50.0

### Question
There's `TouchZoomRotateHandler` for handling touch zooming and touch rotating. But the instance members are a bit poor for handling zoom and rotate separately. This allows touch-zoom with disabling rotation but the other case. What if touch-zoom should be disabled and touch rotation should be enabled, it's not possible with current instance members. Is there some work around for this functionality?

p.s. TouchZoomRotateHandler should be two as TouchZoomHandler and TouchRotateHandler at the end?

### Links to related documentation
https://www.mapbox.com/mapbox-gl-js/api/#touchzoomrotatehandler

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 TouchZoomRotateHandler API documentation linked in the issue and trace how its touch-zoom and touch-rotation controls are exposed. Determine whether the requested independent behavior needs documentation or an API design change; done means touch rotation can remain enabled while touch zoom is disabled, with the behavior documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.