I implemented Google Maps using import MapView from 'react-native-map-clustering'. By default, when I add markers, clusters start blinking. Similarly, if I place a marker with custom content, it blinks regardless of setting tracksViewChanges={false}.
When I use this Marker configuration (react-native-maps):
<Marker
tracksViewChanges={false}
key={`marker-${val.id}`}
onPress={() => addressDetailsSelected(val)}
coordinate={{
latitude: val.latitude!,
longitude: val.longitude!,
}}
image={require('./../../theme/assets/png/image.png')} // not blinking
style={{ borderWidth: 1 }}
/>
it works fine. But if I try to add content inside the Marker like:
<Marker
tracksViewChanges={false}
key={`marker-${val.id}`}
onPress={() => addressDetailsSelected(val)}
coordinate={{
latitude: val.latitude!,
longitude: val.longitude!,
}}
style={{ borderWidth: 1 }}
>
<Image
source={require('./../../theme/assets/png/image.png')} // start blinking
/>
</Marker>
it displays correctly but blinks. The same issue occurs with clusters, as I want custom clusters showing the number of markers inside, but I can't achieve this using the image prop in the Marker
react-native-mapslibrary, already commented on the issue, would suggest you to follow the thread for the fix: Thread