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;
}
// 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) => {
console.log('set active', id);
setActiveCalloutId( id );
@ -137,7 +130,7 @@ export default function MapScreen() {
zoomLevel={13}
animationMode={'none'}
/>
{activeMarkers().map( (marker: any, index: any) => (
{markers.filter( (marker: any) => getActiveTypes().includes( marker.waste_type ) ).map( (marker: any, index: any) => (
<PointAnnotation
key={marker.id.toString()}
id={marker.id.toString()}