mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
parsePolyline: profile param 💥
This commit is contained in:
parent
a45d640272
commit
6ca7924f7b
3 changed files with 4 additions and 4 deletions
|
@ -42,7 +42,7 @@ const createParseJourneyLeg = (profile, data) => {
|
|||
let p = pt.jny.polyG.polyXL
|
||||
p = Array.isArray(p) && polylines[p[0]]
|
||||
// todo: there can be >1 polyline
|
||||
const parse = profile.parsePolyline(data)
|
||||
const parse = profile.parsePolyline(profile, data)
|
||||
res.polyline = p && parse(p) || null
|
||||
}
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ const createParseMovement = (profile, data) => {
|
|||
}
|
||||
|
||||
if (m.ani.poly) {
|
||||
const parse = profile.parsePolyline(data)
|
||||
const parse = profile.parsePolyline(profile, data)
|
||||
res.polyline = parse(m.ani.poly)
|
||||
} else if (m.ani.polyG) {
|
||||
let p = m.ani.polyG.polyXL
|
||||
p = Array.isArray(p) && polylines[p[0]]
|
||||
// todo: there can be >1 polyline
|
||||
const parse = profile.parsePolyline(data)
|
||||
const parse = profile.parsePolyline(profile, data)
|
||||
res.polyline = p && parse(p) || null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const {toGeoJSON} = require('@mapbox/polyline')
|
||||
const distance = require('gps-distance')
|
||||
|
||||
const createParsePolyline = ({locations}) => {
|
||||
const createParsePolyline = (profile, {locations}) => {
|
||||
// todo: what is p.delta?
|
||||
// todo: what is p.type?
|
||||
// todo: what is p.crdEncS?
|
||||
|
|
Loading…
Add table
Reference in a new issue