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

Android incorrectly propagating touch / gesture event #208

Closed
reactor81 opened this issue Dec 23, 2015 · 5 comments
Closed

Android incorrectly propagating touch / gesture event #208

reactor81 opened this issue Dec 23, 2015 · 5 comments

Comments

@reactor81
Copy link

iOS correctly stops propagation of the touch / pan event when scroll the map. So, when I have the MapBox in a scrollable tab view (e.g. horizontal scroll view), the scroll view does not pan. This is good because I just want to pan the map.

However, Android is not stopping the propagation. The scrollview is also scrolling, moving the entire mapbox out of view.

How can this be resolved? I am willing to fork and fix, but is it possible in JS or must I modify the native Java code?

@nineteeneightyeight
Copy link

This is causing me issues as well. Did you have any luck remedying it reactor81?

@Gnative
Copy link

Gnative commented Jun 13, 2016

Curious as how I can prevent any touch events on the map to be able to have just a static map, woudl you guys know how this is supported ?

@ujazdowskip
Copy link

@Gnative There are config props:

rotateEnabled
scrollEnabled
zoomEnabled

If you set them to false map will be static.

@ujazdowskip
Copy link

I noticed that MapView does not passing events to parents panResponder on Android. So this works only on iOS:

<View style={[styles.container]} onStartShouldSetResponder={() => { console.log('logs only on ios'); }} > <Map /> </View>

Wondering if this is related to this issue or is it separate bug?

@joshuapinter
Copy link

Take a look at this SO question: https://stackoverflow.com/questions/6546108/mapview-inside-a-scrollview

Looks like the solution was used to fix the same scrolling issue on react-native-maps: react-native-maps/react-native-maps#343

emerson233 pushed a commit to studyroz/react-native-mapbox-gl that referenced this issue Aug 9, 2019
…-fix

Fixed bug where camera moves to incorrect position on physical iOS devices
This issue was closed.
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

7 participants