Skip to content

Commit 31b00d8

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 e434005 commit 31b00d8

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
@@ -538,6 +538,7 @@ function getExternalLayer(
538538
return layerUtils.makeExternalWMSLayer({
539539
...getLayerAttributes(capabilities, layer, parents ?? [], outputProjection, ignoreErrors),
540540
format: 'png',
541+
...initialValues,
541542
isLoading: false,
542543
getFeatureInfoCapability: getFeatureInfoCapability(capabilities, ignoreErrors),
543544
currentYear,

0 commit comments

Comments
 (0)