From 6fdb611c7d10899950e1af1529168a9869c14e29 Mon Sep 17 00:00:00 2001 From: ClemensF Date: Tue, 14 Jul 2020 17:03:44 +0200 Subject: [PATCH] Update WmsImageLayer.cs --- MapControl/Shared/WmsImageLayer.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MapControl/Shared/WmsImageLayer.cs b/MapControl/Shared/WmsImageLayer.cs index cc6cbf7c..227820c3 100644 --- a/MapControl/Shared/WmsImageLayer.cs +++ b/MapControl/Shared/WmsImageLayer.cs @@ -239,14 +239,15 @@ namespace MapControl } var rect = projection.BoundingBoxToRect(BoundingBox); - var pos = ParentMap.TransformToVisual(Children[1]).Transform(position); // top Image element + var image = Children[1]; // top Image element + var imagePos = ParentMap.TransformToVisual(image).Transform(position); uri += "&CRS=" + projection.GetCrsValue(); uri += "&BBOX=" + projection.GetBboxValue(rect); uri += "&WIDTH=" + (int)Math.Round(ParentMap.ViewTransform.Scale * rect.Width); uri += "&HEIGHT=" + (int)Math.Round(ParentMap.ViewTransform.Scale * rect.Height); - uri += "&I=" + (int)Math.Round(pos.X); - uri += "&J=" + (int)Math.Round(pos.Y); + uri += "&I=" + (int)Math.Round(imagePos.X); + uri += "&J=" + (int)Math.Round(imagePos.Y); uri += "&INFO_FORMAT=text/xml"; }