From 5ae3f4083e024465db2a9fbb3a47b735995fc059 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Wed, 7 Mar 2018 22:24:57 +0100 Subject: [PATCH] Version 4.7.0: Added UWP Vector class --- MapControl/Shared/MapProjection.cs | 6 ++++++ MapControl/Shared/MapTileLayer.cs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MapControl/Shared/MapProjection.cs b/MapControl/Shared/MapProjection.cs index bdef163d..1d6b6706 100644 --- a/MapControl/Shared/MapProjection.cs +++ b/MapControl/Shared/MapProjection.cs @@ -182,6 +182,12 @@ namespace MapControl rect.X, rect.Y, (rect.X + rect.Width), (rect.Y + rect.Height), width, height); } + internal static Matrix CreateTransformMatrix( + Point translation1, double scale, double rotation, Point translation2) + { + return CreateTransformMatrix(translation1, scale, scale, rotation, translation2); + } + internal static Matrix CreateTransformMatrix( Point translation1, double scaleX, double scaleY, double rotation, Point translation2) { diff --git a/MapControl/Shared/MapTileLayer.cs b/MapControl/Shared/MapTileLayer.cs index 732a3955..c079a501 100644 --- a/MapControl/Shared/MapTileLayer.cs +++ b/MapControl/Shared/MapTileLayer.cs @@ -311,7 +311,7 @@ namespace MapControl var transform = new MatrixTransform { - Matrix = MapProjection.CreateTransformMatrix(viewCenter, scale, scale, -parentMap.Heading, tileCenter) + Matrix = MapProjection.CreateTransformMatrix(viewCenter, scale, -parentMap.Heading, tileCenter) }; var bounds = transform.TransformBounds(new Rect(0d, 0d, parentMap.RenderSize.Width, parentMap.RenderSize.Height)); @@ -332,7 +332,7 @@ namespace MapControl var viewCenter = new Point(parentMap.RenderSize.Width / 2d, parentMap.RenderSize.Height / 2d); ((MatrixTransform)RenderTransform).Matrix = - MapProjection.CreateTransformMatrix(tileOrigin, scale, scale, parentMap.Heading, viewCenter); + MapProjection.CreateTransformMatrix(tileOrigin, scale, parentMap.Heading, viewCenter); } private void UpdateTiles()