Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Google Maps api v2 - Disable Zoom control

How do I disable the Zoom In button on the Google Map?

I tried looking for commands like: map.getUiSettings().setZoomControlsEnabled(true)...SOMETHING but nothing exists.

I want to leave creating my own buttons for zooming as a last resort.

UPDATE: I should clarify, I only want to disable the Zoom In button, not the whole Zoom Control.

like image 748
KickAss Avatar asked Dec 24 '13 02:12

KickAss


People also ask

How do I turn off zoom on Google Maps?

Show activity on this post. map. setOptions({draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: true}); If this doesn't prevent zooming, you could always set the minimum and maximum zoom to the current zoom level.

How can we enable or disable the zoom in the map in Android Studio?

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) .

How do I turn off Google Maps controls?

Disabling the Default UI To do so, set the map's disableDefaultUI property (within the MapOptions object) to true . This property disables any UI control buttons from the Maps JavaScript API.


1 Answers

the setting you used is right, but to disable it, it should be false.

map.getUiSettings().setZoomControlsEnabled(false); 

hope I got your question right..

Edit

Unfortunately, you can't hide one zoom buttons, what you can do is hide both buttons and create your own custom zoom control and place them on the your map.

like image 171
Coderji Avatar answered Oct 12 '22 03:10

Coderji