amir-f
amir-f

Reputation: 731

Disabling zoom when double click on polygon

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 there any way I can implement this?

Thanks a lot.

Upvotes: 1

Views: 2838

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117354

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();})

Upvotes: 6

Related Questions