Customer Service | Training | Contact Us
You are here: Home > User Forums > arcgis server forums > Thread Replies

ArcGIS Server Forums

ArcGIS API for JavaScript forum

Calling the Pan method   afe efa Nov 07, 2009
Re: Calling the Pan method   afe efa Nov 14, 2009
Report Inappropriate Content • Top • Print • Reply    
Subject Calling the Pan method 
Author afe efa 
Date Nov 07, 2009 
Message Hi.
I want to do the following. The map shall be pannend without click and hold the mouse button. Panning should be possible just by moving the mouse over the map. I am searching for a method to call the panning function.

I use this line:

dojo.connect(map, "onMouseMove", movemap);

The function movemap then should activate the panning.

Is there any way to do this? Something like map.startpan ?

I already tried to trick the mapwindow with the following code in the movemap function:

var fireOnThis = document.getElementById("mapDiv");
var evt = document.createEvent("MouseEvents");
evt.initEvent("mousedown", true, true);
fireOnThis.dispatchEvent(evt);

But this code doesnt work because the mouse is released immediately after the call.

Thanks in Advance! 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Calling the Pan method 
Author afe efa 
Date Nov 14, 2009 
Message Please help me with this.
Why is it so difficult to call the pan method?
Please give me a hint.
Thanks