From 393a3fa129aeb23ee5f0884d0fde7db2672c4524 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Fri, 9 Apr 2021 11:52:51 +0200 Subject: [PATCH] Cleanup and credits --- README.md | 4 ++++ index.html | 2 -- js/control/Export.js | 2 -- js/format/Gpx.js | 2 +- js/format/VoiceHints.js | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 098c61f..269d120 100644 --- a/README.md +++ b/README.md @@ -130,3 +130,7 @@ Copyright (c) 2018 Norbert Renner and [contributors](https://github.com/nrenner/ Copyright (c) 2014-2021 Denis Pushkarev; [MIT License](https://github.com/zloirock/core-js/blob/master/LICENSE) - [regenerator-runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) Copyright (c) 2014-present, Facebook, Inc.; [MIT License](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/LICENSE) +- [tokml](https://github.com/mapbox/tokml) + Copyright (c) 2015, Mapbox All rights reserved; [BSD-2-Clause License](https://github.com/mapbox/tokml/blob/master/LICENSE.md) +- [Jest](https://github.com/facebook/jest) + Copyright (c) Facebook, Inc. and its affiliates; [MIT License](https://github.com/facebook/jest/blob/master/LICENSE) diff --git a/index.html b/index.html index 6195761..e4aa5f4 100644 --- a/index.html +++ b/index.html @@ -1150,8 +1150,6 @@ ); - - diff --git a/js/control/Export.js b/js/control/Export.js index 8f94f10..3a9ce21 100644 --- a/js/control/Export.js +++ b/js/control/Export.js @@ -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)]); }; diff --git a/js/format/Gpx.js b/js/format/Gpx.js index de84d54..1e4ca80 100644 --- a/js/format/Gpx.js +++ b/js/format/Gpx.js @@ -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'; } diff --git a/js/format/VoiceHints.js b/js/format/VoiceHints.js index bf96281..1d91c4b 100644 --- a/js/format/VoiceHints.js +++ b/js/format/VoiceHints.js @@ -111,6 +111,7 @@ } } + // from BRouter btools.router.VoiceHint VoiceHints.commands = (function () { return { 1: new Command('C', 1, 1002, 'Straight', 'straight'),