diff --git a/index.js b/index.js index bf033778..8aaacc77 100644 --- a/index.js +++ b/index.js @@ -182,11 +182,14 @@ const createClient = (profile, userAgent, request = _request) => { if (!['slow','normal','fast'].includes(opt.walkingSpeed)) { throw new Error('opt.walkingSpeed must be one of these values: "slow", "normal", "fast".') } - const gisFltrL = [{ - meta: 'foot_speed_' + opt.walkingSpeed, - mode: 'FB', - type: 'M' - }] + const gisFltrL = [] + if (profile.journeysWalkingSpeed) { + gisFltrL.push({ + meta: 'foot_speed_' + opt.walkingSpeed, + mode: 'FB', + type: 'M' + }) + } // With protocol version `1.16`, the VBB endpoint *used to* fail with // `CGI_READ_FAILED` if you pass `numF`, the parameter for the number diff --git a/p/vbb/index.js b/p/vbb/index.js index 973b3c59..b7b98fcd 100644 --- a/p/vbb/index.js +++ b/p/vbb/index.js @@ -142,6 +142,7 @@ const vbbProfile = { formatStation, journeysNumF: true, + journeysWalkingSpeed: true, trip: true, radar: true, reachableFrom: true