diff --git a/src/store/modules/layers.store.js b/src/store/modules/layers.store.js index 7bee3dd2d..ec5ccbe45 100644 --- a/src/store/modules/layers.store.js +++ b/src/store/modules/layers.store.js @@ -132,8 +132,9 @@ const getters = { * @returns {KMLLayer | null} */ activeKmlLayer: (state) => - state.activeLayers.find((layer) => layer.type === LayerTypes.KML && !layer.isExternal) ?? - null, + state.activeLayers.findLast( + (layer) => layer.visible && layer.type === LayerTypes.KML && !layer.isExternal + ) ?? null, /** * All layers in the config that have the flag `background` to `true` (that can be shown as a