diff --git a/docs/installation.md b/docs/installation.md index 6d4f8047f..4baa0bc30 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -140,16 +140,29 @@ manually](https://developers.google.com/maps/documentation/ios-sdk/start). Then, from your project root to the directory in which you installed the Google Maps frameworks: -```json -{ - "name": "your-app", - "scripts": { - "postinstall": "./node_modules/react-native-maps/enable-google-maps REPLACE_ME_RELATIVE_PATH_TO_GOOGLE_MAPS_INSTALL" - } -} -``` - -Re-run `npm install` or `yarn` to ensure the `postinstall` script is run. + ```json + { + "name": "your-app", + "scripts": { + "postinstall": "./node_modules/react-native-maps/enable-google-maps REPLACE_ME_RELATIVE_PATH_TO_GOOGLE_MAPS_INSTALL" + } + } + ``` + + Re-run `npm install` or `yarn` to ensure the `postinstall` script is run. + +3. Import and add `{PROVIDER_GOOGLE}` to your JavaScript: + ```javascript + import MapView, { PROVIDER_GOOGLE } from 'react-native-maps'; + ... + + + + ``` ## Build configuration on Android @@ -283,7 +296,7 @@ example is below: ```jsx -import MapView from 'react-native-maps'; +import MapView, { PROVIDER_GOOGLE } from 'react-native-maps'; // remove PROVIDER_GOOGLE import if not using Google Maps ... const styles = StyleSheet.create({ container: { @@ -301,6 +314,7 @@ const styles = StyleSheet.create({ export default () => (