private void CreateCircle()
{
if (Point1 == null && Point2 == null)
{
return;
}
var polyLine = new Polyline() as IPolyline;
polyLine.SpatialReference = Point1.SpatialReference;
var ptCol = polyLine as IPointCollection;
ptCol.AddPoint(Point1);
ptCol.AddPoint(Point2);
UpdateDistance(polyLine as IGeometry);
try
{
var construct = new Polyline() as IConstructGeodetic;
if (construct != null)
{
construct.ConstructGeodesicCircle(Point1, GetLinearUnit(), Distance, esriCurveDensifyMethod.esriCurveDensifyByDeviation, 0.0001);
//var color = new RgbColorClass() { Red = 255 } as IColor;
this.AddGraphicToMap(construct as IGeometry);
Point2 = null;
HasPoint2 = false;
ResetFeedback();
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}