Skip to content

Getting Started

GitHub

설치, 동기화 및 소스 마크다운 가이드를 포함합니다.

설치

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 __CAPGO_KEEP_0__ 스킬을 추가하려면 다음 명령어를 사용하세요.
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

그런 다음 다음 명령어를 사용하세요:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-launch-navigator` plugin in my project.

만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 설명을 따라하세요:

터미널 창
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();

현재 플랫폼에서 지원하는 앱 목록을 가져옵니다

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

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

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

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

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의 API이 변경되면 다시 싱크를 실행하세요.

Getting Started에서 계속

Getting Started에서 계속하는 섹션

Capacitor를 사용하는 경우 Getting Started Capacitor를 사용하여 대시보드와 API를 계획하고 운영하기 위해 연결하세요. Capacitor를 사용하여 @capgo/capacitor-launch-navigator를 사용 Capacitor를 사용하여 @capgo/capacitor-launch-navigator의 네이티브 기능을 사용 API 개요 API 개요의 구현 세부 정보 소개 소개의 구현 세부 정보 API 키 implementation 세부 정보에 대한 API 키 장치 implementation 세부 정보에 대한 장치.