Inizia a Utilizzare
Copia un prompt di configurazione con i passaggi di installazione e la guida markdown completa per questo plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-launch-navigator`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/launch-navigator/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Installa
Sezione intitolata “Installa”bun add @capgo/capacitor-launch-navigatorbunx cap syncImporta
Sezione intitolata “Importa”import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';API Panoramica
Sezione intitolata “API Panoramica”navigate
NavigaNaviga a una posizione utilizzando la latitudine e la longitudine
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.navigate({} as { /** * Destination coordinates [latitude, longitude] */ destination: [number, number];
/** * Optional navigation options */ options?: NavigateOptions; });isAppAvailable
Sezione intitolata “isAppAvailable”Verifica se un'app di navigazione specifica è disponibile
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.isAppAvailable({} as { /** * App identifier to check */ app: IOSNavigationApp | AndroidNavigationApp | string; });getAvailableApps
Sezione intitolata “getAvailableApps”Ottieni l'elenco delle app di navigazione disponibili sul dispositivo
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getAvailableApps();getSupportedApps
Sezione intitolata “getSupportedApps”Ottieni l'elenco delle app supportate per la piattaforma corrente
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getSupportedApps();getDefaultApp
Sezione intitolata “getDefaultApp”Ottieni il nome dell'app di default per la navigazione
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getDefaultApp();Riferimento di tipo
Sezione intitolata “Riferimento di tipo”NavigateOptions
Sezione intitolata “NavigateOptions”Opzioni per la navigazione.
export interface NavigateOptions { /** * Starting location coordinates [latitude, longitude] */ start?: [number, number];
/** * Starting location name */ startName?: string;
/** * Destination name (will be ignored since we only support coordinates) */ destinationName?: string;
/** * Transport mode */ transportMode?: TransportMode;
/** * Specific app to launch (if not specified, will use default or prompt) */ app?: IOSNavigationApp | AndroidNavigationApp | string;
/** * Launch mode */ launchMode?: LaunchMode;
/** * Additional parameters specific to certain apps */ extras?: Record<string, any>;
/** * Enable debug logging */ enableDebug?: boolean;}IOSNavigationApp
Sezione intitolata “IOSNavigationApp”App di navigazione disponibili per iOS.
export enum IOSNavigationApp { APPLE_MAPS = 'apple_maps', GOOGLE_MAPS = 'google_maps', WAZE = 'waze', CITYMAPPER = 'citymapper', GARMIN_NAVIGON = 'garmin_navigon', TRANSIT_APP = 'transit_app', YANDEX_NAVIGATOR = 'yandex', UBER = 'uber', TOMTOM = 'tomtom', SYGIC = 'sygic', HERE_MAPS = 'here', MOOVIT = 'moovit', LYFT = 'lyft', MAPS_ME = 'mapsme', CABIFY = 'cabify', BAIDU = 'baidu', GAODE = 'gaode', TAXI_99 = '99taxi',}AndroidNavigationApp
Sezione intitolata “AndroidNavigationApp”App di navigazione disponibili per Android.
export enum AndroidNavigationApp { GOOGLE_MAPS = 'google_maps', WAZE = 'waze', CITYMAPPER = 'citymapper', UBER = 'uber', YANDEX = 'yandex', SYGIC = 'sygic', HERE_MAPS = 'here', MOOVIT = 'moovit', LYFT = 'lyft', MAPS_ME = 'mapsme', CABIFY = 'cabify', BAIDU = 'baidu', GAODE = 'gaode',}AvailableApp
Sezione intitolata “Disponibilità dell'app”Risultato della verifica della disponibilità dell'app.
export interface AvailableApp { /** * App identifier */ app: string;
/** * Display name of the app */ name: string;
/** * Whether the app is available on the device */ available: boolean;}TransportMode
Sezione intitolata “Modalità di trasporto”Modalità di trasporto.
export enum TransportMode { DRIVING = 'driving', WALKING = 'walking', BICYCLING = 'bicycling', TRANSIT = 'transit',}LaunchMode
Sezione intitolata “Modalità di avvio”Modalità di avvio.
export enum LaunchMode { MAPS = 'maps', TURN_BY_TURN = 'turn_by_turn', GEO = 'geo',}Sezione intitolata “Fonte di verità”
Copia negli appuntiQuesta pagina è generata dal plugin's src/definitions.ts. Riavvia la sincronizzazione quando le informazioni pubbliche API cambiano nell'area upstream.