I am using react-native-maps (v-0.16.4) It works fine with ios but MapView.marker is not working on android
the complete error statement is-
MapMarker has no propTypes for native prop 'AIRMapMarker.testID' of native type string. If you have not changed this prop yourself, this usually means that your version of native code and Javascript code are out of sync. Updating both should make this error go away.
this is image for error description
My map file is-
<MapView
provider={Platform.OS === 'ios' ? PROVIDER_DEFAULT : PROVIDER_GOOGLE }
style={{
left: 0,
right: 0,
top: 0,
bottom: 0,
position: 'absolute'
}}
region={{
latitude:128.569184,
longitude: 73.765760,
latitudeDelta: 0.00942,
longitudeDelta: 0.0843
}}
ref={map => { this.map = map }}
>
<MapView.Marker
map = {this.map}
coordinate={{
latitude: 128.568806,
longitude: 73.765210
}}
image={"http://pokeapi.co/media/sprites/pokemon/1.png"}
title='ETHEL and Friends'
>
</MapView.Marker>
</MapView>
I checked the docs for
MapView.Marker
and find out yourimage
prop has a wrong value. You need to set it as a local ImageSource type.From the docs:
Example