Reputation: 2436
I want to integrate google map in my react-native application so below is my code
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, View, Dimensions } from 'react-native';
import MapView from 'react-native-maps';
export default class App extends Component<{}> {
render() {
return (
<MapView
style={styles.container}
region={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.015,
longitudeDelta: 0.0121,
}}
>
/MapView>
}
);
}
}
const styles = StyleSheet.create({
container: {
height: '100%',
width: '100%',
}
});
when I run above code I get output as the blank page as below
any idea how can I solve this? your all suggestions are appreciable
Upvotes: 0
Views: 1235
Reputation: 61
As far as I can tell, you have missed including the google_services.json in your app's root folder. You will get this when you enable the Google Maps API from the Google Play Developer Console. And or are missing the correct API keys for the API.
Upvotes: 1