mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 5.0.1: Dropped MapProjection.UnitsPerDegree
This commit is contained in:
parent
2b41d298f4
commit
43c33c2564
12 changed files with 29 additions and 50 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue