@wuilmerj24/launch-navigator
npm install @wuilmerj24 / launch - navigator
Method
Description
checkInstalledApp(packageName: string or SupportedApps)
Checks if the app is installed on Android (com.id.pack) or iOS (urlscheme://). You can also use SupportedApps, which returns a boolean.
openGoogleMaps(OpcionesGoogleMaps)
Opens the Google Maps app. Returns a Promise.
openWaze(OpcionesWaze)
Opens the Waze app. Returns a Promise.
openBaidumap(OpcionesBaidumap)
Opens the BaiduMap app. Returns a Promise.
openAppleMaps(OpcionesAppleMaps)
Opens the Apple Maps app. Returns a Promise.
SupportedApps
Google Map
Android e iOS
Waze
Android e iOS
Apple Maps
iOS
Property
Description
error
Boolean. Indicates whether an error occurred or not.
errorText
String error message.
Property
Description
DRIVING
WALKING
BICYCLING
TRANSIT
Property
Type
Description
daddr
string or Array
Destination address
saddr?
string or Array
Starting address
modoTransporte
TransporteGoogleMaps
Transportation type
tipoMapa
TURN_BY_TURN or MAPS
If it's TURN_BY_TURN on Android, it will start navigation automatically
avoid?
string
Sets characteristics the route should try to avoid. Values "t", "h", or "f"
Property
Type
Description
destino
string or Array
Destination address
navigate
string
Values yes or `no, starts or doesn't start navigation in the Waze app
Property
Type
DescrDescriptionipci贸n
tipo
string
Values s, k, h, or r. Map type transit, standard, etc.
daddr
string or Array
Destination address
saddr
string or Array
Starting address
dirflg
string
Values d, w, or r. Transportation mode
Verificar si la app esta instalada
checkAppInstalada ( AppsSoportadas . WAZE o AppsSoportadas . APPLE_MAPS o AppsSoportadas . BAIDUMAP o AppsSoportadas . GOOGLE_MAPS ) : boolean
openGoogleMaps ( {
daddr :"Maracay aragua venezuela" ,
modoTransporte :TransporteGoogleMaps . DRIVING ,
tipoMapa :"TURN_BY_TURN" ,
saddr :"Villa de cura aragua venezuela" ,
avoid :"fth"
} ) . then ( ( res ) => {
//Ok
} ) . catch ( ( err ) => {
//Error
} )
openWaze ( {
destino :"tia el recreo quito pichincha ecuador" ,
navigate :"yes"
} ) . then ( ( res ) => {
console . log ( res ) ;
} ) . catch ( ( err ) => {
console . log ( err ) ;
} )
openAppleMaps ( {
daddr :"Tia el recreo quito ecuador" ,
dirflg :"d" ,
tipo :"s" ,
saddr :"Maracay aragua veneuzela" ,
} ) . then ( ( res ) => {
console . log ( res ) ;
} ) . catch ( ( err ) => {
console . log ( err ) ;
} )
``
## License
Apache License Version 2.0