Fix active markers visibility
This commit is contained in:
parent
e706d0c9fb
commit
a12769f3f5
1 changed files with 1 additions and 8 deletions
|
@ -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()}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue