Geomap: Fix layer extent (#51956)

pull/52051/head
Alexander Zobnin 3 years ago committed by GitHub
parent f1960b8ffc
commit 958e1b6ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/plugins/panel/geomap/utils/getLayersExtent.ts

@ -12,7 +12,9 @@ export function getLayersExtent(layers: Collection<BaseLayer>): 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());

Loading…
Cancel
Save