FLUTTER ECOSYSTEM

ahmedsaleh210/georouter

ahmedsaleh210/georouter open-source repository details.

georouter प्रोजेक्ट कवर
Stars
16
Forks
3
अंतिम पुश (UTC)
20 मई 2023
प्रोजेक्ट स्थिति
सक्रिय
Ahmed Saleh GitHub avatar
GITHUB User

Ahmed Saleh ↗

Software Engineer

Mansoura
भाषाएँDartCMakeShellCObjective-CJavaC++Swift

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 4 आइटम
  • flutter{"sdk":"flutter"}
  • http^0.13.5
  • flutter_lintsडेवलपमेंट^2.0.1
  • flutter_testडेवलपमेंट{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

GeoRouter

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).

Features

  • Request directions between two or more points using different travel modes (driving, walking, cycling, or transit).
  • Decode polylines returned by OSRM into a list of latitude/longitude points.
  • Handles errors and exceptions thrown by OSRM.

Getting Started

  1. Add the following to your pubspec.yaml file: In your pubspec.yaml file, add the following dependency:
dependencies:
  georouter: <lastest>
  1. Import the package
import 'package:georouter/georouter.dart';
  1. Use package:
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
}

Dependencies

http: ^0.13.5