- adds a new analysis tab in the sidebar
- the analysis tab shows length distribution for different way types, surface, and smoothness
- table rows can be hovered/clicked to highlight the according segments on the map (similar behaviour as the detailed data table)
- localization is implemented for `de` and `en`
- the method for finding segment edges was extracted from `js/control/TrackMessages.js` into `js/util/TrackEdges.js` as it's used in the new analysis class too (the Gulp config was changed to reflect that)
Notes:
I had the idea to use the *DataTable* plugin for rendering the tables but decided against it. The only meaningful way to sort such a table is by the length column and that's already the case. So it's just three plain, old HTML tables, rendered by jQuery.
For meaningful statistics the `processUnusedTags` setting has to be enabled in the routing profile. Only in this case the BRouter backend includes all needed tags (`highway`, `surface`, and `smoothness`) for *every* route segment in the response. I’ve enabled that setting for all profiles at my BRouter-web instance at <https://brouter.m11n.de/>.
The privacy link now is relative to the site that it is hosted on
When opening the about page at brouter-web the privacy link left down in the corner is a relative one to https://brouter.de/privacypolicy.html. When running an own instance I think it should link the that page, because the operator could have other terms, for example time for saving logs. So you shoud change that to a relative path to /privacypolicy.html so every operator can have another text.
You could also include a standard privacypolicy.html and put it to /brouter-web/privacypolicy.html so it can be customized if needed.
- adopt horizontal styles
- common font size for layers tab
- adopt to layer switcher layout with slider as child of label element
- separate slider wrapper from control, as overlay slider is none
- migrate localStorage legacy key
Use "x | y" format instead "x (y)"
(The old format was a bit confusing, e.g. the second part of the label
could be mistaken for an "explanation" of the first part, while it
actually is an entirely separate label.)
Repeat unit for every metric.
Use plural for units.
Use "-" everywhere when a metric is not yet available instead of mixing
"-" and "0".
Properly revert to initial "-" when removing route instead of showing
"0".
Show "0" instead of "" when route length cannot be calculated yet.
Slightly change wording ("Energy per 100km").