diff --git a/web/client/utils/LayersUtils.js b/web/client/utils/LayersUtils.js index 8cfca18d72..1cd8dd6917 100644 --- a/web/client/utils/LayersUtils.js +++ b/web/client/utils/LayersUtils.js @@ -656,7 +656,8 @@ export const saveLayer = (layer) => { layer.tileGridCacheSupport ? { tileGridCacheSupport: layer.tileGridCacheSupport } : {}, !isNil(layer.forceProxy) ? { forceProxy: layer.forceProxy } : {}, !isNil(layer.disableFeaturesEditing) ? { disableFeaturesEditing: layer.disableFeaturesEditing } : {}, - layer.pointCloudShading ? { pointCloudShading: layer.pointCloudShading } : {}); + layer.pointCloudShading ? { pointCloudShading: layer.pointCloudShading } : {}, + !isNil(layer.sourceMetadata) ? { sourceMetadata: layer.sourceMetadata } : {}); }; /** diff --git a/web/client/utils/__tests__/LayersUtils-test.js b/web/client/utils/__tests__/LayersUtils-test.js index 4354ed5394..bba3662a68 100644 --- a/web/client/utils/__tests__/LayersUtils-test.js +++ b/web/client/utils/__tests__/LayersUtils-test.js @@ -1260,6 +1260,17 @@ describe('LayersUtils', () => { l => { expect(l.pointCloudShading).toBeTruthy(); } + ], + // Save sourceMetadata + [ + { + sourceMetadata: { + crs: "EPSG:3946" + } + }, + l => { + expect(l.sourceMetadata).toBeTruthy(); + } ] ]; layers.map(([layer, test]) => test(LayersUtils.saveLayer(layer)) );