패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.8

routing_client_dart

라우팅 클라이언트 API용 Dart 패키지 (OSRM/Valhalla 프로젝트 지원)

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
5.4천
좋아요
25
Pub 점수
130

패키지 설치

flutter pub add routing_client_dart

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

OSRM 및 Valhalla과 같은 OpenStreetMap 기반 라우팅 엔진을 위한 클라이언트 측 라우팅 기능을 제공하는 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 개

소스 저장소

이 패키지를 사용하는 프로젝트