diff --git a/index.html b/index.html index 5185d5a..1c21d6f 100644 --- a/index.html +++ b/index.html @@ -1131,6 +1131,16 @@
+ +
+diff --git a/js/control/TrackStats.js b/js/control/TrackStats.js index de6f63f..4040798 100644 --- a/js/control/TrackStats.js +++ b/js/control/TrackStats.js @@ -9,6 +9,9 @@ BR.TrackStats = L.Class.extend({ $('#stats-container').show(); $('#stats-info').hide(); + const hasBeeline = segments.filter((line) => line?._routing?.beeline).length > 0; + document.getElementById('beeline-warning').hidden = !hasBeeline; + var stats = this.calcStats(polyline, segments), length1 = L.Util.formatNum(stats.trackLength / 1000, 1).toLocaleString(), length3 = L.Util.formatNum(stats.trackLength / 1000, 3).toLocaleString(undefined, { diff --git a/locales/en.json b/locales/en.json index f7b92dd..bae2e86 100644 --- a/locales/en.json +++ b/locales/en.json @@ -43,6 +43,7 @@ }, "footer": { "ascend": "Ascend", + "beeline-warning": "Warning: no data for straight lines, values interpolated", "cost": "Cost", "distance": "Distance", "elevation-chart": "Toggle elevation chart",