Getting Started
このプラグインのインストール手順とマークダウンガイドを含むセットアップのコピー用テキストをコピーします。
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.
Install
「インストール」のセクションAI-Assisted セットアップを使用してプラグインをインストールできます。AI ツールに Capgo スキルを追加するには、以下のコマンドを実行します。
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-navigatorbunx cap syncImport
「Import」のセクションimport { LaunchNavigator } from '@capgo/capacitor-launch-navigator';APIの概要
「APIの概要」のセクションnavigate
「navigate」のセクション緯度と経度を使用して場所に移動する
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.navigate({} as { /** * Destination coordinates [latitude, longitude] */ destination: [number, number];
/** * Optional navigation options */ options?: NavigateOptions; });isAppAvailable
「isAppAvailable」セクション特定のナビゲーションアプリが利用可能かどうか確認する
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.isAppAvailable({} as { /** * App identifier to check */ app: IOSNavigationApp | AndroidNavigationApp | string; });getAvailableApps
「getAvailableApps」セクションデバイス上の利用可能なナビゲーションアプリのリストを取得する
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getAvailableApps();getSupportedApps
「getSupportedApps」セクション現在のプラットフォームでサポートされているアプリのリストを取得する
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getSupportedApps();getDefaultApp
「getDefaultApp」セクションナビゲーション用のデフォルトアプリの名前を取得
import { LaunchNavigator } from '@capgo/capacitor-launch-navigator';
await LaunchNavigator.getDefaultApp();型の参照
「型の参照」のセクションNavigateOptions
「ナビゲーションオプション」のセクションナビゲーションのオプション
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
「iOSナビゲーションアプリ」のセクション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
「Androidナビゲーションアプリ」のセクション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
「利用可能なアプリ」セクションアプリの利用可能性を確認した結果
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
「トランスポートモード」セクショントランスポートモード
export enum TransportMode { DRIVING = 'driving', WALKING = 'walking', BICYCLING = 'bicycling', TRANSIT = 'transit',}LaunchMode
「起動モード」セクション起動モード
export enum LaunchMode { MAPS = 'maps', TURN_BY_TURN = 'turn_by_turn', GEO = 'geo',}真実の源
「真実の源」セクションこのページはプラグインから生成されています。 src/definitions.ts.再度、パブリック API がアップストリームで変更されたときは、再度同期を実行してください。
Getting Started から続けてください。
セクションのタイトルは「Getting Started から続けてください。」あなたが使用している場合 Getting Started ダッシュボードと API の作業を計画するために使用している場合、API を接続してください。 Using @capgo/capacitor-launch-navigator Using @capgo/capacitor-launch-navigator のネイティブ機能のために API Overview API Overview の実装詳細のために Introduction Capgoの実装詳細については、Introductionを参照してください。 API キー Capgoの実装詳細については、API キー、 デバイス Capgoの実装詳細については、デバイスを参照してください。