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
|
|
@ -249,6 +249,38 @@ input#trackname:focus:invalid {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.track-analysis-header-distance {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.track-analysis-table td {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
table.dataTable.track-analysis-table tfoot td {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
table.track-analysis-table tr:hover {
|
||||
background-color: rgba(255, 255, 0, 0.3);
|
||||
}
|
||||
|
||||
.track-analysis-title {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.track-analysis-distance {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.track-analysis-heading {
|
||||
margin-top: 15px;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* dashed line animation, derived from Chris Coyier and others
|
||||
https://css-tricks.com/svg-line-animation-works/
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue