From a121e0265a439117071f0463ee80da967be27127 Mon Sep 17 00:00:00 2001 From: Daniel da Silva Date: Tue, 12 Dec 2023 11:52:43 +0000 Subject: [PATCH] Add analysis parameters support to exploration page --- app/scripts/components/exploration/analysis-data.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/scripts/components/exploration/analysis-data.ts b/app/scripts/components/exploration/analysis-data.ts index 5c4be6ecf..3ef08589f 100644 --- a/app/scripts/components/exploration/analysis-data.ts +++ b/app/scripts/components/exploration/analysis-data.ts @@ -193,6 +193,8 @@ export async function requestDatasetTimeseriesData({ const tileEndpointToUse = datasetData.tileApiEndpoint ?? process.env.API_RASTER_ENDPOINT ?? ''; + const analysisParams = datasetData.analysis?.sourceParams ?? {}; + const layerStatistics = await Promise.all( assets.map(async ({ date, url }) => { const statistics = await concurrencyManager.queue( @@ -202,10 +204,10 @@ export async function requestDatasetTimeseriesData({ ['analysis', id, 'asset', url, aoi], async ({ signal }) => { const { data } = await axios.post( - `${tileEndpointToUse}/cog/statistics?url=${url}`, + `${tileEndpointToUse}/cog/statistics`, // Making a request with a FC causes a 500 (as of 2023/01/20) fixAoiFcForStacSearch(aoi), - { signal } + { params: { url, ...analysisParams }, signal } ); return { date,