
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
leaflet-routing-machine-here
Advanced tools
Support for here in Leaflet Routing Machine, including route restrictions
Extends Leaflet Routing Machine with support for Here routing API.
Some brief instructions follow below, but the Leaflet Routing Machine tutorial on alternative routers is recommended.
npm install --save leaflet-routing-machine-here
There's a single class exported by this module, L.Routing.Here
. It implements the IRouter
interface. Use it to replace Leaflet Routing Machine's default OSRM router implementation:
var L = require('leaflet');
require('leaflet-routing-machine');
require('lrm-here'); // This will tack on the class to the L.Routing namespace
L.Routing.control({
router: new L.Routing.Here('your Here api key', {
routeRestriction: {
transportMode: 'truck'
},
truckRestriction: {
height: 300
},
urlParameters: {
avoid: {
tollTransponders: 'all'
}
}
}),
}).addTo(map);
Note that you will need to pass a valid Here apiKey to the constructor.
Property | Type | Default | Options |
---|---|---|---|
alternatives | number | 0 | |
noticesTypeAsRouteError | string['critical', 'info'] | ['critical'] | |
routeRestriction | object | ||
truckRestriction | object | ||
urlParameters | object | {} | Available options |
routeRestriction
Property | Type | Default | Options |
---|---|---|---|
avoidHighways | boolean | false | |
avoidTolls | boolean | false | |
avoidFerries | boolean | false | |
avoidDirtRoad | boolean | false | |
departureTime | string | any | Available options |
transportMode | string | car | Available options |
routingMode | string | fast | Available options |
truckRestriction
Property | Type | HumanType | Min | Max |
---|---|---|---|---|
height | int | centimeters | 0 | - |
width | int | centimeters | 0 | - |
length | int | centimeters | 0 | - |
grossWeight | int | kilograms | 0 | - |
weightPerAxle | int | kilograms | 0 | - |
shippedHazardousGoods | array Available options | |||
trailerCount | int | count | 0 | 4 |
This is forked version based on trailbehind
FAQs
Support for here in Leaflet Routing Machine, including route restrictions
The npm package leaflet-routing-machine-here receives a total of 403 weekly downloads. As such, leaflet-routing-machine-here popularity was classified as not popular.
We found that leaflet-routing-machine-here demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.