4

I am using ArcGIS java script API for creating map. I am trying to disable the double-click zoom in the map. Here is link of my map: http://urbanaccessregulations.eu/mindcrew/mobile-popup.html

I used both methods which are given in documentation of Arcgis JS:

map.isDoubleClickZoom=false;
map.disableDoubleClickZoom();

But still the double click zoom is not disabled - what am I doing wrong?

1
  • I'd say your problem is that you're setting the readonly value and so when you go to actually disable it via disableDoubleClickZoom() that code is seeing that it is already disabled and doing nothing. Remove your first line.
    – ca0v
    Commented Sep 9, 2014 at 16:25

5 Answers 5

4

Just call map.disableDoubleClickZoom();

Setting map.isDoubleClickZoom=false before calling the above method actually causes the method to fail.

0

Use map.disableDoubleClickZoom() and make sure it's declared when the map is loaded. Others had problems with calling it too early.

-1

Use map.disableDoubleClickZoom(true);

this worked for me :)

-1

Use map.disableDoubleClickZoom(); on map onlaod on(map, "load", function () { map.disableDoubleClickZoom(); });

-2

Try this:

map.on("load", function (evt) {
    map.disableDoubleClickZoom();               
}); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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