Skip to content

Commit 6c7fe50

Browse files
committed
PB-1383: initial values not included in external layers
Issue: When loading an external WMS layer, the initial values (like the visibility or opacity) were not passed to the layer, which meant that on startup, we would automatically lose their initial state. Fix: We add the initial values as parameters to the `makeExternalWMSLayer` function.
1 parent add57f7 commit 6c7fe50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/layers/src/parsers/WMSCapabilitiesParser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ function getExternalLayer(
524524
return layerUtils.makeExternalWMSLayer({
525525
...getLayerAttributes(capabilities, layer, parents ?? [], outputProjection, ignoreErrors),
526526
format: 'png',
527+
...initialValues,
527528
isLoading: false,
528529
getFeatureInfoCapability: getFeatureInfoCapability(capabilities, ignoreErrors),
529530
currentYear,

0 commit comments

Comments
 (0)