adjusted to in/out. only emit one of them for depart/arrive

This commit is contained in:
Moritz Kobitzsch
2016-05-12 11:16:52 +02:00
committed by Patrick Niklaus
parent 4d9aa65e78
commit 9c8bf820de
10 changed files with 161 additions and 105 deletions
+5 -3
View File
@@ -138,7 +138,9 @@ module.exports = function () {
};
this.bearingList = (instructions) => {
return this.extractInstructionList(instructions, s => s.intersections[0].bearings[s.intersections[0].bearing_after]);
return this.extractInstructionList(instructions, s => (typeof s.intersections[0].out !== 'undefined')
? s.intersections[0].bearings[s.intersections[0].out]
: 0);
};
this.annotationList = (instructions) => {
@@ -187,8 +189,8 @@ module.exports = function () {
for( i = 1; i < intersection.bearings.length; ++i )
string = string + ' ' + intersection.entry[i]+':'+intersection.bearings[i];
return string;
}).join(',')
}).join(';')
}).join(',');
}).join(';');
};
this.modeList = (instructions) => {