/// <summary> /// Applies changes to this editing operation. /// </summary> /// <param name="ctx">The editing context (null if the model is being deserialized)</param> /// <param name="data">The changes to apply</param> void ApplyUpdateItems(EditingContext ctx, UpdateItemCollection data) { // Locate the specific point that was modified //string id = data.GetValue<string>(DataField.Id); //InternalIdValue iid = new InternalIdValue(id); //PointFeature p = this.MapModel.Find<PointFeature>(iid); PointFeature p = data.GetValue <PointFeature>(DataField.UpdatedPoint); double x = data.ExchangeValue <double>(DataField.X, p.Easting.Meters); double y = data.ExchangeValue <double>(DataField.Y, p.Northing.Meters); PointGeometry pg = new PointGeometry(x, y); p.ApplyPointGeometry(ctx, pg); }
/// <summary> /// Applies changes to this editing operation. /// </summary> /// <param name="ctx">The editing context (null if the model is being deserialized)</param> /// <param name="data">The changes to apply</param> void ApplyUpdateItems(EditingContext ctx, UpdateItemCollection data) { // Locate the specific point that was modified //string id = data.GetValue<string>(DataField.Id); //InternalIdValue iid = new InternalIdValue(id); //PointFeature p = this.MapModel.Find<PointFeature>(iid); PointFeature p = data.GetValue<PointFeature>(DataField.UpdatedPoint); double x = data.ExchangeValue<double>(DataField.X, p.Easting.Meters); double y = data.ExchangeValue<double>(DataField.Y, p.Northing.Meters); PointGeometry pg = new PointGeometry(x, y); p.ApplyPointGeometry(ctx, pg); }