Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i determine the Max Zoom Level integer for Google Maps?

Is there a way of generating the actual integer that represents the max zoom level of Google Maps? In either the Static or Java API?

like image 490
John Avatar asked Jul 19 '11 14:07

John


1 Answers

Yes you can generate the maximum zoom level possible for the place you are looking at as:

getMaxZoomAtLatLng(latlng:LatLng, callback:function(MaxZoomResult))

Returns the maximum zoom level available at a particular LatLng for the Satellite map type. As this request is asynchronous, you must pass a callback function which will be executed upon completion of the request, being passed a MaxZoomResult.

You can also set the maximum allowed zoom level (to prevent users from fully zooming in for instance) by using the maxZoom property of your MapOptions

The maximum zoom level which will be displayed on the map. If omitted, or set to null, the maximum zoom from the current map type is used instead.

Read everything about it here. (CTRL+F and look for "maximum zoom")

like image 162
Jules Avatar answered Nov 08 '22 14:11

Jules