chiranjeevigk
chiranjeevigk

Reputation: 1666

disable double click zoom in google maps while drawing

I want to draw a polyline on the maps. i am not using the Drawing lib from google maps api.. i have written my own..

problem: Before starting the line draw i disabled the double click zoom as below

map.setOptions({disableDoubleClickZoom: false });

double click event is added to line end. after this event i am enabled by calling the

map.setOptions({disableDoubleClickZoom: true });

but still the zoom is happening.

even if i put the stop event code in double click.

 mouseEvent.stop();

Upvotes: 7

Views: 8332

Answers (1)

Marco Ramires
Marco Ramires

Reputation: 1116

It should be the other way around:

To disable

map.setOptions({disableDoubleClickZoom: true });

To enable

map.setOptions({disableDoubleClickZoom: false });

Upvotes: 16

Related Questions