Mapbox Android disable scroll and pan the map
In the current version (4.1), this should probably do:
map.getUiSettings().setZoomControlsEnabled(false);
map.getUiSettings().setZoomGesturesEnabled(false);
map.getUiSettings().setScrollGesturesEnabled(false);
Or if you want to get rid of interaction completely:
map.getUiSettings().setAllGesturesEnabled(false);
Just override the OnTouch
returning true
:
mapView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});