Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specific zoom in Google Maps

I have a Gmap that has to zoom in bit by bit. To achieve this I need the Google map zoom level to be formatted like this '4.001'. I tried doing this by simply add this value as zoom level but it doesn't work.

So my question is how to achieve a Google map zoom level using multiple numbers behind the decimal. Is it even possible? If not, how do I achieve the slowly precise zooming?

Thanks

like image 556
Sandor Avatar asked Jul 14 '11 10:07

Sandor


2 Answers

According to the documentation, the zoom level corresponds to the number of tiles in which the Earth is divided:

zoom = 1   =>   tiles = 2^1 * 2^1 = 2 * 2 = 4
zoom = 2   =>   tiles = 2^2 * 2^2 = 4 * 4 = 16
zoom = 3   =>   tiles = 2^3 * 2^3 = 8 * 8 = 64
etc

Increasing the zoom level by 1 doubles the level of detail. The zoom level is an integer value. It corresponds to the discrete value of the slider control on Google maps.

like image 58
Jiri Kriz Avatar answered Sep 17 '22 02:09

Jiri Kriz


When you want a zoom level between 4 and 5 for example 4.2 or 4.3 the only way is to use a cluster algorithm because the map is subdivide by 4. Cluster means that when the tiles are so close together that's not anymore practical to show them. There is a for example marker manager that can calculate clusters but it's not applicable to the map because it doesn't make sense to subdivide by 6 or 7 tiles.

like image 25
Micromega Avatar answered Sep 20 '22 02:09

Micromega