diff --git a/src/parser/SHOGunApplicationUtil.ts b/src/parser/SHOGunApplicationUtil.ts index 4e4d43eaf..09aa635b4 100644 --- a/src/parser/SHOGunApplicationUtil.ts +++ b/src/parser/SHOGunApplicationUtil.ts @@ -407,8 +407,6 @@ class SHOGunApplicationUtil { } }); - source.set('legendUrl', legendUrl); - const wmtsLayer = new OlTileLayer({ source, minResolution, @@ -418,6 +416,8 @@ class SHOGunApplicationUtil { this.setLayerProperties(wmtsLayer, layer); + wmtsLayer.set('legendUrl', legendUrl); + return wmtsLayer; }