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

cooperativeGestures mapOption doesn't work #1640

Closed
pequeurb opened this issue Dec 17, 2021 · 4 comments
Closed

cooperativeGestures mapOption doesn't work #1640

pequeurb opened this issue Dec 17, 2021 · 4 comments
Labels

Comments

@pequeurb
Copy link

Description

I found this on the mapbox website that would solve a UX issue that I'm having:
https://docs.mapbox.com/mapbox-gl-js/example/cooperative-gestures/

This would allow me to make it so that users can scroll on the map without zooming out, and for touch devices have panning only work with two fingers instead of one.

But nothing happens when I try to add it in the mapOptions (using react-map-gl version 6.1.18).
I created an example in a codesandbox here:
https://codesandbox.io/s/react-map-gl-cooperativegestures-sxw8b

Am I doing something wrong or is this a bug? (may be the same problem as issue #1353)

@pequeurb pequeurb added the bug label Dec 17, 2021
@TatoBig
Copy link

TatoBig commented Dec 18, 2021

I'm having the same problem, It could be a bug

@Pessimistress
Copy link
Collaborator

react-map-gl does not use mapbox-gl's native controller. This option is currently not supported.

@Pessimistress
Copy link
Collaborator

This feature is not going to be supported by v6. You can try the v7 beta following the linked issue.

@chriszrc
Copy link

chriszrc commented May 9, 2022

It's probably worth noting here, since this is what shows up in searches, that support for this was added in v7, and the original codesandbox has even been updated and shows it working:

https://codesandbox.io/s/react-map-gl-cooperativegestures-sxw8b?file=/src/index.js:696-715

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

No branches or pull requests

4 participants