パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.8

routing_client_dart

ルーティングクライアントAPI用のDartパッケージ(OSRM/Valhallaプロジェクトをサポート)

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
5410
いいね数
25
Pub ポイント
130

パッケージをインストール

flutter pub add routing_client_dart

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

OpenStreetMapベースのルーティングエンジン(OSRMやValhallaなど)向けにクライアントサイドのルーティング機能を提供するDartパッケージです。開発者がクロスプラットフォームアプリケーションにリアルタイムでの経路計算を統合できるようにし、Android、iOS、Web、macOS、Windows、Linuxをサポートしています。ルーティングサービスとのAPI連携を簡素化し、経路の要求、応答の処理、エラーの管理をシンプルなインターフェースで行えます。効率的な経路探索を必要とするナビゲーションおよび位置情報対応アプリに最適です。

用途

  • リアルタイムルート計画
  • ナビゲーションアプリ開発
  • ジオスペースデータ分析
  • マルチプラットフォーム位置追跡
  • OSRM または Valhalla サーバーとの統合

主な機能

  • OSRM および Valhalla ルーティング API をサポートしています
  • クロスプラットフォーム互換性
  • シンプルなリクエスト/レスポンス処理
  • エラー耐性
  • 軽量で統合が簡単

適している対象

  • モバイルおよびウェブナビゲーションアプリ
  • 物流および配達プラットフォーム
  • 屋外活動トラッキングツール
  • 場所ベースのサービス統合
  • OpenStreetMapデータを使用する開発者

注意事項

  • 外部のOSRMまたはValhallaサーバーが必要です
  • リクエストのルーティングにはネットワーク接続が必要です
  • OSMベースのルーティングプロバイダに限定
  • 組み込みのマップレンダリングなし
  • 一部のサーバーでは認証が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Routing Client Dart Package

pub

Package for osm routing client api

we support routing API for osrm-backend

also Valhalla Route API (more APIs will be added )

openrouteservice (coming soon)

from 1.0.0 instruction will be included directly when requesting the route

you can use our osrm service or valhalla service directly insteado of our RoutingManager

client api support
  • OSRM Client Api
    • route service
    • trip service
  • Valhalla Client
    • route service API

Installing

Add the following to your pubspec.yaml file:

dependencies:
  routing_client_dart: ^1.0.7
example for osrm route service
    List<LngLat> waypoints = [
      LngLat(lng: 13.388860, lat: 52.517037),
      LngLat(lng: 13.397634, lat: 52.529407),
      LngLat(lng: 13.428555, lat: 52.523219),
    ];
    final manager = RoutingManager();
    final route = await manager.getRoute(
      OSRMRequest.route(
        waypoints: waypoints,
        geometries: Geometries.polyline,
        steps: true,
        languages: Languages.en,
      )
    );
example for osrm trip service
    List<LngLat> waypoints = [
      LngLat(lng: 13.388860, lat: 52.517037),
      LngLat(lng: 13.397634, lat: 52.529407),
      LngLat(lng: 13.428555, lat: 52.523219),
    ];
    final manager = RoutingManager();
    final road = await manager.getRoute(
      OSRMRequest.trip(
        waypoints: waypoints,
        destination: DestinationGeoPointOption.last,
        source: SourceGeoPointOption.first,
        geometries: Geometries.polyline,
        steps: true,
        languages: Languages.en,
        roundTrip:false,
      )
    );
example for check Location in Road
final currentLocation = LngLat.fromList(lnglat: [13.389147, 52.527549]);
    final isOnPath =
await roadManager.isOnPath(road, currentLocation, tolerance: 5);
Example to get next navigation instruction of current Location
final currentLocation = LngLat.fromList(lnglat: [13.389147, 52.527549]);
    final isOnPath =
final instruction = await roadManager.nextInstruction(instructions, road, currentLocation, tolerance: 5);

Warning the precision of LngLat should be 5 if the road contain polylineEncoded, or the same precies as LngLat in polylines

Note you can get some inaccurate information nextInstruction,for that we will be happy for yours contributions

Note you can get voice instruction for valhalla instruction

Note more documentation will be added to soon

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト