react-native-maps: Android : Error while updating property 'region' of a view managed by : AIRMap
While everything works fine on iOS, I get this error when running on Android :

My MapView component :
<MapView
ref='map view'
rotateEnabled={false}
style={styles.restaurantsMap}
showsUserLocation={this.state.showsUserLocation}
region={this.state.region}
onRegionChangeComplete={this.onRegionChangeComplete}
onRegionChange={this.onRegionChange}>
<MapView.Circle
center={center}
radius={this.state.radius}
fillColor='rgba(0, 0, 0, 0.1)'
strokeColor='#FE3139' />
</MapView>
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 13
- Comments: 28 (4 by maintainers)
In my case, my issue was that the
latitudeandlongitudeprops passed toMapViewweretypeof string. Fixed doing aparseFloatbefore.I had the same error using yarn add react-native-maps to display a MapView component
Using
expo install react-native-mapsfixed things!Ok, I figured it out what was my problem in this case:
If you use
showsUserLocationprops you need to add theACCESS_FINE_LOCATIONpermission into yourAndroidManifest.xml. Which make sense πThat worked for me
While everything works fine on iOS, I get this error when running on Android previous it working but now not working
I was having the same issue! Debbuging the component I realized that region needs latitudDelta and longitudDelta. Once you add those props everything will work just fine⦠At least that worked for me.
you have saved my day
This fixed it for me! Thanks a lot!
In my case
latitudeandlongitudewere missing fromcamera.center:Iβm having the same issue, I added the deltas coordinates but I still get this error:
@logan0900 found a temporary fix change googlePlayServicesVersion = β+β to googlePlayServicesVersion = β17.0.0β in android/build.gradle. Working for me