Hi,
I am displaying the area and radius of a circle when I edit it on the map using the following:
Feature feature= wpfMap1.EditOverlay.EditShapesLayer.InternalFeatures[0];
double
area = 0;
double
radius = 0;
double
pi = 3.1416;
if
(feature.GetShape()
is
AreaBaseShape)
{
area += (feature.GetShape()
as
AreaBaseShape).GetArea(GeographyUnit.Meter, AreaUnit.SquareMeters);
radius = System.Math.Sqrt(area / pi);
}
txtRadius.Text =
"Radius: "
+
string
.Format(CultureInfo.InvariantCulture,
"{0:N3} {1}"
, radius,
"Mtrs"
);
Since I am just checking whether the shape is an AreaBaseShape, the radius shows for all kinds of area shapes, like polygon areas. I want to limit this to circles alone. How do I do that?
Thanks,
Jacob