Canadian-Geospatial-Platform / geoview

Canadian Geospatial Platform Viewer / Visualiseur de la Plateforme Géospatiale Canadienne
Other
22 stars 32 forks source link

[REFACTOR] Config utility fetch method #2253

Open jolevesq opened 3 months ago

jolevesq commented 3 months ago

Is there an existing issue for this?

Who request this Feature

GeoView Team

User Story

Create utility method for the fetch that return promise. The caller will use the value to set is stuff. Can be use from within config and outside too.

This function does all the fetching with a promise resolve all

So static fetching does ALL fetching for ALL metadata and - return promiseALL with all structure (group/layer)

We can call this static function to get JSON object.

geoviewConfigObject will call this method to receive the overall config service/layer metadata

geoviewConfigObject will call createConfig and pass the metadata JSON object to start creation

We can have the geoviewLayer config to hold complexity of fetching by layer type and static method create the object from this type and return the fetching.... but the fetching is done ONCE and return ALL. The static become a redirect

Then entryConfig receive a JSON object and the entryConfig return the geoviewConfig with value set by the metadata provided by the input - NO FETCH

No fetching in geoviewLayer.Entry.... the static function receive url, layer type and ids. This function can fetch itself everything or rely on geoviewLayer object to call a fetch that return ALL

Implementation UI

No response