Skip to content

Commit

Permalink
#9589: Save layer sourceMetadata info (#9736) (#9769)
Browse files Browse the repository at this point in the history
(cherry picked from commit 170bce7)
  • Loading branch information
dsuren1 authored Nov 29, 2023
1 parent b840f2a commit 17540e8
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 @@ -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 } : {});
};

/**
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 17540e8

Please sign in to comment.