|
|
@ -5,7 +5,7 @@ import assets from "../config/assets"; |
|
|
|
|
|
|
|
const custom_assets = { |
|
|
|
pluviometer: assets.pluviometer, |
|
|
|
floodZones: assets.floodZones.floodIcon, |
|
|
|
floodZones: assets.floodZones, |
|
|
|
riverLevel: ["low", "normal", "high", "flooding"].map((key) => { |
|
|
|
return assets.riverLevel[key]; |
|
|
|
}), |
|
|
@ -23,7 +23,7 @@ const custom_assets = { |
|
|
|
|
|
|
|
// NOTE: For debug pourposes, every icon will be placed some `offset` from
|
|
|
|
// another. In final release, offset must be assigned to 0.0
|
|
|
|
var offset = 0.001; |
|
|
|
var offset = 0.0001; |
|
|
|
var displacement = 0; |
|
|
|
|
|
|
|
var ID = 0; |
|
|
@ -50,7 +50,7 @@ function partsePluviometer(row) { |
|
|
|
} |
|
|
|
|
|
|
|
displacement += offset; |
|
|
|
return { |
|
|
|
const i = { |
|
|
|
ID: ++ID, |
|
|
|
title: "Pluviometro", |
|
|
|
coordinate: { |
|
|
@ -60,6 +60,8 @@ function partsePluviometer(row) { |
|
|
|
image: custom_assets.pluviometer, |
|
|
|
description: row["Pluviometer"], |
|
|
|
}; |
|
|
|
console.log(i); |
|
|
|
return i; |
|
|
|
} |
|
|
|
|
|
|
|
function parseFloodZones(row) { |
|
|
@ -75,7 +77,10 @@ function parseFloodZones(row) { |
|
|
|
latitude: row["Latitude"], |
|
|
|
longitude: row["Longitude"] + displacement, |
|
|
|
}, |
|
|
|
image: custom_assets.floodIcon, |
|
|
|
image: |
|
|
|
row["Passable"] == 0 |
|
|
|
? custom_assets.floodZones.passable |
|
|
|
: custom_assets.floodZones.notPassable, |
|
|
|
description: row["Description"], |
|
|
|
}; |
|
|
|
} |
|
|
@ -86,7 +91,7 @@ function parseRiverLevel(row) { |
|
|
|
} |
|
|
|
|
|
|
|
displacement += offset; |
|
|
|
const riverLevel = ["Baixo", "Rio normal", "Alto", "Transfordando"]; |
|
|
|
const riverLevel = ["Baixo", "Rio normal", "Alto", "Transbordando"]; |
|
|
|
const riverIdx = row["RiverIdx"]; |
|
|
|
return { |
|
|
|
ID: ++ID, |
|
|
|