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