Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在地图上有一些多边形,当用户双击它们时,我不希望发生缩放。但是,我希望在地图的其他部分启用双击缩放。有什么办法可以实现吗?
非常感谢。
观察多边形的 dblclick 事件并在事件发生时调用事件的 stop() 方法:
google.maps.event.addListener(polygonObject,'dblclick',function(e){e.stop();})