diff --git a/public/app/plugins/panel/geomap/utils/getLayersExtent.ts b/public/app/plugins/panel/geomap/utils/getLayersExtent.ts index fe73c991a6a..8284ac656e8 100644 --- a/public/app/plugins/panel/geomap/utils/getLayersExtent.ts +++ b/public/app/plugins/panel/geomap/utils/getLayersExtent.ts @@ -12,7 +12,9 @@ export function getLayersExtent(layers: Collection): Extent { if (l instanceof LayerGroup) { return getLayerGroupExtent(l); } else if (l instanceof VectorLayer) { - return l.getSource().getExtent() ?? []; + return [l.getSource().getExtent()] ?? []; + } else { + return []; } }) .reduce(extend, createEmpty());