Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinch-to-zoom gesture should pan the map when both fingers move #8345

Open
mourner opened this issue Jun 12, 2019 · 2 comments
Open

Pinch-to-zoom gesture should pan the map when both fingers move #8345

mourner opened this issue Jun 12, 2019 · 2 comments

Comments

@mourner
Copy link
Member

mourner commented Jun 12, 2019

mapbox-gl-js version: v1.0.0
browser: iOS Safari / Android Chrome / Edge on Mobile

Capturing #8100 (comment) by @1ec5:

does GL JS currently address the case of a two-finger pinch-to-zoom gesture where the averaged point between the fingers moves (a “wandering zoom”)? On a touchscreen, it’s quite difficult to keep that centerpoint stationary as you pinch your fingers or spread them apart. To maintain a responsive feel, it’s necessary to pan at the same time as zooming (though perhaps some use cases may call for a more precise gesture handler that locks the center while zooming).

Steps to Trigger Behavior

  1. Start zooming the map on a touch device
  2. Still touching the map with two fingers, try panning the map

Expected Behavior

The map moves so that the location between fingers persist through the whole gesture. For comparison, Leaflet and various other maps APIs do this.

Actual Behavior

The map doesn't move.

Link to Demonstration

https://docs.mapbox.com/mapbox-gl-js/example/simple-map/

@Ali-Shah-Vis
Copy link

Hi Vlad :)

Do you know how I can get the map to move with a single finger?

Thanks,
Alistrandarious

@rreusser
Copy link
Contributor

rreusser commented May 7, 2021

I see a slight variation of this issue, noted here: #10657

In particular, I observe that it does pan, but that it pans at a speed which does not reflect zoom that has occurred during the gesture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants