The guide mentions disabling User Interactions for Kotlin here.
mapView = findViewById(R.id.mapView)
mapboxMap = mapView.getMapboxMap()
mapboxMap.gestures(); //Method not found??
I don't know how to code in Kotlin. I can't work it around to work with Java. In Java, it says it cannot resolve symbol 'gestures'. Same problem with other features.
You need to get a reference to the GesturesPlugin, try this:
final GesturesPlugin gesturesPlugin = GesturesUtils.getGestures((mapView));
gesturesPlugin.setPitchEnabled(false);
gesturesPlugin.setScrollEnabled(false);
}
I used the following methods to disable everything related to the map movement on mapbox 10
binding.mapView.gestures.pitchEnabled = false
binding.mapView.gestures.scrollEnabled = false
binding.mapView.gestures.pinchToZoomEnabled = false
binding.mapView.gestures.rotateEnabled = false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With