osrm-client-js
Client library for Open Source Routing Machine - OSRM that uses the REST http API
that is exposed by osrm-routed
.
The interface is compatible with node-osrm. However it is not meant as
replacement for node-osrm
on the server.
Can be used with NodeJS and with browserify.
Example
var OSRM = ; var osrm = "https://router.project-osrm.org"; osrm; osrm; osrm; osrm; osrm; //You can also pass it query paths directly: osrm;
Testing
npm test # run node tape tests
firefox test.html # check the console if tape tests worked