visgl / visgl/react-map-gl

[Feat] Expose props mapping to `disableRotation()` on the touch-zoom-rotate handler

Open
#2,284 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
8.5k
Forks
1.4k
Avg merge
5d 17h
Merged PRs (30d)
3

Description

Target Use Case

Currently it's not possible to enable touch zoom but disable touch rotate.

The touch zoom+rotate handlers for both Maplibre and Mapbox expose a disableRotation() method, so that sort of granularity is allowed by the base libraries.

Proposal

There are different ways the API could look, but an example (that I believe was the case with older versions of this library) is: expose an additional touchRotate prop that, if false, will cause calling disableRotation() on the touch-zoom-rotate handler.

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 by tracing the touch-zoom-rotate handler integration and the existing touch-related props, then inspect how the Maplibre and Mapbox handlers expose disableRotation(). Confirm the API shape before changing it; done means touch zoom remains enabled while touch rotation can be disabled, with coverage for both supported map handlers.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.