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