diff --git a/MapControl/Shared/MapPanel.cs b/MapControl/Shared/MapPanel.cs index 1e942e3b..9ba52b1c 100644 --- a/MapControl/Shared/MapPanel.cs +++ b/MapControl/Shared/MapPanel.cs @@ -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)