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?

Joseph
76.7k8 gold badges173 silver badges286 bronze badges
asked Sep 9, 2014 at 8:54
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. 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.

answered Sep 9, 2014 at 20:31
0

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

answered Dec 15, 2015 at 13:40
-1

Use map.disableDoubleClickZoom(true);

this worked for me :)

answered Feb 11, 2015 at 14:23
-1

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

answered Sep 11, 2015 at 10:50
-2

Try this:

map.on("load", function (evt) {
 map.disableDoubleClickZoom(); 
}); 
Matt
1,69218 silver badges24 bronze badges
answered Nov 3, 2016 at 14:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.