react-native-nitro-modules is required as this library relies on Nitro Modules.
react-native-nitro-modules
yarn add react-native-google-maps-plus react-native-nitro-modules Copy
yarn add react-native-google-maps-plus react-native-nitro-modules
Add this to your Podfile:
post_install do |installer| react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, ) require_relative '../node_modules/react-native-google-maps-plus/scripts/svgkit_patch' apply_svgkit_patch(installer) end Copy
post_install do |installer| react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, ) require_relative '../node_modules/react-native-google-maps-plus/scripts/svgkit_patch' apply_svgkit_patch(installer) end
Add your keys via the config plugin:
{ "expo": { "plugins": [ [ "react-native-google-maps-plus", { "googleMapsAndroidApiKey": "YOUR_ANDROID_MAPS_API_KEY", "googleMapsIosApiKey": "YOUR_IOS_MAPS_API_KEY" } ] ] }} Copy
{ "expo": { "plugins": [ [ "react-native-google-maps-plus", { "googleMapsAndroidApiKey": "YOUR_ANDROID_MAPS_API_KEY", "googleMapsIosApiKey": "YOUR_IOS_MAPS_API_KEY" } ] ] }}
You need a valid Google Maps API key.
Android Guide: https://developers.google.com/maps/documentation/android-sdk/config
iOS Guide: https://developers.google.com/maps/documentation/ios-sdk/config
iOS Google Maps SDK https://developers.google.com/maps/documentation/ios-sdk
Android Google Maps SDK https://developers.google.com/maps/documentation/android-sdk
SVG Rendering iOS: SVGKit Android: AndroidSVG
<GoogleMapsView style={{ flex: 1 }} initialProps={{ camera: { center: { latitude: 37.7749, longitude: -122.4194 }, zoom: 12, }, }}/> Copy
<GoogleMapsView style={{ flex: 1 }} initialProps={{ camera: { center: { latitude: 37.7749, longitude: -122.4194 }, zoom: 12, }, }}/>
Check out the example app in the example directory.
Installation
react-native-nitro-modulesis required as this library relies on Nitro Modules.iOS Setup (Bare RN only)
Add this to your Podfile:
Expo Setup
Add your keys via the config plugin:
API Keys
You need a valid Google Maps API key.
Android Guide: https://developers.google.com/maps/documentation/android-sdk/config
iOS Guide: https://developers.google.com/maps/documentation/ios-sdk/config
Native Dependencies
iOS Google Maps SDK https://developers.google.com/maps/documentation/ios-sdk
Android Google Maps SDK https://developers.google.com/maps/documentation/android-sdk
SVG Rendering iOS: SVGKit Android: AndroidSVG
Usage Example
Check out the example app in the example directory.