Select to view content in your preferred language

Odd Pan and Drawing behavior

1190
3
08-27-2012 11:57 AM
StevenGriffith
Deactivated User
I'm experiencing some odd conflicts with drawing and map panning (mouse drag). The sequence of events is:

toolbar.activate(esri.toolbars.Draw.EXTENT);
toolbar.deactivate();
toolbar.activate(esri.toolbars.Draw.POINT);
querytask - get feature at selected point
add returned feature to a graphics layer
toolbar.deactivate();
toolbar.activate(esri.toolbars.Draw.POINT);

And at this point, mouse dragging to pan the map is disabled in my application. What's interesting is two things: First, if the initial toolbar activation as "EXTENT" is left off, the map dragging is not disabled. Second, when the map dragging is disabled, activating the toolbar with drawing shape "EXTENT" and then deactivating the toolbar fixes the mouse dragging to pan the map.

Any clues or help would be appreciated.

Steve G.
County of SLO
0 Kudos
3 Replies
StevenGriffith
Deactivated User
I'm experiencing some odd conflicts with drawing and map panning (mouse drag). The sequence of events is:

toolbar.activate(esri.toolbars.Draw.EXTENT);
toolbar.deactivate();
toolbar.activate(esri.toolbars.Draw.POINT);
querytask - get feature at selected point
add returned feature to a graphics layer
toolbar.deactivate();
toolbar.activate(esri.toolbars.Draw.POINT);

And at this point, mouse dragging to pan the map is disabled in my application. What's interesting is two things: First, if the initial toolbar activation as "EXTENT" is left off, the map dragging is not disabled. Second, when the map dragging is disabled, activating the toolbar with drawing shape "EXTENT" and then deactivating the toolbar fixes the mouse dragging to pan the map.

Any clues or help would be appreciated.

Steve G.
County of SLO


Just realized I have an error in the list of operations: The drawing toolbar is deactivated prior to the returned feature being added to a graphics layer. The correct sequence is:

toolbar.activate(esri.toolbars.Draw.EXTENT);
toolbar.deactivate();
toolbar.activate(esri.toolbars.Draw.POINT);
querytask - get feature at selected point
toolbar.deactivate();
add returned feature to a graphics layer
toolbar.activate(esri.toolbars.Draw.POINT);

Steve G
County of SLO
0 Kudos
JianHuang
Deactivated User
Steve,

Query task is an asynch process. It should be OK to deactivate the drawing toolbar before the task responds.
Check this thread. It may be the same issue:
http://forums.arcgis.com/threads/63149-Drawing-Tool-sometimes-locks-pan-tool-and-can-never-finish-dr...
0 Kudos
StevenGriffith
Deactivated User
Steve,

Query task is an asynch process. It should be OK to deactivate the drawing toolbar before the task responds.
Check this thread. It may be the same issue:
http://forums.arcgis.com/threads/63149-Drawing-Tool-sometimes-locks-pan-tool-and-can-never-finish-dr...


I understand that the query is a separate issue, but there's apparently some odd internal conflict happening such that calling the querytask and adding the resulting polygon to a graphics layer triggers this problem in the drawing tool. Note that when this happens, other things that use mouse drag (such as jquery draggable items) also break. On the other hand, the early results are that following the instructions in that other thread seem to fix the problem. I'll post back with more information if the problem reappears.

Thanks,
Steve G.
0 Kudos