Search packages, repositories and app categories

Package detailsv0.0.1+1

georouter

A package for getting directions between points using the Open Source Routing Machine (OSRM) API. Supports multiple travel modes, including driving, walking, cycling, and transit.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
4
Likes
25
Pub points
130

Install package

flutter pub add georouter

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

GeoRouter is a Flutter package that enables developers to fetch directions between geographic points using the Open Source Routing Machine (OSRM) API. It supports multiple travel modes such as driving, walking, cycling, and public transit, making it ideal for navigation and route planning features in location-based applications. The package is compatible across all major platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent behavior in cross-platform projects. With straightforward integration via Flutter's pub package manager, GeoRouter simplifies complex routing logic into simple, reusable methods.

Use cases

  • Navigation apps
  • Route planning tools
  • Delivery tracking systems
  • Cycling and walking route finders
  • Public transit route suggestions

Key features

  • Supports multiple travel modes
  • Uses OSRM API for accurate routing
  • Cross-platform compatibility
  • Simple integration with Flutter
  • Real-time direction fetching

Suitable for

  • Developers building navigation features
  • Apps requiring multi-modal routing
  • Cross-platform geolocation applications
  • Location-aware services with route visualization

Considerations

  • Requires internet connection for API calls
  • Dependent on OSRM server availability
  • May need rate limiting for high-volume usage
  • Limited customization of routing algorithms

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.