I use the Google maps v3 plugin for jQuery. All I want to do is to detect the zoom. With the code below
var map = $('#map_canvas').gmap('get', 'map');
$(map).addEventListener('zoom_changed', function() {
alert(map);
});
I can detect if the zoom has changed but I don't know the exact zoom. So, how can I detect the zoom?
There is probable an event variable passed in there.
Try using it:
var map = $('#map_canvas').gmap('get', 'map');
$(map).addEventListener('zoom_changed', function(event) {
alert(map);
//... use event
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.