Skip to content

시작하기

터미널 창
bun add @capgo/capacitor-launch-navigator
bunx cap sync
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';

위치 좌표를 사용하여 위치로 이동

import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.navigate({} as {
/**
* Destination coordinates [latitude, longitude]
*/
destination: [number, number];
/**
* Optional navigation options
*/
options?: NavigateOptions;
});

특정 네비게이션 앱이 사용 가능한지 확인

import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.isAppAvailable({} as {
/**
* App identifier to check
*/
app: IOSNavigationApp | AndroidNavigationApp | string;
});

클립보드 복사

import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getAvailableApps();

getSupportedApps

클립보드 복사

Copy to clipboard

import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getSupportedApps();

getDefaultApp

getDefaultApp

네비게이션의 기본 앱 이름을 가져옵니다.

import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getDefaultApp();

타입 참조

타입 참조
네비게이션 옵션

네비게이션 옵션입니다.

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;
}

클립보드에 복사

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

protectedTokens

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',
}

앱 사용 가능 여부를 확인한 결과.

export interface AvailableApp {
/**
* App identifier
*/
app: string;
/**
* Display name of the app
*/
name: string;
/**
* Whether the app is available on the device
*/
available: boolean;
}

운송 모드.

export enum TransportMode {
DRIVING = 'driving',
WALKING = 'walking',
BICYCLING = 'bicycling',
TRANSIT = 'transit',
}

시작 모드.

export enum LaunchMode {
MAPS = 'maps',
TURN_BY_TURN = 'turn_by_turn',
GEO = 'geo',
}

진실의 근원

진실의 근원

이 페이지는 플러그인의 src/definitions.ts. upstream에서 변경된 경우 public API을 다시 동기화할 때.