kenzi-capacitor-google-navigation
v3.0.0
Published
Capacitor plugin for Google Navigation SDK (embedded turn-by-turn)
Downloads
13
Maintainers
Readme
kenzi-capacitor-google-navigation
Capacitor plugin for Google Navigation SDK (embedded turn-by-turn), powered by kenzi.ai
for help and support please contact us at [email protected]
Install
npm install kenzi-capacitor-google-navigation
npx cap syncAPI
initialize(...)startNavigation(...)addListener('navigationClosed', ...)removeAllListeners()- Interfaces
- Type Aliases
initialize(...)
initialize(options?: InitOptions | undefined) => Promise<{ ok: boolean; }>| Param | Type |
| ------------- | --------------------------------------------------- |
| options | InitOptions |
Returns: Promise<{ ok: boolean; }>
startNavigation(...)
startNavigation(options: StartOptions) => Promise<{ started: boolean; }>| Param | Type |
| ------------- | ----------------------------------------------------- |
| options | StartOptions |
Returns: Promise<{ started: boolean; }>
addListener('navigationClosed', ...)
addListener(eventName: 'navigationClosed', listenerFunc: (data: { closed: true; }) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ------------------------------------------------- |
| eventName | 'navigationClosed' |
| listenerFunc | (data: { closed: true; }) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>Interfaces
InitOptions
| Prop | Type | Description |
| --------------- | ------------------- | -------------------------------------------------- |
| iosApiKey | string | iOS only (Android reads key from AndroidManifest). |
StartOptions
| Prop | Type | Description |
| --------------- | ----------------------- | ------------------------- |
| originLat | number | |
| originLng | number | |
| destLat | number | |
| destLng | number | |
| waypoints | Waypoint[] | |
| simulate | boolean | |
| title | string | Android-only header title |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Type Aliases
Waypoint
{ lat: number; lng: number }
