mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 4.12.1 Added AutoEquirectangularProjection
This commit is contained in:
parent
0a3ae81117
commit
bd9a16e921
17 changed files with 174 additions and 140 deletions
|
|
@ -35,9 +35,9 @@ namespace MapControl
|
|||
|
||||
GetAzimuthDistance(ProjectionCenter, location, out azimuth, out distance);
|
||||
|
||||
distance *= TrueScale * 180d / Math.PI;
|
||||
var mapDistance = distance * TrueScale * 180d / Math.PI;
|
||||
|
||||
return new Point(distance * Math.Sin(azimuth), distance * Math.Cos(azimuth));
|
||||
return new Point(mapDistance * Math.Sin(azimuth), mapDistance * Math.Cos(azimuth));
|
||||
}
|
||||
|
||||
public override Location PointToLocation(Point point)
|
||||
|
|
@ -48,7 +48,9 @@ namespace MapControl
|
|||
}
|
||||
|
||||
var azimuth = Math.Atan2(point.X, point.Y);
|
||||
var distance = Math.Sqrt(point.X * point.X + point.Y * point.Y) / (TrueScale * 180d / Math.PI);
|
||||
var mapDistance = Math.Sqrt(point.X * point.X + point.Y * point.Y);
|
||||
|
||||
var distance = mapDistance / (TrueScale * 180d / Math.PI);
|
||||
|
||||
return GetLocation(ProjectionCenter, azimuth, distance);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue