Esri allow move map via mouse pan (Map navigation | Guide | ArcGIS API for JavaScript 3.28 ), while drawing any geometry shape other than free polyline and ploygon.
Anyone can help how can we move map once reached at map edge while drawing free ploygon and ploygon?
Perhaps you can do map.enablePan when a key is pressed and hold down and when released, map.disablePan
Thanks for reply!
How can i find that the mouse reached at the edge of Map while drawing freehand polygon and polyline? here at this example: https://developers.arcgis.com/javascript/3/samples/util_buffergraphic/ try to draw freehand ployline, so how can i come to know the mouse drawing reached at edge of map?
actually i want to move the map once drawing reached to edge of map, so at a time mouse is dragging(for drawing) and arrow keys should move the map. is it possible?
I might really be missing the point here but using the map extent and using the map mouse move event as follow
https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=map_xycoords
can provide you information on where your mouse currently is in relation to the map current extend.
If this what you are after?
Victor Tey are you clear about my problem?
let me explain again:
i am working on drawing geometry shapes on map, so during drawing of shapes (other than Freehand polyline/ploygon) i can move map using mouse pan and arrow keys, But i am unable to move map(via arrow keys) during drawing FREEHAND polyline/polygon.
so in this case i was thinking i should call mapRight(), mapLeft() methods if i know mouse reached at edges.
let me know you got issue, or if you have any good solution please share
Victor Tey could you please reply on this?