Markers (whether custom or default) aren't showing on my map. I tried using custom markers using Image and view components too.. still no success. Please help...ask me for more details if you want..
My RN version = 0.80.1 react-native-maps = 1.21.0 newArchEnabled false
my code is as under
import MapView {Marker, PROVIDER_GOOGLE} from 'react-native-maps';
//other part of the code
return(
<View style={{ flex: 1, backgroundColor: '#0000' }}>
<MapView
ref={mapRef}
style={StyleSheet.absoluteFillObject}
provider={PROVIDER_GOOGLE}
initialRegion={{
latitude: 20.5937,
longitude: 78.9629,
latitudeDelta: 40,
longitudeDelta: 40,
}}
onMapReady={() => {
console.log('---MAP_READY---', agentLoc);
if (agentLoc?.latitude && agentLoc?.longitude) {
setTimeout(() => animateTo(agentLoc, 'READY_TO_AGENT'), 200);
}
}}
onLayout={() => {
console.log('---MAP_LAYOUT---', agentLoc);
if (agentLoc?.latitude && agentLoc?.longitude) {
setTimeout(() => animateTo(agentLoc, 'LAYOUT_TO_AGENT'), 200);
}
}}
>
{agentLoc && (
<Marker
identifier="agent"
coordinate={{ latitude: Number(agentLoc.latitude), longitude:Number(agentLoc.longitude) }}
title="Agent"
pinColor="tomato"
/>
)}
</MapView>
</View>
)