mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Rotated relative scale in MapProjections
This commit is contained in:
parent
25d4e13c16
commit
3fbfb0d5c1
8 changed files with 85 additions and 41 deletions
|
|
@ -28,18 +28,18 @@ namespace MapControl
|
|||
|
||||
public override Matrix RelativeScale(double latitude, double longitude)
|
||||
{
|
||||
(var cosC, var _, var _) = GetPointValues(latitude, longitude);
|
||||
var k = 2d / (1d + cosC); // p.157 (21-4), k0 == 1
|
||||
var p = GetProjectedPoint(latitude, longitude);
|
||||
var k = 2d / (1d + p.CosC); // p.157 (21-4), k0 == 1
|
||||
|
||||
return new Matrix(k, 0d, 0d, k, 0d, 0d);
|
||||
}
|
||||
|
||||
public override Point? LocationToMap(double latitude, double longitude)
|
||||
{
|
||||
(var cosC, var x, var y) = GetPointValues(latitude, longitude);
|
||||
var k = 2d / (1d + cosC); // p.157 (21-4), k0 == 1
|
||||
var p = GetProjectedPoint(latitude, longitude);
|
||||
var k = 2d / (1d + p.CosC); // p.157 (21-4), k0 == 1
|
||||
|
||||
return new Point(EarthRadius * k * x, EarthRadius * k * y); // p.157 (21-2/3)
|
||||
return new Point(EarthRadius * k * p.X, EarthRadius * k * p.Y); // p.157 (21-2/3)
|
||||
}
|
||||
|
||||
public override Location MapToLocation(double x, double y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue