forked from cemaden-educacao/WPD-MobileApp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
971 B
45 lines
971 B
import useMarkers from "../hooks/selectFromDB";
|
|
|
|
function isRequestedValue(
|
|
item,
|
|
renderRain,
|
|
renderFlood,
|
|
renderRiver,
|
|
renderPluviometer,
|
|
renderOfficialPluviometer
|
|
) {
|
|
return (
|
|
(item.name == "pluviometer" && renderPluviometer) ||
|
|
(item.name == "officialPluviometer") & renderOfficialPluviometer ||
|
|
(item.name == "rain" && renderRain) ||
|
|
(item.name == "river" && renderRiver) ||
|
|
(item.name == "flood" && renderFlood)
|
|
);
|
|
}
|
|
|
|
function MapMarkerList({
|
|
markers,
|
|
renderRain = true,
|
|
renderFlood = true,
|
|
renderRiver = true,
|
|
renderPluviometer = true,
|
|
renderOfficialPluviometer = true,
|
|
}) {
|
|
|
|
// FIXME: Resolve this later!!!
|
|
return markers.markers;
|
|
|
|
// return [...markers.markers].filter(([k, item]) => {
|
|
// isRequestedValue(
|
|
// item,
|
|
// renderRain,
|
|
// renderFlood,
|
|
// renderRiver,
|
|
// renderPluviometer,
|
|
// renderOfficialPluviometer
|
|
// )
|
|
// }
|
|
// );
|
|
}
|
|
|
|
export { MapMarkerList };
|