Grey map or not even drawing on Android
Is this a bug report?
Yes
Have you read the Installation Instructions?
As far as I know, everything was installed properly.
Environment
react-native: 0.60.5
react: 16.8.6
react-native-maps: 0.23.0rc4
Target Platform: Android Pixel 3a, API 29 (emulator and Nokia 7+)
Steps to Reproduce
I added a Map in a View like this:
return <MapView
provider={Platform.OS === "ios" ? null : "osmdroid"}
initialRegion={region}
>
<UrlTile
maximumZ={18}
urlTemplate="https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png"
/>
</MapView>;
Expected Behavior
Should display a map.
Actual Behavior
The map stays grey (interaction works).
I suppose I missed a step while installing the package, but I can't figure out what.
Do you still experience this problem?
Yes, currently, I have to use the original react-native-maps instead :(
Having the same issue, but only on release version of the app.
Try giving it a style
const { width, height } = Dimensions.get('window');
inside your return put
<MapView initialRegion={{ latitude: 37.78825, longitude: -122.4324, latitudeDelta: 0.0922, longitudeDelta: 0.0421, }} style={{height: height, width: width}} />
Not having a defined size was my problem. This should be called out in the README I would think. Spent a long time trying to figure out why nothing was rendering!