Skip to content

feat: add pitch gestures - #2282

Open
greensopinion wants to merge 1 commit into
pitch-1-camerafrom
pitch-2-gestures
Open

greensopinion wants to merge 1 commit into
pitch-1-camerafrom
pitch-2-gestures

Conversation

@greensopinion

@greensopinion greensopinion commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

A map whose maxPitch is above 0 can now be pitched by the user: with a
two-finger vertical drag on a touch screen, and with Ctrl-drag on a
desktop, which then rotates with horizontal movement and pitches with
vertical movement, as in MapLibre GL JS. While pitch gestures are
enabled, a two-finger gesture doesn't zoom, rotate or move the map until
the map has decided whether it is a pitch gesture, so that a pitch drag
doesn't also move the map. Maps that keep maxPitch at 0 behave as before.

Depends on #2283.

I wrote this with Claude Code (Claude Opus 5.5). I directed the design,
reviewed the code, and tested it on a Mac, an iPhone 13, an iPhone 15 Pro
Max, a Pixel 4a (5G), and in Chrome.

A map whose maxPitch is above 0 can now be pitched by the user: with a
two-finger vertical drag on a touch screen, and with Ctrl-drag on a
desktop, which then rotates with horizontal movement and pitches with
vertical movement, as in MapLibre GL JS. While pitch gestures are
enabled, a two-finger gesture doesn't zoom, rotate or move the map until
the map has decided whether it is a pitch gesture, so that a pitch drag
doesn't also move the map. Maps that keep maxPitch at 0 behave as before.
@greensopinion

Copy link
Copy Markdown
Collaborator Author

force-pushed to rebase over #2283

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant