walking legs: expose distance

cherry-picked bb6e42a from next
This commit is contained in:
Jannis R 2018-06-28 14:11:41 +02:00
parent fa0570e3d8
commit 4da8689ace
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -46,6 +46,7 @@ const createParseJourneyLeg = (profile, stations, lines, remarks, polylines) =>
if (pt.type === 'WALK') { if (pt.type === 'WALK') {
res.mode = 'walking' res.mode = 'walking'
res.public = true res.public = true
res.distance = pt.gis && pt.gis.dist || null
} else if (pt.type === 'JNY') { } else if (pt.type === 'JNY') {
// todo: pull `public` value from `profile.products` // todo: pull `public` value from `profile.products`
res.id = pt.jny.jid res.id = pt.jny.jid