private void DisplayMap_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.DecimalDegree; EllipseShape elipse1 = new EllipseShape(new PointShape(0, 0), 80); EllipseShape elipse2 = new EllipseShape(new PointShape(0, 0), 90); InMemoryFeatureLayer elipseLayer = new InMemoryFeatureLayer(); elipseLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(new GeoPen(GeoColor.SimpleColors.Red), new GeoSolidBrush(GeoColor.SimpleColors.Transparent)); elipseLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; elipseLayer.InternalFeatures.Add(new Feature(elipse1)); elipseLayer.InternalFeatures.Add(new Feature(elipse2)); LineShape perimeter1 = new LineShape(); perimeter1.Vertices.Add(new Vertex(elipse1.Center.X, elipse1.Center.Y)); perimeter1.Vertices.Add(elipse1.ToPolygon().OuterRing.Vertices[0]); LineShape perimeter2 = new LineShape(); perimeter2.Vertices.Add(new Vertex(elipse2.Center.X, elipse2.Center.Y)); perimeter2.Vertices.Add(elipse2.ToPolygon().OuterRing.Vertices[40]); Feature perimeter1Feature = new Feature(perimeter1); perimeter1Feature.ColumnValues.Add("radius", elipse1.GetPerimeter(GeographyUnit.DecimalDegree, DistanceUnit.Meter).ToString() + " meters"); Feature perimeter2Feature = new Feature(perimeter2); perimeter2Feature.ColumnValues.Add("radius", elipse2.GetPerimeter(GeographyUnit.DecimalDegree, DistanceUnit.Meter).ToString() + " meters"); InMemoryFeatureLayer perimeterLayer = new InMemoryFeatureLayer(); perimeterLayer.Open(); perimeterLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Canal1; perimeterLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Antarctical("radius"); perimeterLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; perimeterLayer.Columns.Add(new FeatureSourceColumn("radius")); perimeterLayer.InternalFeatures.Add(perimeter1Feature); perimeterLayer.InternalFeatures.Add(perimeter2Feature); LayerOverlay ov = new LayerOverlay(); ov.Layers.Add(elipseLayer); ov.Layers.Add(perimeterLayer); winformsMap1.Overlays.Add(ov); winformsMap1.CurrentExtent = new RectangleShape(-139.2, 92.4, 120.9, -93.2); winformsMap1.Refresh(); }