revert
This commit is contained in:
parent
8d7aae8687
commit
41064e2d7b
@ -167,19 +167,17 @@ module.exports = function () {
|
||||
if (!('annotation' in instructions.legs[0]))
|
||||
return '';
|
||||
|
||||
function zip(list_1, list_2, list_3, list_4)
|
||||
{
|
||||
let tuples = [];
|
||||
for (let i = 0; i < list_1.length; ++i) {
|
||||
tuples.push([list_1[i], list_2[i], list_3[i], list_4[i]]);
|
||||
}
|
||||
return tuples;
|
||||
}
|
||||
return instructions.legs.map(l => {
|
||||
var fields = Object.keys(l.annotation);
|
||||
var collected = l.annotation[fields[0]].map((f, i) => {
|
||||
var zipped = [];
|
||||
for (var j = 0; j < fields.length; j++) {
|
||||
zipped.push(l.annotation[fields[j]][i]);
|
||||
}
|
||||
return zipped;
|
||||
});
|
||||
|
||||
return collected.map((v) => {
|
||||
return v.join(':');
|
||||
}).join(',');
|
||||
const values = zip( l.annotation.weight, l.annotation.duration, l.annotation.distance, l.annotation.datasources);
|
||||
return values.map(p => { return p.join(':'); }).join(',');
|
||||
}).join(',');
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user