I would like to store current zoom level to textbox for future use. Please help.
Thanks for Great Script.
|2012-12-05 23:03:05 - In reply to message 1 from girish|
|Hi, I'm glad U foun it useful.|
About your question the matter is that you cannot access from the DOM the google.Map object generated by the script wrote by the class, because it's scope is not public. But you can still do something, I tested that ..and works.
-open the class
var '.$this->map_id.' = new google.maps.Map(document.getElementById("'.$this->map_id.'"), myOptions); (should be ~ln.1622)
-just after this line type
window.'.$this->map_id.' = '.$this->map_id.';
//this adds a reference the map object to the global scope,
//the map object is visible by any scope
save and You're done, now the global scope contains the object You where looking for, that variable is named as the "id" parameter you pass to the class constructor. (let's say that it is "my_map")…be sure to delete any related cache file done by the class….
now obtain zoom using : my_map.getZoom();
hope it helps.. sorry for the delay.