Added ViewTransform methods

This commit is contained in:
ClemensFischer 2026-01-07 19:39:28 +01:00
parent eee71e9190
commit 26e9b21816
6 changed files with 25 additions and 12 deletions

View file

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