Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps V2 - Android - Get the current zoom level

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.

like image 525
user268397 Avatar asked May 03 '13 19:05

user268397


People also ask

How do I check the zoom level on Google Maps?

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.

Which method is used to get the current zoom level of the map?

Maps API getZoom() Method The getZoom() method returns the current zoom level of the map.

How do you get the current zoom level on Google Maps flutter?

You can get the current zoom this way: float zoom=googleMap. getCameraPosition().


1 Answers

GoogleMap map; 

....

float zoom = map.getCameraPosition().zoom; 
like image 198
Pavel Dudka Avatar answered Oct 21 '22 22:10

Pavel Dudka