paulzaba paulzaba - 4 months ago 19
HTML Question

does the zoom parameter value of the html file change when I zoom-in or zoom-out in the google map?

I'm not sure whether my question is clear enough or not. This is my problem:

I am working with the gmplot module for python and I would like to make the grids of the scalable according to the value of the zoom of the google map. I read the html file but, as I know nothing about html, I don't know if the values in the file change while I'm interacting with the map through its zoom button or the with the "street view little man". If this happens, I could relate both parameters and get what I'm looking for.

Do the parameters of the html code change in "real time" or is it just an initialisating file?


Your best bet I think would be to use JavaScript to get the zoom value from the google.maps.Map object.

You should already have such an object referenced somewhere in your code if you are seeing a map. Maybe something like:

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

You can then call the getZoom() method on that object to get the zoom level, which should be updated in real time as your map is updated:


I don't know of any way to get the real time value from the html element.