我有一个页面,中间显示了一张大 map 。您可能知道(并且讨厌),每当您在 map 上旋转鼠标滚轮时,它就会放大/缩小。
有办法禁用此效果吗?与 map 的所有其他交互都可以,我只需要禁用它即可。
我正在使用 API 的 V3。欢迎使用 Jquery 解决方案。
最佳答案
看看这些页面:
http://googlemapsapi.blogspot.com/2007/04/v278-go-ahead-scroll-your-mouse-wheels.html
http://code.davidjanes.com/blog/2008/11/14/how-to-enabledisable-mouse-wheel-actions-on-your-map/
您正在寻找的功能是
map.disableScrollWheelZoom()
€编辑: V3 解决方案已在 Stackoverflow 上发布;)
How to disable mouse scroll wheel scaling with Google Maps API
关于jquery - 在 gmap 上移动鼠标滚轮时避免放大/缩小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6582596/