Google Maps V2 - Android - Get the current zoom level

user268397 picture user268397 · May 3, 2013 · Viewed 38.7k times · Source

How do I get the current zoom level as an integer on a GoogleMap. I need to take this code from GMaps v1.1:

MapView mGoogleMapView; 

int zoomLevel = mGoogleMapView.getZoomLevel();

I am aware of the methods getMinZoomLevel() and getMaxZoomLevel() however I can't find anything in the Android GMap V2 documentation that will give the current zoom level. Does anyone have any pointers on how to do this?

Any help would be appreciated.

Answer

Pavel Dudka picture Pavel Dudka · May 3, 2013
GoogleMap map;

....

float zoom = map.getCameraPosition().zoom;