scoova_routing 1.1.1 copy "scoova_routing: ^1.1.1" to clipboard
scoova_routing: ^1.1.1 copied to clipboard

Standalone Valhalla routing client for the Scoova routing gateway (api.scoo-va.info/api/v1/routing) — route, optimizedRoute, isochrone, matrix, height (alias elevation), mapMatch, locate, status. Pure [...]

scoova_routing #

Standalone Valhalla routing client for routing.scoo-va.info. Pure Dart, no Flutter dependency — works in CLI / server / Flutter projects identically.

Install #

dart pub add scoova_routing
# or
flutter pub add scoova_routing

Usage #

import 'package:scoova_routing/scoova_routing.dart';

final client = RoutingClient(
  locale: 'ar-EG',                                 // every request gets ?locale=ar-EG + Accept-Language
  apiKey: const String.fromEnvironment('SCOOVA_API_KEY'),
);

final result = await client.route(
  [const LatLng(30.04, 31.24), const LatLng(30.06, 31.25)],
  options: const RouteOptions(costing: CostingType.scooter),
);

final shape = (result['trip'] as Map)['legs'][0]['shape'] as String;
final path = decodePolyline(shape);

Endpoints #

route, optimizedRoute, isochrone, matrix, height (alias elevation), mapMatch, locate, status.

Locale #

Pass locale once on the client and every call carries it as both the ?locale= query parameter and the Accept-Language HTTP header. Per-call RouteOptions.locale overrides the client default. The server falls back to en for any unsupported code.

Build + test #

dart pub get
dart analyze
dart test

Repo: https://github.com/Scoova/scoova-routing-flutter. License: Apache-2.0.

0
likes
130
points
58
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Standalone Valhalla routing client for the Scoova routing gateway (api.scoo-va.info/api/v1/routing) — route, optimizedRoute, isochrone, matrix, height (alias elevation), mapMatch, locate, status. Pure Dart, no Flutter dependency.

Repository (GitHub)
View/report issues

Topics

#routing #valhalla #directions #mobility

License

unknown (license)

Dependencies

http

More

Packages that depend on scoova_routing