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.
 
 
 

22 lines
743 B

function isRequestedValue(item, renderOptions) {
return (
(item.name == "pluviometer" && renderOptions.citzen.pluviometer) ||
(item.name == "automaticPluviometer" &&
renderOptions.oficial.automaticPluviometer) ||
(item.name == "rain" && renderOptions.citzen.rain) ||
(item.name == "riverFlood" && renderOptions.citzen.riverFlood) ||
(item.name == "floodZones" && renderOptions.citzen.floodRisk) ||
(item.name == "susceptibilityAreas" && renderOptions.oficial.susceptibilityAreas)
);
}
function MapMarkerList({ markers, renderOptions }) {
if (!markers) return null;
return [...markers.markers].filter(([_, item]) => {
return isRequestedValue(item, renderOptions);
});
}
export { MapMarkerList };