private void WpfMap_Loaded(object sender, RoutedEventArgs e) { wpfMap1.MapUnit = GeographyUnit.DecimalDegree; wpfMap1.CurrentExtent = new RectangleShape(-133.2515625, 89.2484375, 126.9046875, -88.290625); wpfMap1.TrackOverlay.TrackShapeLayer.Open(); wpfMap1.TrackOverlay.TrackShapeLayer.Columns.Add(new FeatureSourceColumn("Area")); wpfMap1.TrackOverlay.TrackShapeLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("Area", "Arial", 12, DrawingFontStyles.Regular, GeoColor.StandardColors.Black, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green), 2, 0, -8); wpfMap1.TrackOverlay.TrackShapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; wpfMap1.TrackOverlay.TrackEnded += new System.EventHandler(TrackOverlay_TrackEnded); wpfMap1.EditOverlay.EditShapesLayer.Open(); wpfMap1.EditOverlay.EditShapesLayer.Columns.Add(new FeatureSourceColumn("Area")); wpfMap1.EditOverlay.EditShapesLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("Area", "Arial", 12, DrawingFontStyles.Regular, GeoColor.StandardColors.Black, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green), 2, 0, -8); wpfMap1.EditOverlay.EditShapesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; wpfMap1.EditOverlay.FeatureEdited += new System.EventHandler(EditOverlay_FeatureEdited); wpfMap1.Refresh(); } void EditOverlay_FeatureEdited(object sender, FeatureEditedEditInteractiveOverlayEventArgs e) { PolygonShape polygonShape = new PolygonShape(wpfMap1.EditOverlay.EditShapesLayer.InternalFeatures[0].GetWellKnownBinary()); if (polygonShape != null) { wpfMap1.EditOverlay.EditShapesLayer.InternalFeatures[0].ColumnValues["Area"] = "Area is:" + polygonShape.GetArea(GeographyUnit.DecimalDegree, AreaUnit.SquareKilometers).ToString(); } } void TrackOverlay_TrackEnded(object sender, TrackEndedTrackInteractiveOverlayEventArgs e) { PolygonShape polygonShape = new PolygonShape(wpfMap1.TrackOverlay.TrackShapeLayer.InternalFeatures[0].GetWellKnownBinary()); if (polygonShape != null) { wpfMap1.TrackOverlay.TrackShapeLayer.InternalFeatures[0].ColumnValues["Area"] = "Area is:" + polygonShape.GetArea(GeographyUnit.DecimalDegree, AreaUnit.SquareKilometers).ToString(); } }