Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable user interaction form MapView in react-native

Tags:

react-native

How do I turn of user interaction for an element in React native, similar to IOS, MapView in this case.

userInteraction = false

Thanks

like image 550
BlackMouse Avatar asked Dec 01 '22 16:12

BlackMouse


1 Answers

Edit: MapView has been removed for React Native, you can find the new docs over at react-community/react-native-maps/. Thanks @Siraj for pointing this out!

You can use the differents props MapView has to disable interaction:

pitchEnabled

rotateEnabled

scrollEnabled

zoomEnabled

If you feel it's not enough, feel free to submit a PR to React native to implement userInteraction as a prop directly.

like image 100
Bhullnatik Avatar answered Dec 04 '22 13:12

Bhullnatik