Version 5.0.1: Dropped MapProjection.UnitsPerDegree

This commit is contained in:
ClemensF 2020-04-02 18:06:39 +02:00
parent 2b41d298f4
commit 43c33c2564
12 changed files with 29 additions and 50 deletions

View file

@ -30,7 +30,7 @@ namespace MapControl
GetAzimuthDistance(Center, location, out azimuth, out distance);
var mapDistance = Math.Tan(distance / 2d) * 2d * UnitsPerDegree * 180d / Math.PI;
var mapDistance = Math.Tan(distance / 2d) * 2d * Wgs84EquatorialRadius;
return new Point(mapDistance * Math.Sin(azimuth), mapDistance * Math.Cos(azimuth));
}
@ -45,7 +45,7 @@ namespace MapControl
var azimuth = Math.Atan2(point.X, point.Y);
var mapDistance = Math.Sqrt(point.X * point.X + point.Y * point.Y);
var distance = 2d * Math.Atan(mapDistance / (2d * UnitsPerDegree * 180d / Math.PI));
var distance = 2d * Math.Atan(mapDistance / (2d * Wgs84EquatorialRadius));
return GetLocation(Center, azimuth, distance);
}