Default Pins Appear On Top of Clusters (iOS Only)
I am using the following packages and platforms:
expo: "5.4.12"
react-native: "0.68.2"
react-native-map-clustering: "3.4.2"
react-native-maps: "0.30.2"
I am seeing the following behaviour on iOS:
It seems that when a cluster of pins is created it is possible for one of the default red pins to appear (it does not always happen). Once one of the default pins appears it stays in place regardless of how much I pan or zoom on the map.
I have the following MapView:
<MapView
initialRegion={initialRegion}
onRegionChange={(r) => (region.current = r)}
minPoints={4}
extent={250}
style={{ height: "100%" }}
showsUserLocation={true}
showsPointsOfInterest={false}
showsMyLocationButton={true}
customMapStyle={[
{
featureType: "poi",
stylers: [
{
visibility: "off",
},
],
},
]}
>
{markerList.map((markerInfo) => {
const { lat, lon, icon, id, airport } = markerInfo;
return !lat || !lon ? null : (
<Marker
tracksViewChanges={false}
coordinate={{
latitude: lat as number,
longitude: lon as number,
}}
key={id}
onPress={() => {
selectedAirport.current = airport;
setAirportModal(true);
}}
image={icon}
icon={icon}
/>
);
})}
</MapView>
I have tried a couple of different methods for custom pins including using Svg components, using custom components, and using Image components from react-native, but I can't find anything that prevents these default pins from appearing or what the cause of the issue is.
I have this problem too.
Any updates on this guys?
@lucianod-airble @aeminkyr I solved following this patch to reanimated: https://github.com/l-barbosa/react-native-maps-reanimated-issue/blob/master/patches/react-native-reanimated%2B2.8.0.patch
@lucianod-airble @aeminkyr I solved following this patch to reanimated: https://github.com/l-barbosa/react-native-maps-reanimated-issue/blob/master/patches/react-native-reanimated%2B2.8.0.patch
Thank you @ro-mgh! I won't be able to verify this fix for awhile, but you are not seeing this issue after the patch?
Have anybody found a solution for this problem? For me the patch did not worked.
@vladmarintremend, check the version: "react-native-map-clustering": "3.4.2", "react-native-reanimated": "2.10.0", "react-native-maps": "0.29.3",
Copy paste them and it should work)
For me the patch didn't work as well, even with the correct versions of the dependencies
@ro-mgh Thanks! After changing the react-native-reanimated to 2.10.0 and repatched the library everything worked perfectly.
Issue has been fixed.
@lucianod-airble Hi, could you please give us more information on how you've resolved this ? Did you need to export Expo or not ? Thanks :-)