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.
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.
Maps API getZoom() Method The getZoom() method returns the current zoom level of the map.
You can get the current zoom this way: float zoom=googleMap. getCameraPosition().
GoogleMap map;
....
float zoom = map.getCameraPosition().zoom;
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