Skip to content
pubscout

osrm

0.0.8, released 2 years ago by physia.dev

Open Source Routing Machine (OSRM) client for Dart and Flutter.

WASM-ready
$ flutter pub add osrm
Source repository

What it does

Provides an interface to communicate with an OSRM server to retrieve routing, nearest location, and match information.

AI-written summary of version 0.0.8, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to integrate OSRM routing and directions into a Dart or Flutter application
  • You want to query nearest services or match GPS traces using an OSRM backend

Skip it when

  • You need an all-in-one embedded mapping widget rather than a backend routing client
  • Table, trip, or tile services are required, as they are not yet fully implemented

Strengths

  • Simple and easy-to-use interface for OSRM APIs
  • Supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux

Weaknesses

  • Package is currently under development
  • Certain OSRM services such as Table, Trip, and Tile are still pending

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

Simply add osrm to your pubspec.yaml dependencies and instantiate the OSRM class.

NearestResponse response = await osrm.nearest(
  NearestOptions(
    coordinate: (-0.1234, 51.1234),
    number: 3
  ),
);

Alternatives

Packages that do the same job and could replace osrm.

Works with

Packages commonly used together with osrm: ones it builds on, ones built on it, and its own family.