diff --git a/js/control/TrackStats.js b/js/control/TrackStats.js index 216b28e..34f5c79 100644 --- a/js/control/TrackStats.js +++ b/js/control/TrackStats.js @@ -11,14 +11,17 @@ BR.TrackStats = BR.Control.extend({ update: function (polyline, segments) { var stats = this.calcStats(polyline, segments), + length1 = L.Util.formatNum(stats.trackLength/1000,1), + length3 = L.Util.formatNum(stats.trackLength/1000,3), + meanCostFactor = stats.trackLength ? L.Util.formatNum(stats.cost / stats.trackLength, 2) : '', html = ''; html += '
| Length: | ' - + L.Util.formatNum(stats.trackLength/1000,1) + ' | km |
| Length: | ' + length1 + ' | km |
| Ascent filtered: | ' + stats.filteredAscend + ' | m |
| Ascent plain: | ' + stats.plainAscend + ' | m |
| Cost: | ' + stats.cost + ' | |
| Mean cost: | ' + meanCostFactor + ' |