Skip to content

Commit

Permalink
fixed spatial extent param and removed spatial/temporal from keyword …
Browse files Browse the repository at this point in the history
…only
  • Loading branch information
johnweng001 committed Jun 14, 2023
1 parent 7654652 commit 933e55b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/search/geosearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ const GeoSearch = (
const spatArray = spatfilters.extents.map((fs: number) => spatemps[language][fs]);
if (spatArray.indexOf('SPATIALEXTENT') > -1) {
searchParams.bbox = `${boundbox._southWest.lat}|${boundbox._southWest.lng}|${boundbox._northEast.lat}|${boundbox._northEast.lng}`;
searchParams.south = boundbox._southWest.lat;
searchParams.west = boundbox._southWest.lng;
searchParams.north = boundbox._northEast.lat;
searchParams.east = boundbox._northEast.lng;
}
if (spatArray.indexOf('TEMPORALEXTENT') > -1) {
searchParams.datetime = `${spatfilters.startDate}|${spatfilters.endDate}`;
Expand Down Expand Up @@ -624,16 +628,21 @@ const GeoSearch = (
} else if (aParams.stac) {
delete aParams.stac;
}
/*
if (spatfilters.extents.length > 0) {
const spatArray = spatfilters.extents.map((fs: number) => spatemps[language][fs]);
if (spatArray.indexOf('SPATIALEXTENT') > -1) {
searchParams.bbox = `${boundbox['_southWest'].lat}|${boundbox['_southWest'].lng}|${boundbox['_northEast'].lat}|${boundbox['_northEast'].lng}`;
searchParams.south = boundbox._southWest.lat;
searchParams.west = boundbox._southWest.lng;
searchParams.north = boundbox._northEast.lat;
searchParams.east = boundbox._northEast.lng;
}
if (spatArray.indexOf('TEMPORALEXTENT') > -1) {
searchParams.datetime = `${spatfilters.startDate}|${spatfilters.endDate}`;
}
//aParams.datetime = spatialArray;
}
}*/
if (found) {
searchParams.foundational = 'true';
aParams.foundational = 'true';
Expand Down Expand Up @@ -1085,6 +1094,7 @@ const GeoSearch = (
{t('filter.filterby')}:
</h3>
<div className="filters-wrap">
{/*
<SpatialTemporalSearchFilter
filtertitle={t('filter.spatemp.title')}
filtervalues={spatemps[language]}
Expand All @@ -1099,6 +1109,7 @@ const GeoSearch = (
temporalDirection={isMobile ? 'row' : 'column'}
gridWidth={isMobile ? '100%' : '50%'}
/>
*/}
{/*
<SearchFilter
filtertitle={t('filter.stac')}
Expand Down

0 comments on commit 933e55b

Please sign in to comment.