File tree Expand file tree Collapse file tree 1 file changed +39
-27
lines changed
Expand file tree Collapse file tree 1 file changed +39
-27
lines changed Original file line number Diff line number Diff line change @@ -33,39 +33,51 @@ export function newSearch(filters, productData) {
3333 const apiKey = store . getState ( ) . mainSlice . apiKey
3434
3535 const query = {
36- //product_id: productId,
3736 datetime : `${ dates [ 0 ] } /${ dates [ 1 ] } ` ,
3837 geometry : geometry . geometry ,
3938 filter : {
40- // op: 'and',
41- // args: []
39+ op : 'and' ,
40+ args : [
41+ {
42+ op : '=' ,
43+ args : [
44+ {
45+ property : 'maxOffNadirAngle'
46+ } ,
47+ filters . maxOffNadirAngle
48+ ]
49+ } ,
50+ {
51+ op : 'in' ,
52+ args : [
53+ {
54+ property : 'sensors'
55+ } ,
56+ [ filters . sensors ]
57+ ]
58+ } ,
59+ {
60+ op : '=' ,
61+ args : [
62+ {
63+ property : 'maxCloudCover'
64+ } ,
65+ filters . maxCloudCover
66+ ]
67+ } ,
68+ {
69+ op : '=' ,
70+ args : [
71+ {
72+ property : 'productResolution'
73+ } ,
74+ filters . productResolution
75+ ]
76+ }
77+ ]
4278 }
4379 }
4480
45- // for (const [key, value] of Object.entries(filters)) {
46- // const lowerBounds = {
47- // op: '>=',
48- // args: [
49- // {
50- // property: key
51- // },
52- // value[0]
53- // ]
54- // }
55- // query.filter.args.push(lowerBounds)
56- // const upperBounds = {
57- // op: '<=',
58- // args: [
59- // {
60- // property: key
61- // },
62- // value[1]
63- // ]
64- // }
65- // query.filter.args.push(upperBounds)
66- // }
67-
68-
6981 SearchService ( query , productData , apiKey )
7082
7183 // const _selectedCollection = store.getState().mainSlice.selectedCollectionData
You can’t perform that action at this time.
0 commit comments