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

@ -220,7 +220,7 @@ namespace MapControl
private Rect GetViewRect(Rect mapRect)
{
var center = new Point(mapRect.X + mapRect.Width / 2d, mapRect.Y + mapRect.Height / 2d);
var position = parentMap.ViewTransform.MapToViewMatrix.Transform(center);
var position = parentMap.ViewTransform.MapToView(center);
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical &&
!parentMap.InsideViewBounds(position))