Added MapBase.MapBounds and MapBase.GeoBounds

This commit is contained in:
ClemensFischer 2025-12-13 18:28:07 +01:00
parent 4db96b9e83
commit 263deb5fd6
10 changed files with 95 additions and 100 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.MapToView(center);
var position = parentMap.ViewTransform.MapToViewMatrix.Transform(center);
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical &&
!parentMap.InsideViewBounds(position))