v0.0.1+1
georouter
一個使用開源路由機(OSRM)API 取得點與點之間路線的套件。支援多種移動模式,包括駕車、步行、騎行和大眾運輸。
25喜歡 1近 30 天下載130Pub 分數
AndroidiOSWebmacOSWindowsLinux
ahmedsaleh210/georouter open-source repository details.
{"sdk":"flutter"}^0.13.5^2.0.1{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
pub package License: MIT stars
GeoRouter is a Flutter package that provides an easy-to-use API to request directions between points using OpenStreetMap Route Service Machine (OSRM).
dependencies:
georouter: <lastest>
import 'package:georouter/georouter.dart';
final georouter = GeoRouter(mode: TravelMode.driving);
final coordinates = [
PolylinePoint(latitude: 51.5074, longitude: -0.1278), // London, UK
PolylinePoint(latitude: 48.8566, longitude: 2.3522), // Paris, France
];
try {
final directions = await georouter.getDirectionsBetweenPoints(coordinates);
// Do something with the directions
} on GeoRouterException catch (e) {
// Handle GeoRouterException
} on HttpException catch (e) {
// Handle HttpException
}
http: ^0.13.5