I would like to create a circle in GMap.Net drawing a polygon. The below method is from the first answer from this question link. To get something that looks like 100m (see image) I need to enter the radius parameter as 0.005. The circle also looks stretched. I think the issue is that the circle calculation is not very accurate due to the curvature of the earth coupled with not knowing the scale of the map. I would correct this but my math's is poor.
private void CreateCircle(PointF point, double radius, int segments)
{
List<PointLatLng> gpollist = new List<PointLatLng>();
double seg = Math.PI * 2 / segments;
for (int i = 0; i < segments; i++)
{
double theta = seg * i;
double a = point.X + Math.Cos(theta) * radius;
double b = point.Y + Math.Sin(theta) * radius;
PointLatLng gpoi = new PointLatLng(a, b);
gpollist.Add(gpoi);
}
GMapPolygon gpol = new GMapPolygon(gpollist, "pol");
GMapOverlay overlayOne = new GMapOverlay("circle");
overlayOne.Polygons.Add(gpol);
map.Overlays.Add(overlayOne);
}
