Version 4.12.1 Added AutoEquirectangularProjection

This commit is contained in:
ClemensF 2019-04-05 19:13:58 +02:00
parent 0a3ae81117
commit bd9a16e921
17 changed files with 174 additions and 140 deletions

View file

@ -35,7 +35,7 @@ namespace MapControl
GetAzimuthDistance(ProjectionCenter, location, out azimuth, out distance);
var mapDistance = Math.Tan(distance / 2d) * TrueScale * 360d / Math.PI;
var mapDistance = Math.Tan(distance / 2d) * 2d * TrueScale * 180d / Math.PI;
return new Point(mapDistance * Math.Sin(azimuth), mapDistance * Math.Cos(azimuth));
}
@ -49,7 +49,8 @@ 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 / (TrueScale * 360d / Math.PI));
var distance = 2d * Math.Atan(mapDistance / (2d * TrueScale * 180d / Math.PI));
return GetLocation(ProjectionCenter, azimuth, distance);
}