Cleanup and credits

This commit is contained in:
Norbert Renner 2021-04-09 11:52:51 +02:00
parent 7aa2fcb93c
commit 393a3fa129
5 changed files with 6 additions and 5 deletions

View file

@ -230,7 +230,6 @@ BR.Export._concatTotalTrack = function (segments) {
let coordinates = [];
let properties;
//console.time('_concatTotalTrack');
for (const [segmentIndex, segment] of segments.entries()) {
const feature = segment.feature;
if (!feature) continue;
@ -284,7 +283,6 @@ BR.Export._concatTotalTrack = function (segments) {
}
coordinates = coordinates.concat(featureCoordinates);
}
//console.timeEnd('_concatTotalTrack');
return turf.featureCollection([turf.lineString(coordinates, properties)]);
};

View file

@ -1,3 +1,4 @@
// derived from BRouter btools.router.OsmTrack.formatAsGpx
BR.Gpx = {
format: function (geoJson, turnInstructionMode = 0, transportMode = 'bike') {
if (!geoJson?.features) return '';
@ -72,7 +73,6 @@ BR.Gpx = {
comment += ' plain-ascend = ' + props['plain-ascend'];
comment += ' cost=' + props['cost'];
if (props['total-energy']) {
// TODO 'wh'? (also for stats, see issue),
// see brouter OsmTrack.getFormattedEnergy
comment += ' energy=' + (props['total-energy'] / 3600000).toFixed(1) + 'kwh';
}

View file

@ -111,6 +111,7 @@
}
}
// from BRouter btools.router.VoiceHint
VoiceHints.commands = (function () {
return {
1: new Command('C', 1, 1002, 'Straight', 'straight'),