analuizaff
3 years ago
8 changed files with 159 additions and 93 deletions
-
16src/app/api/Websockets/SocketClient.js
-
5src/app/components/MapMarkerList.js
-
19src/app/components/map/LeafLetMap.js
-
1src/app/components/map/Map.html
-
16src/app/components/map/OpenStreetMap.js
-
86src/app/hooks/useFiltering.js
-
98src/app/hooks/useFormsAswers.js
-
11src/app/screens/MapFeedScreen.js
@ -1,59 +1,41 @@ |
|||||
function useFiltering() { |
function useFiltering() { |
||||
const filters = { |
const filters = { |
||||
"citizen": |
|
||||
[ |
|
||||
{ |
|
||||
name: "floodZones", |
|
||||
endpoint: "type=FLOODZONES_FORM&lat=-9.98132&lon=-67.81544&buffer=5000&limit=3", |
|
||||
response: null, |
|
||||
|
|
||||
}, { |
|
||||
name: "rain", |
|
||||
endpoint: "type=RAIN_FORM&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
|
||||
response: null, |
|
||||
}, |
|
||||
{ |
|
||||
name: "riverFlood", |
|
||||
endpoint: "type=RIVERFLOOD_FORM&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
|
||||
response: null, |
|
||||
}, |
|
||||
{ |
|
||||
name: "pluviometer", |
|
||||
endpoint: "type=PLUVIOMETER_REGISTRATION&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
|
||||
response: null, |
|
||||
} |
|
||||
], |
|
||||
"oficial": |
|
||||
[ |
|
||||
{ |
|
||||
name: "susceptibilityAreas", |
|
||||
endpoint: "type=FLOODZONES_OFFICIAL&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
|
||||
response: null, |
|
||||
}, |
|
||||
{ |
|
||||
name: "automaticPluviometer", |
|
||||
endpoint: "type=PLUVIOMETERS_OFFICIAL&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
|
||||
response: null, |
|
||||
} |
|
||||
] |
|
||||
|
"forms": [ |
||||
|
{ |
||||
|
name: "floodZones", |
||||
|
endpoint: "type=FLOODZONES_FORM&lat=-9.98132&lon=-67.81544&buffer=5000&limit=3", |
||||
|
response: null, |
||||
|
|
||||
|
}, { |
||||
|
name: "rain", |
||||
|
endpoint: "type=RAIN_FORM&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
||||
|
response: null, |
||||
|
}, |
||||
|
{ |
||||
|
name: "riverFlood", |
||||
|
endpoint: "type=RIVERFLOOD_FORM&lat=-9.98132&lon=-67.81544&buffer=5000&limit=5", |
||||
|
response: null, |
||||
|
}, |
||||
|
{ |
||||
|
name: "pluviometer", |
||||
|
endpoint: "type=PLUVIOMETER_REGISTRATION&lat=-9.98132&lon=-67.81544&buffer=5000&limit=5", |
||||
|
response: null, |
||||
|
}, |
||||
|
{ |
||||
|
name: "susceptibilityAreas", |
||||
|
endpoint: "type=FLOODZONES_OFFICIAL&lat=-9.98132&lon=-67.81544&buffer=5000&limit=3", |
||||
|
response: null, |
||||
|
}, |
||||
|
{ |
||||
|
name: "automaticPluviometer", |
||||
|
endpoint: "type=PLUVIOMETERS_OFFICIAL&lat=-9.98132&lon=-67.81544&buffer=5000&limit=1", |
||||
|
response: null, |
||||
|
} |
||||
|
] |
||||
|
|
||||
} |
} |
||||
|
|
||||
return filters; |
return filters; |
||||
} |
} |
||||
|
|
||||
const endPoint_susceptibilityAreas = () => { |
|
||||
return "type=FLOODZONES_OFFICIAL" |
|
||||
+ "&lat=-9.98132" |
|
||||
+ "&lon=-67.81544" |
|
||||
+ "&buffer=5000" |
|
||||
+ "&limit=1" |
|
||||
} |
|
||||
|
|
||||
const endPoint_automaticPluviometer = () => { |
|
||||
return "type=PLUVIOMETERS_OFFICIAL" |
|
||||
+ "&lat=-9.98132" |
|
||||
+ "&lon=-67.81544" |
|
||||
+ "&buffer=5000" |
|
||||
+ "&limit=1" |
|
||||
} |
|
||||
export { endPoint_susceptibilityAreas, endPoint_automaticPluviometer, useFiltering }; |
|
||||
|
export { useFiltering }; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue