Select to view content in your preferred language

Deleting a point when using Draw object

583
2
06-19-2012 04:30 PM
JoshPorter
Occasional Contributor
While drawing a polygon on the map using Client.Draw, is it possible to delete a point after it has been placed?

If not, can it be done using the EditGeometry tool?
Perhaps there is some event that exposes an vertex I can attach a right click event to?

Following the example here  http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave
0 Kudos
2 Replies
JoeHershman
MVP Alum
I am just throwing this out there, I don't know if it will work....

You could try to use the GraphicsLayerMouseLeftButtonDown event.  That will give you the graphic the user clicked and using the GetPosition method on the EventArgs you could get the point the clicked.  Then loop through the point collection in Rings[0] of the polygon to find the vertex closest to where the mouse click occurred and remove it from the point collection.

Good Luck
Thanks,
-Joe
0 Kudos
JoshPorter
Occasional Contributor
Ill give it a shot and report back.
Thanks for the thought!

Josh
0 Kudos