From 9280743c8a992ab5e9f19d0de73803c6f905fb1c Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Thu, 1 Dec 2022 23:01:06 +0100 Subject: [PATCH] Minor improvements --- MapControl/Shared/WmtsTileMatrixSet.cs | 8 ++++---- MapControl/WinUI/Matrix.WinUI.cs | 14 +++++++------- MapControl/WinUI/Point.WinUI.cs | 6 +++--- MapControl/WinUI/Vector.WinUI.cs | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/MapControl/Shared/WmtsTileMatrixSet.cs b/MapControl/Shared/WmtsTileMatrixSet.cs index eece1777..72ca8170 100644 --- a/MapControl/Shared/WmtsTileMatrixSet.cs +++ b/MapControl/Shared/WmtsTileMatrixSet.cs @@ -10,10 +10,6 @@ namespace MapControl { public class WmtsTileMatrixSet { - public string Identifier { get; } - public string SupportedCrs { get; } - public IList TileMatrixes { get; } - public WmtsTileMatrixSet(string identifier, string supportedCrs, IEnumerable tileMatrixes) { if (string.IsNullOrEmpty(identifier)) @@ -35,5 +31,9 @@ namespace MapControl SupportedCrs = supportedCrs; TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList(); } + + public string Identifier { get; } + public string SupportedCrs { get; } + public IList TileMatrixes { get; } } } diff --git a/MapControl/WinUI/Matrix.WinUI.cs b/MapControl/WinUI/Matrix.WinUI.cs index 2bcdef05..db65381d 100644 --- a/MapControl/WinUI/Matrix.WinUI.cs +++ b/MapControl/WinUI/Matrix.WinUI.cs @@ -16,13 +16,6 @@ namespace MapControl /// public struct Matrix { - public double M11 { get; set; } - public double M12 { get; set; } - public double M21 { get; set; } - public double M22 { get; set; } - public double OffsetX { get; set; } - public double OffsetY { get; set; } - public Matrix(double m11, double m12, double m21, double m22, double offsetX, double offsetY) { M11 = m11; @@ -33,6 +26,13 @@ namespace MapControl OffsetY = offsetY; } + public double M11 { get; set; } + public double M12 { get; set; } + public double M21 { get; set; } + public double M22 { get; set; } + public double OffsetX { get; set; } + public double OffsetY { get; set; } + public static implicit operator XamlMedia.Matrix(Matrix m) { return new XamlMedia.Matrix(m.M11, m.M12, m.M21, m.M22, m.OffsetX, m.OffsetY); diff --git a/MapControl/WinUI/Point.WinUI.cs b/MapControl/WinUI/Point.WinUI.cs index 62544f21..9dfa36df 100644 --- a/MapControl/WinUI/Point.WinUI.cs +++ b/MapControl/WinUI/Point.WinUI.cs @@ -9,15 +9,15 @@ namespace MapControl /// public struct Point { - public double X { get; set; } - public double Y { get; set; } - public Point(double x, double y) { X = x; Y = y; } + public double X { get; set; } + public double Y { get; set; } + public static implicit operator Windows.Foundation.Point(Point p) { return new Windows.Foundation.Point(p.X, p.Y); diff --git a/MapControl/WinUI/Vector.WinUI.cs b/MapControl/WinUI/Vector.WinUI.cs index f68600aa..7f64430b 100644 --- a/MapControl/WinUI/Vector.WinUI.cs +++ b/MapControl/WinUI/Vector.WinUI.cs @@ -6,15 +6,15 @@ namespace MapControl { public struct Vector { - public double X { get; set; } - public double Y { get; set; } - public Vector(double x, double y) { X = x; Y = y; } + public double X { get; set; } + public double Y { get; set; } + public static implicit operator Windows.Foundation.Point(Vector v) { return new Windows.Foundation.Point(v.X, v.Y);