How can i disable the panning/zooming functionality of a MapView (not the zoom controls, i want a wholly static map)?
I've also noticed that touching the map doesn't seem to trigger the MapView onClickListener, could anyone elaborate why?
The Maps API provides built-in zoom controls that appear in the bottom right hand corner of the map. These are disabled by default, but can be enabled by calling UiSettings. setZoomControlsEnabled(true) .
You can change the zoom level of the map using simple steps. Step 1 Go to Add or Edit Map page . Step 2 Select 'Default zoom level' in the 'Map Information section'. Step 3 click save map and see the changes.
To pan around on a map, you can use the arrow keys to move north, south, east and west. You can also press two arrow keys together to move diagonally.
For version 2 of the Google Maps API for Android, this is the way:
map.getUiSettings().setScrollGesturesEnabled(false);
This is gauranteed to work
mapView.getMap().getUiSettings().setAllGesturesEnabled(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