Browse Source

Adding description info of "river" in MapMarker.

master
GabrielTrettel 4 years ago
parent
commit
d60041d184
  1. 7
      src/app/hooks/selectFromDB.js

7
src/app/hooks/selectFromDB.js

@ -49,6 +49,7 @@ function partsePluviometer(row) {
return null;
}
const description = row["Description"] ? "\n\n" + row["Description"] : "";
displacement += offset;
const i = {
ID: ++ID,
@ -58,7 +59,8 @@ function partsePluviometer(row) {
longitude: row["Longitude"],
},
image: custom_assets.pluviometer,
description: row["Precipitation"] + "mm" + ", " + row["Date"],
description:
row["Precipitation"] + "mm" + ", " + row["Date"] + description,
pictures: row["Images"],
};
console.log(i);
@ -123,6 +125,7 @@ function parseRainLevel(row) {
"Pancada de chuva",
];
const rainIdx = row["RainIdx"];
const description = row["Description"] ? row["Description"] : "";
return {
ID: ++ID,
@ -132,7 +135,7 @@ function parseRainLevel(row) {
longitude: row["Longitude"] + displacement,
},
image: custom_assets.rainLevel[rainIdx],
description: rainLevel[rainIdx],
description: description,
pictures: row["Images"],
};
}

Loading…
Cancel
Save