From 9e1c72fda9ecbbcb0f08748c11a31935ddfeb163 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Fri, 2 Jan 2026 16:52:41 +0100 Subject: [PATCH] Updated WmsImageLayer --- MapControl/Shared/WmsImageLayer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MapControl/Shared/WmsImageLayer.cs b/MapControl/Shared/WmsImageLayer.cs index 53a5a3f7..c41754f2 100644 --- a/MapControl/Shared/WmsImageLayer.cs +++ b/MapControl/Shared/WmsImageLayer.cs @@ -269,14 +269,14 @@ namespace MapControl if (ParentMap.ViewTransform.Rotation != 0d) { + var transform = new Matrix(1d, 0d, 0d, 1d, -width / 2d, -height / 2d); width = ParentMap.ViewTransform.Scale * bbox.Width; height = ParentMap.ViewTransform.Scale * bbox.Height; #if AVALONIA - var transform = Matrix.CreateTranslation(-ParentMap.ActualWidth / 2d, -ParentMap.ActualHeight / 2d) - * Matrix.CreateRotation(Matrix.ToRadians(-ParentMap.ViewTransform.Rotation)) - * Matrix.CreateTranslation(width / 2d, height / 2d); + transform = transform + * Matrix.CreateRotation(Matrix.ToRadians(-ParentMap.ViewTransform.Rotation)) + * Matrix.CreateTranslation(width / 2d, height / 2d); #else - var transform = new Matrix(1d, 0d, 0d, 1d, -ParentMap.ActualWidth / 2d, -ParentMap.ActualHeight / 2d); transform.Rotate(-ParentMap.ViewTransform.Rotation); transform.Translate(width / 2d, height / 2d); #endif