I wish to create various shapes as a layer on my map, i've seen the example TrackAndEditShapes where shapes are added to the trackoverlay, what i now wish to do is access the shapes that that have been drawn.
I tried to loop through the WinformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures but couldn't figure out which object is being referencing in the loop?
I effectively want to access each object, get it's area value and then store this in a database so i can re-plot is again.
Following code snippet shows you how to get the area for the tracked area type shapes. foreach (Feature feature in winformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures) { BaseShape baseshape = feature.GetShape(); if (baseshape is AreaBaseShape) { double area = ((AreaBaseShape)(baseshape)).GetArea(GeographyUnit.DecimalDegree, AreaUnit.SquareKilometers); }