From b69c2de3f41e7737ceec919214f0748634d9dfd3 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 23 Nov 2023 15:56:45 +0100 Subject: [PATCH] Fix: actually apply preferred background layer --- src/Logic/Actors/PreferredRasterLayerSelector.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Logic/Actors/PreferredRasterLayerSelector.ts b/src/Logic/Actors/PreferredRasterLayerSelector.ts index a4c38512a..a1c8e3138 100644 --- a/src/Logic/Actors/PreferredRasterLayerSelector.ts +++ b/src/Logic/Actors/PreferredRasterLayerSelector.ts @@ -48,6 +48,7 @@ export class PreferredRasterLayerSelector { this._preferredBackgroundLayer.addCallbackD((_) => self.updateLayer()) this._availableLayers.addCallbackD((_) => self.updateLayer()) + self.updateLayer() } /** @@ -63,6 +64,7 @@ export class PreferredRasterLayerSelector { const foundLayer = isCategory ? available.find((l) => l.properties.category === targetLayerId) : available.find((l) => l.properties.id === targetLayerId) + console.debug("Updating background layer to", foundLayer.id,{targetLayerId, queryParam:this._queryParameter.data, preferred: this._preferredBackgroundLayer.data, isCategory}) if (foundLayer) { this._rasterLayerSetting.setData(foundLayer) return true