I want to implement edit vertices i know http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave this example is working fine.I want to implement the same thing but i want to write the code because in this example once i completed the changes i have to click on some another feature to enable the save button.I want something like when user click on edit vertices after that he will click on some feature and update the vertices once he done with changes he will click on done after that user will click on save button to make changes also I have two features in my application one is polygon and another one is point feature and both are connected with each other.when user wants to add feature he will draw polygon and once he done drawing center point will create automatically and polygon feature will save in polygon table and center point will save in point table so now if i change any vertices in polygon i will have to again create center point and i will have to delete the earlier center point and i will have to create another center point.Is ther any easy way to impletemnt this?
also let me know if anyone know about the overlapped polygon when user draw over lapped polygon it should throw some message that user can't save overlapped polygon.
If you want something done completely in code-behind, you can do something like this:
if (g.Geometry is Polygon)
{
var polygon = g.Geometry as Polygon;
if (polygon.Rings > 0)
{
var pc = polygon.Rings[0];
pc.Add(new MapPoint(x, y));//to add
pc.Remove(mp);//to remove
}
}
For the polygon and center point, once you modify any vertec of the polygon, you don't have to delete the existing point and create a new one. What you need to do is to calculate the coordinate of the center point again and update the point feature, or update the table point feature with IFeature.Shape property set to the new center point.