Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

osrm

Package Overview
Dependencies
Maintainers
15
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

osrm - npm Package Compare versions

Comparing version 5.5.0-rc.3 to 5.5.0-rc.4

profiles/lib/access.lua

3

CHANGELOG.md
## 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

4

package.json

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc