React Native Open Map
Choose the application that will open the map
Currently supported apps:
- Apple Maps –
apple-maps
- Google Maps –
google-maps
- Citymapper –
citymapper
- Uber –
uber
- Lyft –
lyft
- Navigon –
navigon
- The Transit App –
transit
- Waze –
waze
- Moovit -
moovit
Try it out
You can try out the Open Map Example app to get a tease of the functionalities of this lib.
Installation
npm install --save react-native-open-map
yarn add react-native-open-map
A note about iOS 9+
As of iOS 9, your app needs to provide the LSApplicationQueriesSchemes
key inside
Info.plist to specify the URL schemes with which the app can interact.
Just put this in your Info.plist depending on which apps you'd like to support. Omitting these might mean that the library can't detect some of the maps apps installed by the user.
<key>LSApplicationQueriesSchemes</key><array> <string>comgooglemaps</string> <string>citymapper</string> <string>uber</string> <string>lyft</string> <string>navigon</string> <string>transit</string> <string>waze</string> <string>moovit</string></array>
Props
Prop | Default | Type | Required |
---|---|---|---|
latitude | none | number/string | yes |
longitude | none | number/string | yes |
title | "Location" | string | no |
cancelText | "Cancel" | string | no |
actionSheetTitle | none | string | no |
actionSheetMessage | none | string | no |
Usage
; OpenMap;
OpenMap;
Credits
This library is based on react-native-map-link.