Select to view content in your preferred language

EditGeometry resource; point feat layer; map moving when moving point/

665
3
Jump to solution
09-21-2012 12:09 PM
Ravichandran_M_Kaushika
Regular Contributor
dear Readers,

thanks for taking time to read this query.

I refered the sample: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#EditToolsGeometry for editing points on a feature layer. I find that my map is also moving with the mouse cursor and the edit graphic highlighted in cyan.

The only thing I am doing different is adding the feature server service at run-time. after getting MyEditGeometry from Layout.Resource, i am doing everything as per the above link.


When i click the point, and try to move the map, the map moves along with the point - so i can move the point feature in a skillful way, then point moves 70 units of distance (for example) and the map follows the point 50 units in the same direction - so effectively, i would have moved the point 20 units of distance.

in the above link, the point feature (a blue circle) moves without the map and the map moves independently when no feature is selected for editing. in my problem, i can move the map freely when no point feature is selected.

any suggestions - i might not be setting some flag - i checked the flags for map, myEditGeometry and other objects that i thought could be it, but i am not able to change the above mentioned issue.

thanks and regards
ravi.
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
It seems you forgot to set Handled to true in the MouseLeftButtonDown handler, hence the standard event managment (i.e pan) gets actived.

private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e) {     e.Handled = true;    if (e.Graphic.Geometry is MapPoint)     {         e.Graphic.Selected = true;         selectedPointGraphic = e.Graphic;     }     else   {         editGeometry.StartEdit(e.Graphic);     } }

View solution in original post

0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
It seems you forgot to set Handled to true in the MouseLeftButtonDown handler, hence the standard event managment (i.e pan) gets actived.

private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e) {     e.Handled = true;    if (e.Graphic.Geometry is MapPoint)     {         e.Graphic.Selected = true;         selectedPointGraphic = e.Graphic;     }     else   {         editGeometry.StartEdit(e.Graphic);     } }
0 Kudos
Ravichandran_M_Kaushika
Regular Contributor
Dominique,

good morning - SOLVED -  thanks for yyour help, it solved the issue.

how do i marked it answered - to ensure that it benefits other readers.

regards
ravi.
0 Kudos
Ravichandran_M_Kaushika
Regular Contributor
thank you - I marked it answered after posting the reply.
0 Kudos