osrm-client-promise
An isomorphic promising OSRM client (v4)
API
All osrm-backend v4 api is supported, please take a look at documentation:
Service | Description |
---|---|
viaroute | shortest path between given coordinates |
nearest | returns the nearest street segment for a given coordinate |
table | computes distance tables for given coordinates |
match | matches given coordinates to the road network |
trip | Compute the shortest round trip between given coordinates |
Usage example
// instantiate a new client (without arg `http://router.project-osrm.org` will be used)let osrm = 'http://localhost:5000' osrm osrm