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?

  • 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 Sep 9 '14 at 16:25
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, privacy policy and cookie policy

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