From 28f65140c4d231fd4ac282bea0f820f8f3eb8699 Mon Sep 17 00:00:00 2001 From: Clemens Date: Thu, 28 Apr 2022 18:34:30 +0200 Subject: [PATCH] Reworked MapGraticule --- MapControl/Shared/MapGraticule.cs | 159 ++++++++++++++----------- MapControl/WPF/MapGraticule.WPF.cs | 50 ++++---- MapControl/WinUI/MapGraticule.WinUI.cs | 20 +--- 3 files changed, 116 insertions(+), 113 deletions(-) diff --git a/MapControl/Shared/MapGraticule.cs b/MapControl/Shared/MapGraticule.cs index d59c6dcb..3c37466f 100644 --- a/MapControl/Shared/MapGraticule.cs +++ b/MapControl/Shared/MapGraticule.cs @@ -28,10 +28,20 @@ namespace MapControl { private class Label { - public string LatitudeText { get; set; } - public string LongitudeText { get; set; } - public Point Position { get; set; } - public double Rotation { get; set; } + public Label(string latText, string lonText, double x, double y, double rotation) + { + LatitudeText = latText; + LongitudeText = lonText; + X = x; + Y = y; + Rotation = rotation; + } + + public string LatitudeText { get; } + public string LongitudeText { get; } + public double X { get; } + public double Y { get; } + public double Rotation { get; } } private const double LineInterpolationResolution = 2d; @@ -96,7 +106,7 @@ namespace MapControl labelFormat, hemisphere, seconds / 3600, seconds / 60 % 60, seconds % 60); } - private void AddLabel(ICollection