Browse Source

adding time filtering to '/formsanswers' endpoint

master
analuizaff 3 years ago
parent
commit
27fa40b2bc
  1. 4
      src/app/hooks/useFiltering.js

4
src/app/hooks/useFiltering.js

@ -11,14 +11,14 @@ function useFiltering(location) {
name: "floodZones", name: "floodZones",
socketUrl: new WebSocket( socketUrl: new WebSocket(
"wss://waterproofing.geog.uni-heidelberg.de/wss/hot/formsanswers?" + "wss://waterproofing.geog.uni-heidelberg.de/wss/hot/formsanswers?" +
`type=FLOODZONES_FORM&lat=${location.lat}&lon=${location.long}&buffer=5000&limit=5`
`type=FLOODZONES_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=5000&limit=5`
), ),
}, },
{ {
name: "rain", name: "rain",
socketUrl: new WebSocket( socketUrl: new WebSocket(
"wss://waterproofing.geog.uni-heidelberg.de/wss/hot/formsanswers?" + "wss://waterproofing.geog.uni-heidelberg.de/wss/hot/formsanswers?" +
`type=RAIN_FORM&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=30`
`type=RAIN_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=30`
), ),
}, },
{ {

Loading…
Cancel
Save