|
|
@ -1,4 +1,3 @@ |
|
|
|
import { StyleSheet, View } from "react-native"; |
|
|
|
import React from "react"; |
|
|
|
import useMarkers from "../hooks/selectFromDB"; |
|
|
|
import MapMarker from "../components/MapMarker"; |
|
|
@ -8,11 +7,12 @@ function isRequestedValue( |
|
|
|
renderRain, |
|
|
|
renderFlood, |
|
|
|
renderRiver, |
|
|
|
renderPluviometer |
|
|
|
renderPluviometer, |
|
|
|
renderOfficialPluviometer |
|
|
|
) { |
|
|
|
|
|
|
|
return ( |
|
|
|
(item.name == "pluviometer" && renderPluviometer) || |
|
|
|
(item.name == "officialPluviometer") & renderOfficialPluviometer || |
|
|
|
(item.name == "rain" && renderRain) || |
|
|
|
(item.name == "river" && renderRiver) || |
|
|
|
(item.name == "flood" && renderFlood) |
|
|
@ -25,9 +25,10 @@ function MapMarkerList({ |
|
|
|
renderFlood = true, |
|
|
|
renderRiver = true, |
|
|
|
renderPluviometer = true, |
|
|
|
renderOfficialPluviometer = true, |
|
|
|
}) { |
|
|
|
|
|
|
|
const markers = useMarkers(reload); |
|
|
|
console.log(markers.markers.size); |
|
|
|
return ( |
|
|
|
<> |
|
|
|
{[...markers.markers] |
|
|
@ -37,7 +38,8 @@ function MapMarkerList({ |
|
|
|
renderRain, |
|
|
|
renderFlood, |
|
|
|
renderRiver, |
|
|
|
renderPluviometer |
|
|
|
renderPluviometer, |
|
|
|
renderOfficialPluviometer |
|
|
|
) |
|
|
|
) |
|
|
|
.map(({ ID, ...val }) => { |
|
|
|