Browse Source

updating polygons object structure

master
analuizaff 3 years ago
parent
commit
56c04682d3
  1. 4
      src/app/hooks/useFiltering.js
  2. 10
      src/app/hooks/useSocketMarkers.js

4
src/app/hooks/useFiltering.js

@ -39,14 +39,14 @@ function useFiltering(location) {
name: "susceptibilityAreas", name: "susceptibilityAreas",
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_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=3`
`type=FLOODZONES_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15`
), ),
}, },
{ {
name: "automaticPluviometer", name: "automaticPluviometer",
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=PLUVIOMETERS_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=5`
`type=PLUVIOMETERS_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=500000&limit=10`
), ),
}, },
]; ];

10
src/app/hooks/useSocketMarkers.js

@ -138,12 +138,7 @@ function buildPolygonsObject(response, name) {
return { return {
ID: r.formsanswersid, ID: r.formsanswersid,
name: name, name: name,
title: "Titulo", //response.fieldsanswerssituation
address: "Endereço", //response.fieldsanswerseventaddress,
coordinate: coordinate, coordinate: coordinate,
date: "data" + " | " + "hora", //response.fieldsanswerseventdate + " | " + response.fieldsanswerseventtime,
description: "comentário", //response.fielsanswercomment,
logo: custom_assets.pluviometer,
pictures: null, pictures: null,
image: "", //getMarkerImage(answer.name), image: "", //getMarkerImage(answer.name),
}; };
@ -151,12 +146,7 @@ function buildPolygonsObject(response, name) {
return { return {
ID: r.formsanswersid, ID: r.formsanswersid,
name: name, name: name,
title: "Titulo", //response.fieldsanswerssituation
address: "Endereço", //response.fieldsanswerseventaddress,
coordinate: [null, null], coordinate: [null, null],
date: "data" + " | " + "hora", //response.fieldsanswerseventdate + " | " + response.fieldsanswerseventtime,
description: "comentário", //response.fielsanswercomment,
logo: custom_assets.pluviometer,
pictures: null, pictures: null,
image: "", //getMarkerImage(answer.name), image: "", //getMarkerImage(answer.name),
}; };

Loading…
Cancel
Save