Updated ViewTransform

This commit is contained in:
ClemensFischer 2026-01-05 21:27:00 +01:00
parent 9e1c72fda9
commit 03e0258f18
8 changed files with 49 additions and 80 deletions

View file

@ -191,8 +191,7 @@ namespace MapControl
var height = ParentMap.ActualHeight * RelativeImageSize;
var x = (ParentMap.ActualWidth - width) / 2d;
var y = (ParentMap.ActualHeight - height) / 2d;
var mapRect = ParentMap.ViewRectToMap(x, y, width, height);
var mapRect = ParentMap.ViewTransform.ViewToMapMatrix.TransformBounds(new Rect(x, y, width, height));
boundingBox = ParentMap.MapProjection.MapToBoundingBox(mapRect);
if (boundingBox != null)