Google map Pinch Zoom Event
Currently iam using google map to display a particular location on map_canvas. There iam also plotting some markers too.
In my application there is an option to set zoom level of the map by the user. User can pinch zoom on map and return the current map zoom value, when clicking on a button the value will be saved. i attain it by using
this.mapObj.getZoom();
What my requirement is to get the zoom level of the map after the user performs the pinch zoom, so that i can display it in a div, so that the user can know the zoom level after each pinch zoom in/pinch zoom out.
Anyone have any idea how can i get the event just after the pinch zoom?
Hope you guys understand what i mean!
NB: Shoot! Found out! Google Maps API v3: Is there a callback or event listener after zoom changed?
am gonna try this.
Yes, put this somewhere ( I would put that inside initialize() ):
google.maps.event.addListener(map, 'zoom_changed', function() {
...
}
And you read the zoom with map.getZoom().
Also, check out bounds_changed . That is triggerd by zoom, pan and resize of the map. Might become useful to you
链接地址: http://www.djcxy.com/p/81596.html上一篇: zooms.google.com上的缩放比Google Maps API v3更平滑
下一篇: Google地图捏缩放事件