Select to view content in your preferred language

Recalculate area after editor widget edit

614
0
10-05-2012 06:10 AM
ChadBartman
Deactivated User
All

I have a issue, I am trying to recalculate acreage after an edit event from the editor widget. It needs to save the "ACRES" attribute after teh edit. Here is what I have so far:

private void EditorWidget1_EditCompleted(object sender, ESRI.ArcGIS.Client.Editor.EditEventArgs e)
        {
            if (e.Action == Editor.EditAction.EditVertices)
            {
               foreach (var edit in e.Edits)
                {
                    Graphic graphic = new Graphic();
                    geometryService.AreasAndLengthsAsync(new List<Graphic>() { edit.Graphic });
                    graphic.Attributes.Add("ACRES", (Int32)(decimal.Truncate(System.Convert.ToDecimal(tbxAcres.Text))));
                    featurelayer.Graphics.Add(graphic);
                    break;
                }
            }
        }

Any help is goog help, Thanks.
Chad
0 Kudos
0 Replies