mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
journeys: startWithWalking with default true ✨
cherry-picked 9305a12
from next
This commit is contained in:
parent
c1bdade49f
commit
fccd3d0037
2 changed files with 7 additions and 2 deletions
|
@ -62,7 +62,9 @@ With `opt`, you can override the default options, which look like this:
|
||||||
regional: true
|
regional: true
|
||||||
},
|
},
|
||||||
tickets: false, // return tickets? only available with some profiles
|
tickets: false, // return tickets? only available with some profiles
|
||||||
polylines: false // return a shape for each leg?
|
polylines: false, // return a shape for each leg?
|
||||||
|
// Consider walking to nearby stations at the beginning of a journey?
|
||||||
|
startWithWalking: false
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
5
index.js
5
index.js
|
@ -86,7 +86,9 @@ const createClient = (profile, request = _request) => {
|
||||||
accessibility: 'none', // 'none', 'partial' or 'complete'
|
accessibility: 'none', // 'none', 'partial' or 'complete'
|
||||||
bike: false, // only bike-friendly journeys
|
bike: false, // only bike-friendly journeys
|
||||||
tickets: false, // return tickets?
|
tickets: false, // return tickets?
|
||||||
polylines: false // return leg shapes?
|
polylines: false, // return leg shapes?
|
||||||
|
// Consider walking to nearby stations at the beginning of a journey?
|
||||||
|
startWithWalking: false
|
||||||
}, opt)
|
}, opt)
|
||||||
if (opt.via) opt.via = profile.formatLocation(profile, opt.via)
|
if (opt.via) opt.via = profile.formatLocation(profile, opt.via)
|
||||||
opt.when = opt.when || new Date()
|
opt.when = opt.when || new Date()
|
||||||
|
@ -128,6 +130,7 @@ const createClient = (profile, request = _request) => {
|
||||||
jnyFltrL: filters,
|
jnyFltrL: filters,
|
||||||
getTariff: !!opt.tickets,
|
getTariff: !!opt.tickets,
|
||||||
outFrwd: opt.whenRepresents !== 'arrival',
|
outFrwd: opt.whenRepresents !== 'arrival',
|
||||||
|
ushrp: !!opt.startWithWalking,
|
||||||
|
|
||||||
// todo: what is req.gisFltrL?
|
// todo: what is req.gisFltrL?
|
||||||
getPT: true, // todo: what is this?
|
getPT: true, // todo: what is this?
|
||||||
|
|
Loading…
Add table
Reference in a new issue