Update MapPanel.cs

This commit is contained in:
ClemensFischer 2022-12-08 18:53:59 +01:00
parent 7e7f77afe6
commit a2b3756595

View file

@ -220,7 +220,9 @@ namespace MapControl
protected ViewRect GetViewRect(BoundingBox boundingBox)
{
return GetViewRect(parentMap.MapProjection.BoundingBoxToMapRect(boundingBox));
var mapRect = parentMap.MapProjection.BoundingBoxToMapRect(boundingBox);
return mapRect != null ? GetViewRect(mapRect) : null;
}
protected ViewRect GetViewRect(MapRect mapRect)