mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
Geomap: Fix layer extent (#51956)
This commit is contained in:
parent
f1960b8ffc
commit
958e1b6ad0
@ -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…
Reference in New Issue
Block a user