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