mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 07:55:13 +00:00
Added AzimuthalProjection.EarthRadius
This commit is contained in:
parent
60152fef93
commit
d825b50062
9 changed files with 63 additions and 60 deletions
|
|
@ -34,7 +34,7 @@ namespace MapControl
|
|||
|
||||
Center.GetAzimuthDistance(latitude, longitude, out double azimuth, out double distance);
|
||||
|
||||
var mapDistance = Math.Tan(distance / 2d) * 2d * Wgs84MeanRadius;
|
||||
var mapDistance = Math.Tan(distance / 2d) * 2d * EarthRadius;
|
||||
|
||||
return new Point(mapDistance * Math.Sin(azimuth), mapDistance * Math.Cos(azimuth));
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ namespace MapControl
|
|||
|
||||
var azimuth = Math.Atan2(x, y);
|
||||
var mapDistance = Math.Sqrt(x * x + y * y);
|
||||
var distance = 2d * Math.Atan(mapDistance / (2d * Wgs84MeanRadius));
|
||||
var distance = 2d * Math.Atan(mapDistance / (2d * EarthRadius));
|
||||
|
||||
return Center.GetLocation(azimuth, distance);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue