How to find current zoom level in a Google Map?

2019-01-16 13:31发布

问题:

How do I find the current zoom level when loading or clicking a Google map?

回答1:

If you have a map object like this:

var mapObject = new google.maps.Map(document.getElementById("map"), _mapOptions);

use

mapObject.getZoom();


回答2:

Use this code:

float zoomlevel = mMap.getCameraPosition().zoom;