Add sidebar tab with route analysis data
- 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/>.
This commit is contained in:
parent
b181649dff
commit
fc54c65e23
9 changed files with 682 additions and 53 deletions
|
|
@ -180,6 +180,31 @@
|
|||
"itinerary": {
|
||||
"title": "Reiseroute"
|
||||
},
|
||||
"analysis": {
|
||||
"title": "Analyse",
|
||||
"header": {
|
||||
"highway": "Weg",
|
||||
"surface": "Material",
|
||||
"smoothness": "Beschaffenheit"
|
||||
},
|
||||
"table": {
|
||||
"category": "Art",
|
||||
"length": "Länge",
|
||||
"total_known": "Gesamt bekannt:",
|
||||
"unknown": "Unbekannt"
|
||||
},
|
||||
"data": {
|
||||
"highway": {
|
||||
"living_street": "living street"
|
||||
},
|
||||
"surface": {
|
||||
"paving_stones": "paving stones"
|
||||
},
|
||||
"smoothness": {
|
||||
"very_bad": "very bad"
|
||||
}
|
||||
}
|
||||
},
|
||||
"layers": {
|
||||
"category": {
|
||||
"base-layers": "Grundkarten",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue