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 };