Comparing version 5.5.0-rc.3 to 5.5.0-rc.4
## node-osrm changelog | ||
### v5.5.0 RC4 | ||
- Update to osrm-backend v5.5.0 RC4 | ||
### v5.5.0 RC3 | ||
@@ -4,0 +7,0 @@ - Update to osrm-backend v5.5.0 RC3 |
@@ -7,4 +7,4 @@ { | ||
"author": "Dane Springmeyer <springmeyer>", | ||
"version": "5.5.0-rc.3", | ||
"osrm_release": "v5.5.0-rc.3", | ||
"version": "5.5.0-rc.4", | ||
"osrm_release": "v5.5.0-rc.4", | ||
"main": "./lib/index.js", | ||
@@ -11,0 +11,0 @@ "license": "BSD-2-Clause", |
@@ -73,19 +73,32 @@ # node-osrm | ||
# Setup | ||
# Quick start | ||
The `node-osrm` module consumes data processed by OSRM core. | ||
This repository contains a Makefile that does this automatically: | ||
For this purpose we ship the binaries `osrm-extract` and `osrm-contract` with the node module. | ||
For example if you want to prepare a Berlin dataset the following will run the osrm toolchain to do that: | ||
- Downloads an OSM extract | ||
- Runs osrm tools to prepare data | ||
``` | ||
export PATH="./lib/binding/:$PATH" | ||
Just run: | ||
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf | ||
osrm-extract berlin-latest.osm.pbf -p profiles/car.lua | ||
osrm-contract berlin-latest.osrm | ||
``` | ||
make | ||
make test | ||
You can then use the dataset like: | ||
Once that is done then you can calculate routes in Javascript like: | ||
``` | ||
const OSRM = require('osrm'); | ||
let osrm = new OSRM('berlin-latest.osrm'); | ||
osrm.route({coordinates: [[13.388860,52.517037], [13.39319,52.533976]]}, (err, result) => { | ||
if (err) return; | ||
console.log(`duration: ${result.routes[0].duration} distance: ${result.routes[0].distance}`); | ||
}); | ||
``` | ||
See the [full documentation](docs/api.md) for more examples. | ||
# Source Build | ||
@@ -92,0 +105,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
151302
31
184
0