Skip to content

Commit

Permalink
geosolutions-it#9589: Save layer sourceMetadata info (geosolutions-it…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuren1 authored Nov 27, 2023
1 parent f63e57e commit 170bce7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ export const saveLayer = (layer) => {
isString(layer.rowViewer) ? { rowViewer: layer.rowViewer } : {},
!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 } : {});
};

/**
Expand Down
11 changes: 11 additions & 0 deletions web/client/utils/__tests__/LayersUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) );
Expand Down

0 comments on commit 170bce7

Please sign in to comment.