|
@ -6,49 +6,49 @@ function useFiltering(location) { |
|
|
const initialDate = moment().add(1, "days").format("YYYY-MM-DDTHH:mm:ss"); |
|
|
const initialDate = moment().add(1, "days").format("YYYY-MM-DDTHH:mm:ss"); |
|
|
const finalDate = moment().subtract(2, "days").format("YYYY-MM-DDTHH:mm:ss"); |
|
|
const finalDate = moment().subtract(2, "days").format("YYYY-MM-DDTHH:mm:ss"); |
|
|
|
|
|
|
|
|
// console.log(initialDate+"/"+finalDate);
|
|
|
|
|
|
|
|
|
console.log(initialDate+"/"+finalDate); |
|
|
|
|
|
|
|
|
const filters = [ |
|
|
const filters = [ |
|
|
{ |
|
|
{ |
|
|
name: "floodZones", |
|
|
name: "floodZones", |
|
|
socketUrl: new WebSocket( |
|
|
socketUrl: new WebSocket( |
|
|
endpoint + |
|
|
endpoint + |
|
|
`type=FLOODZONES_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` |
|
|
|
|
|
|
|
|
`type=FLOODZONES_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "rain", |
|
|
name: "rain", |
|
|
socketUrl: new WebSocket( |
|
|
socketUrl: new WebSocket( |
|
|
endpoint + |
|
|
endpoint + |
|
|
`type=RAIN_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` |
|
|
|
|
|
|
|
|
`type=RAIN_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "riverFlood", |
|
|
name: "riverFlood", |
|
|
socketUrl: new WebSocket( |
|
|
socketUrl: new WebSocket( |
|
|
endpoint + |
|
|
endpoint + |
|
|
`type=RIVERFLOOD_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` |
|
|
|
|
|
|
|
|
`type=RIVERFLOOD_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "pluviometer", |
|
|
name: "pluviometer", |
|
|
socketUrl: new WebSocket( |
|
|
socketUrl: new WebSocket( |
|
|
endpoint + |
|
|
endpoint + |
|
|
`type=PLUVIOMETER_REGISTRATION&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` |
|
|
|
|
|
|
|
|
`type=PLUVIOMETER_REGISTRATION&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "susceptibilityAreas", |
|
|
name: "susceptibilityAreas", |
|
|
socketUrl: new WebSocket( |
|
|
socketUrl: new WebSocket( |
|
|
endpoint + |
|
|
endpoint + |
|
|
`type=FLOODZONES_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=10` |
|
|
|
|
|
|
|
|
`type=FLOODZONES_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=20` |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "automaticPluviometer", |
|
|
name: "automaticPluviometer", |
|
|
socketUrl: new WebSocket( |
|
|
socketUrl: new WebSocket( |
|
|
endpoint + |
|
|
endpoint + |
|
|
`type=PLUVIOMETERS_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` |
|
|
|
|
|
|
|
|
`type=PLUVIOMETERS_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=20` |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
]; |
|
|
]; |
|
|