@regionerne/gis-komponent 0.0.70 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -354,6 +354,8 @@ class LayerHelperService {
|
|
|
354
354
|
const currentIndex$ = new BehaviorSubject(0);
|
|
355
355
|
const layergroup = aMap.getLayers().getArray()
|
|
356
356
|
.find(layergroup => layergroup instanceof OLLayerGroup && layergroup.get('id') === groupId);
|
|
357
|
+
if (!layergroup)
|
|
358
|
+
return;
|
|
357
359
|
const items = layergroup.getLayers().getArray().sort((a, b) => (b.getZIndex() ?? 0) - (a.getZIndex() ?? 0));
|
|
358
360
|
// Handles activating the current item
|
|
359
361
|
const activation$ = currentIndex$.pipe(tap(index => {
|