Disabling zoom when double click on polygon

前端 未结 1 1913
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-27 01:14

I have some polygons on a map and when the user double clicks on them, I want no zoom to occur. However, I want double click zoom to be enabled on other parts of the map. Is the

相关标签:
1条回答
  • 2021-01-27 02:09

    Observe the dblclick-event of the polygon(s) and call the stop()-method of the event when it occurs:

    google.maps.event.addListener(polygonObject,'dblclick',function(e){e.stop();})
    
    0 讨论(0)
提交回复
热议问题