1.0.27 • Published 5 years ago

react-native-navigation-apps v1.0.27

Weekly downloads
33
License
ISC
Repository
github
Last release
5 years ago

react-native-navigation-apps

Open & Navigate With External Navigation Apps (Waze,GoogleMaps,iOS Maps) from react native

Description

A react native component for using navigation apps like waze google maps and ios maps to navigate by address or latitude and longitude

Example

Installation

npm -i --save react-native-navigation-apps
yarn add react-native-navigation-apps

Usage

import {NavigationApps,actions,googleMapsTravelModes} from "react-native-navigation-apps";

      <NavigationApps
                    iconSize={50}
                    row
                    address='some default address to navigate' // address to navigate by for all apps 
                    waze={{address:'',lat:'',lon:'',action: actions.navigateByAddress}} // specific settings for waze
                    googleMaps={{search,lat:'',lon:'',action: actions.navigateByAddress,travelMode:googleMapsTravelModes.driving}} // specific settings for google maps
                    maps={{search,lat:'',lon:'',action: actions.navigateByAddress,travelMode:mapsTravelModes.driving}} // specific settings for maps
                />

Details

Each app (waze,google maps,ios maps) has its own configuration an action address lat lon and icon For google maps and ios maps also have travelMode (driving,walking,transit) Action can be : navigateByAddress -- navigate to an address by address (text) navigateByLatAndLon -- navigate to an address by Latitude and Longitude searchLocationByLatAndLon -- only search an address (not navigate) by Latitude and Longitude travelMode can be : driving walking transit

Properties

PropDescriptionDefault
rowalign navigation apps as rowfalse
viewModeSet navigation apps display as modal , view or sheet modeview
iconSizeicon size of the navigation app100
modalPropsreact native modal props{}
modalContainerStyleStyling modal container{}
modalBtnCloseContainerStyleStyling the modal close button container{}
modalBtnCloseStyleStyling the modal close button{}
modalBtnCloseTextStyleStyling the modal close button text{}
modalBtnOpenStyleStyling the modal open button{}
modalBtnOpenTextStyleStyling the modal open button text{}
modalBtnOpenTitleTitle for the the modal open button''
modalBtnCloseTitleTitle for the modal close button''
actionSheetBtnOpenTitleTitle for the the action sheet open buttonopen action sheet
actionSheetCloseTitleTitle for the action sheet close buttonclose action sheet
actionSheetBtnOpenTextStyleStyling the action sheet open button text{}
actionSheetBtnOpenStyleStyling the action sheet open button{}
addressSet the default address for the navigation apps''
wazeSet configuration for waze : action address lat lon and icon ... if address not set waze will take the address from the default address propaddress:'',action:navigateByAddress,lat:'',lon:''
googleMapsSet configuration for google maps action address lat lon icon and travelMode ... if address not set google maps will take the address from the default address propaddress:'',action:navigateByAddress,lat:'',lon:travelMode:'driving'
mapsSet configuration for ios maps action address lat lon icon and travelMode ... if address not set ios maps will take the address from the default address propaddress:'',action:navigateByAddress,lat:'',lon:'',travelMode:'driving'

IOS Usage

To use waze and google maps on iOS devices you must add this lines to the info.plist file

<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>comgooglemaps</string>
		<string>waze</string>
	</array>
1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago