Fix active markers visibility

This commit is contained in:
Maarten 2024-08-13 13:11:28 +02:00
parent e706d0c9fb
commit a12769f3f5

View file

@ -95,13 +95,6 @@ export default function MapScreen() {
return list; return list;
} }
// Get all markers that needs to be visible
const activeMarkers = () => {
return markers.filter( (marker: any) => {
return getActiveTypes().includes( marker.waste_type );
} );
}
const handleCalloutPress = (id: any) => { const handleCalloutPress = (id: any) => {
console.log('set active', id); console.log('set active', id);
setActiveCalloutId( id ); setActiveCalloutId( id );
@ -137,7 +130,7 @@ export default function MapScreen() {
zoomLevel={13} zoomLevel={13}
animationMode={'none'} animationMode={'none'}
/> />
{activeMarkers().map( (marker: any, index: any) => ( {markers.filter( (marker: any) => getActiveTypes().includes( marker.waste_type ) ).map( (marker: any, index: any) => (
<PointAnnotation <PointAnnotation
key={marker.id.toString()} key={marker.id.toString()}
id={marker.id.toString()} id={marker.id.toString()}