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

@ -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) 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) - [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) 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)

View file

@ -1150,8 +1150,6 @@
); );
</script> </script>
<script src="https://unpkg.com/googlediff@0.1.0/javascript/diff_match_patch.js"></script>
<script src="dist/core-js-bundle.min.js"></script> <script src="dist/core-js-bundle.min.js"></script>
<script src="dist/regenerator-runtime.js"></script> <script src="dist/regenerator-runtime.js"></script>
<!-- <script src="dist/url-search-params.js"></script> --> <!-- <script src="dist/url-search-params.js"></script> -->

View file

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

View file

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

View file

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