diff --git a/packages/context/src/lib/context-manager/shared/context.service.ts b/packages/context/src/lib/context-manager/shared/context.service.ts index 4a004762a..c336cbaa6 100644 --- a/packages/context/src/lib/context-manager/shared/context.service.ts +++ b/packages/context/src/lib/context-manager/shared/context.service.ts @@ -576,19 +576,14 @@ export class ContextService { delete layerFound.sourceOptions[`source`]; delete layerFound.sourceOptions[`format`]; } - const opts = { - baseLayer: layerFound.baseLayer, + delete layerFound.source; + const opts: AnyLayerOptions = { + ...layerFound, title: layer.options.title, zIndex: layer.zIndex, - igoStyle: { - styleByAttribute: layerFoundAs.igoStyle?.styleByAttribute, - clusterBaseStyle: layerFoundAs.igoStyle?.clusterBaseStyle - }, style: layerStyle, - clusterParam: layerFound[`clusterParam`], visible: layer.visible, - opacity: layer.opacity, - sourceOptions: layerFound.sourceOptions + opacity: layer.opacity }; context.layers.push(opts); } else {