From 94c3faf8051eaaaaeda9d15c405c74c5cc297d08 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Thu, 29 Aug 2024 10:56:41 +0200 Subject: [PATCH] Update MapPanel.cs --- MapControl/Shared/MapPanel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MapControl/Shared/MapPanel.cs b/MapControl/Shared/MapPanel.cs index c37a2d31..b27a6543 100644 --- a/MapControl/Shared/MapPanel.cs +++ b/MapControl/Shared/MapPanel.cs @@ -216,14 +216,14 @@ namespace MapControl protected ViewRect GetViewRect(Rect mapRect) { - var rectCenter = new Point(mapRect.X + mapRect.Width / 2d, mapRect.Y + mapRect.Height / 2d); - var position = parentMap.ViewTransform.MapToView(rectCenter); + var center = new Point(mapRect.X + mapRect.Width / 2d, mapRect.Y + mapRect.Height / 2d); + var position = parentMap.ViewTransform.MapToView(center); var projection = parentMap.MapProjection; if (projection.Type <= MapProjectionType.NormalCylindrical && !InsideViewport(position)) { - var location = projection.MapToLocation(rectCenter); + var location = projection.MapToLocation(center); if (location != null) {