On Nov 28, 9:28 am, DaGoo <[email protected]> wrote: > Hi, > > I am using the following script to detect the current zoom-level in a > Google map by clicking on the map. A new marker is displayed, and the > current zoom level is posted in the proper element. So far, so good. > However, I need a function that also detects the NEW zoom level when > the user clicks on the Zoom-control (GZoomSmallControl) to zoom in or > zoom out. > > Does anybody know how this function could be implemented in the > current script? (I am a novice, so I would need to get it with > teaspoons...).
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.zoomend Add a listener for that event and use the new zoom level: GEvent.addListener(map,"zoomend",function(oldzoom,newzoom) { document.getElementById('zoomlvl').value=newzoom; } -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
