valhalla-client

Crates.iovalhalla-client
lib.rsvalhalla-client
version0.1.1
sourcesrc
created_at2023-07-11 01:10:36.518653
updated_at2023-07-14 20:54:16.615709
descriptionAPI client for the Valhalla routing engine
homepage
repositoryhttps://github.com/jelmer/valhalla-client-rs
max_upload_size
id913431
size40,508
Jelmer Vernooij (jelmer)

documentation

README

Rust API client for Valhalla

This crate contains the types and functions for interacting with the Valhalla API.

At the moment, only the routing API is implemented.

Examples

use valhalla_client::{Valhalla, Location, Manifest};;
let valhalla = Valhalla::default();

let manifest = Manifest {
    locations: vec![Location::new(4.9041, 52.3676), Location::new(5.1214, 52.0907)],
    costing: valhalla_client::Costing::Bicycle,
    ..Default::default()
};

let response = valhalla.route(manifest).unwrap();

println!("{:#?}", response);

// If the gpx feature is enabled, you can convert the response to a gpx::Gpx object
// let gpx = response.trip.into();
Commit count: 8

cargo fmt