7

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();
4
  • 1
    {disableDoubleClickZoom: false} will enable the double-click-zoom
    – Dr.Molle
    Commented Feb 13, 2014 at 7:36
  • after changing that the double click zoom is not working... before that both the line stop and zoom was happening.. now only line stop will happen.. but the zoom will not happen.. Commented Feb 15, 2014 at 5:39
  • I had the same issue and pasted the setting into marker section instead of map section. After that it worked...
    – wenzul
    Commented Nov 5, 2014 at 19:53
  • Check this: stackoverflow.com/questions/11278409/… Commented May 30, 2016 at 14:40

1 Answer 1

16

It should be the other way around:

To disable

map.setOptions({disableDoubleClickZoom: true });

To enable

map.setOptions({disableDoubleClickZoom: false });

Not the answer you're looking for? Browse other questions tagged or ask your own question.