furkot-directions
Advanced tools
Comparing version 1.2.4 to 1.3.0
1.3.0 / 2019-09-25 | ||
================== | ||
* support curvy roads from GraphHopper | ||
1.2.4 / 2019-07-25 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -15,2 +15,6 @@ const { pathType } = require("../../model"); | ||
const weighting = { | ||
true: 'curvature' | ||
}; | ||
function prepareWaypoint(qs, p) { | ||
@@ -78,3 +82,3 @@ // waypoint format is lat,lon | ||
function prepareUrl(url, { avoidHighways, avoidTolls, mode, path, points, turnbyturn }) { | ||
function prepareUrl(url, { avoidHighways, avoidTolls, mode, path, points, turnbyturn, curvy }) { | ||
let req = { | ||
@@ -84,2 +88,6 @@ vehicle: vehicle[mode] || vehicle[0], | ||
}; | ||
if (curvy && mode === -1) { | ||
req.vehicle = 'motorcycle.kurviger.de'; | ||
req.weighting = weighting[curvy]; | ||
} | ||
if (!turnbyturn && path !== pathType.smooth && path !== pathType.coarse) { | ||
@@ -86,0 +94,0 @@ req.instructions = false; |
{ | ||
"name": "furkot-directions", | ||
"version": "1.2.4", | ||
"version": "1.3.0", | ||
"description": "Directions service for Furkot", | ||
@@ -5,0 +5,0 @@ "author": { |
80661
24
1387