Version 4.8.0: Improved WPF MapPolyline and MapPolygon accuracy.

This commit is contained in:
ClemensF 2018-04-10 22:34:34 +02:00
parent de4ba0765a
commit 5bc42d1f07
19 changed files with 77 additions and 172 deletions

View file

@ -222,7 +222,12 @@ namespace MapControl
}
/// <summary>
/// Gets the scaling transformation from meters to viewport coordinate units at the Center location.
/// Gets the transformation from cartesian map coordinates to viewport coordinates (pixels).
/// </summary>
public MatrixTransform ViewportTransform { get; } = new MatrixTransform();
/// <summary>
/// Gets the scaling transformation from meters to viewport coordinates at the Center location.
/// </summary>
public ScaleTransform ScaleTransform { get; } = new ScaleTransform();
@ -708,9 +713,12 @@ namespace MapControl
}
}
ViewportTransform.Matrix = projection.ViewportTransform;
var scale = projection.GetMapScale(center);
ScaleTransform.ScaleX = scale.X;
ScaleTransform.ScaleY = scale.Y;
RotateTransform.Angle = Heading;
OnViewportChanged(new ViewportChangedEventArgs(projectionChanged, Center.Longitude - centerLongitude));