@routingjs/valhalla
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

RoutingJS: Valhalla

Promise-based web client for the Valhalla Open Source Routing Engine.

Example

import { Valhalla } from "@routingjs/valhalla"

const v = new Valhalla() // URL defaults to http://valhalla1.openstreetmap.de
v.directions(
    [
        [8.512516, 47.380742],
        [8.557835, 47.359467],
    ],
    "auto"
).then((d) => {
    // do stuff with the directions response
    d.directions.forEach((direction) => {
        console.log(direction.feature)
    })
})

Installation

npm install @routingjs/valhalla

This package is part of the RoutingJS project, which aims to provide consistent access to various vehicle routing APIs.

Package Sidebar

Install

npm i @routingjs/valhalla

Weekly Downloads

1,068

Version

0.2.0

License

MIT

Unpacked Size

238 kB

Total Files

19

Last publish

Collaborators

  • routingjs