Skip to content

Commit

Permalink
Activate code for creating config
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMuehlhauserNRCan committed Jan 14, 2025
1 parent 11cea28 commit 751fa7e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/geoview-core/src/geo/layer/other/geocore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,20 +264,20 @@ export class GeoCore {
}

if (layerConfig?.listOfLayerEntryConfig) {
// const newLayers: Promise<TypeGeoviewLayerConfig | undefined>[] = response.layers.map(async (lyr) => {
// const fullConfig = await this.getFullConfig(lyr);
// if (!fullConfig) return Promise.resolve(undefined);
// return GeoCore.mergeLayerEntryConfigs(fullConfig, layerConfig);
// });

// // Set the response layers to the merged config values
// const resolvedLayers = await Promise.all(newLayers);
// resolvedLayers.forEach((lyr, i) => {
// if (lyr) {
// response.layers[i] = lyr;
// }
// });
response.layers[0].listOfLayerEntryConfig = layerConfig.listOfLayerEntryConfig;
const newLayers: Promise<TypeGeoviewLayerConfig | undefined>[] = response.layers.map(async (lyr) => {
const fullConfig = await this.getFullConfig(lyr);
if (!fullConfig) return Promise.resolve(undefined);
return GeoCore.mergeLayerEntryConfigs(fullConfig, layerConfig);
});

// Set the response layers to the merged config values
const resolvedLayers = await Promise.all(newLayers);
resolvedLayers.forEach((lyr, i) => {
if (lyr) {
response.layers[i] = lyr;
}
});
// response.layers[0].listOfLayerEntryConfig = layerConfig.listOfLayerEntryConfig;
}

// For each found geochart associated with the Geocore UUIDs
Expand Down

0 comments on commit 751fa7e

Please sign in to comment.