How can I set maximum zoomin level in google maps, so that user cannot pinch zoom further in map?? I searched it for about half an hour but didn't find any suitable solution
Asked
Active
Viewed 73 times
-4
-
3duplicate with http://stackoverflow.com/questions/15700808/setting-max-zoom-level-in-google-maps-android-api-v2 – karvoynistas Nov 16 '15 at 13:09
-
maximum zoom level is 19f – Nov 16 '15 at 13:11
-
check this answer on stackoverflow [here](http://stackoverflow.com/questions/19227378/android-gmaps-v2-bounds-and-max-zoom-level) – Nils Nov 16 '15 at 13:13
2 Answers
1
We can not restrict map zoomin feature directly, but we can try to get same feature like this.
add map.setOnCameraChangeListener
final float maxZoom = 10.0f;
@Override
public void onCameraChange(CameraPosition position) {
if (position.zoom > maxZoom)
map.animateCamera(CameraUpdateFactory.zoomTo(maxZoom));
}

R_K
- 803
- 1
- 7
- 18
0
use this
googleMap.animateCamera(CameraUpdateFactory.zoomTo(1), 2000, null);

Kastriot Dreshaj
- 1,121
- 6
- 16
-
this will not work with pinch zoom,it's only for first time when map is loaded – Vivek Mishra Nov 16 '15 at 13:11
-
use then googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLong, 15)); when you pinch – Kastriot Dreshaj Nov 16 '15 at 13:13