From a7ff9fe97a52d05599c447562386fa7479cc1e5b Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Thu, 29 Aug 2024 10:15:50 +0200 Subject: [PATCH] Update WmsImageLayer.cs --- MapControl/Shared/WmsImageLayer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MapControl/Shared/WmsImageLayer.cs b/MapControl/Shared/WmsImageLayer.cs index bad9353a..a97d58ef 100644 --- a/MapControl/Shared/WmsImageLayer.cs +++ b/MapControl/Shared/WmsImageLayer.cs @@ -228,9 +228,9 @@ namespace MapControl /// protected virtual string GetMapRequestUri(BoundingBox boundingBox) { - var rect = ParentMap.MapProjection.BoundingBoxToMap(boundingBox); + var mapRect = ParentMap.MapProjection.BoundingBoxToMap(boundingBox); - if (!rect.HasValue) + if (!mapRect.HasValue) { return null; } @@ -246,9 +246,9 @@ namespace MapControl { "STYLES", WmsStyles ?? "" }, { "FORMAT", "image/png" }, { "CRS", GetCrsValue() }, - { "BBOX", GetBboxValue(rect.Value) }, - { "WIDTH", Math.Round(viewScale * rect.Value.Width).ToString("F0") }, - { "HEIGHT", Math.Round(viewScale * rect.Value.Height).ToString("F0") } + { "BBOX", GetBboxValue(mapRect.Value) }, + { "WIDTH", Math.Round(viewScale * mapRect.Value.Width).ToString("F0") }, + { "HEIGHT", Math.Round(viewScale * mapRect.Value.Height).ToString("F0") } }); }