diff --git a/src/app/modules/map-config/components/layers/layers.component.ts b/src/app/modules/map-config/components/layers/layers.component.ts index 2829bb6a..95cf50e6 100644 --- a/src/app/modules/map-config/components/layers/layers.component.ts +++ b/src/app/modules/map-config/components/layers/layers.component.ts @@ -186,6 +186,7 @@ export class LayersComponent implements OnInit, OnDestroy { paint, filter: modeValues.styleStep.filter, metadata: ConfigMapExportHelper.getLayerMetadata(collection, collectionDisplayName, + layerFg.value.clusterFg?.geometryStep?.aggType, layerFg.mode, modeValues, colorService, taggableFields) }; return layer; diff --git a/src/app/services/main-form-manager/config-map-export-helper.ts b/src/app/services/main-form-manager/config-map-export-helper.ts index aab3900a..a3372a38 100644 --- a/src/app/services/main-form-manager/config-map-export-helper.ts +++ b/src/app/services/main-form-manager/config-map-export-helper.ts @@ -87,7 +87,8 @@ export class ConfigMapExportHelper { metadata: { collection: layer.metadata.collection, collectionDisplayName: layer.metadata.collectionDisplayName, - isScrollableLayer: false + isScrollableLayer: false, + aggType: layerFg.value?.clusterFg?.geometryStep?.aggType ? layerFg.value?.clusterFg?.geometryStep?.aggType : null }, filter: layer.filter, layout: { @@ -163,15 +164,15 @@ export class ConfigMapExportHelper { return mapConfig; } - public static getLayerMetadata(collection: string, collectionDisplayName: string, + public static getLayerMetadata(collection: string, collectionDisplayName: string, aggType:string, mode: LAYER_MODE, modeValues, colorService: ArlasColorService, taggableFields?: Set): LayerMetadata { const metadata: LayerMetadata = { collection, - collectionDisplayName + collectionDisplayName, + aggType: aggType ?? null }; - // with this prop we ll be able to restore the good geomType when we ll reload the layer; if (metadata && metadata.hasOwnProperty('hiddenProps')) { delete metadata['hiddenProps']; } @@ -211,7 +212,8 @@ export class ConfigMapExportHelper { layout, paint, metadata: this.getLayerMetadata(layerFg.customControls.collection.value, layerFg.customControls.collectionDisplayName.value, - mode, modeValues, colorService, taggableFields) + layerFg.value.clusterFg?.geometryStep?.aggType, + mode, modeValues, colorService, taggableFields) }; /** 'all' is the operator that allows to apply an "AND" operator */ layer.filter = ['all'];