I want to set static zoom limit for google map v2.I don't want the user to be able to zoom out/in map.
Asked
Active
Viewed 602 times
0
-
which google map version are you using? – Narendra Singh May 18 '15 at 06:14
-
1I'm using google map version 2 – Erfan Eghterafi May 18 '15 at 06:16
-
I think this can solve your problem http://stackoverflow.com/questions/13932441/android-google-maps-v2-set-zoom-level-for-mylocation – Ankii Rawat May 18 '15 at 06:27
2 Answers
3
You can use like this -
1) To give static zoom level -
map.moveCamera( CameraUpdateFactory.newLatLngZoom(new LatLng(xxxx,xxxx) , 14.0f) );
2) For disabling zoom control -
map.getUiSettings().setZoomControlsEnabled(false);

Narendra Singh
- 3,990
- 5
- 37
- 78
-1
map.getUiSettings.setZoomGesturesEnabled(false);
map.getUiSettings().setZoomControlsEnabled(false);
The zoom controls (setZoomControlsEnabled
) affects the on-map "+" and "-" while setZoomGesturesEnabled
affects gestures like pinch to zoom or double-tap

Frank Boyne
- 4,400
- 23
- 30

NotThatDroid
- 53
- 7