Commit graph

13 commits

Author SHA1 Message Date
Tobias
8b311b1add Bugfix: TrackAnalysis selected edges lingered after route deletion 2022-11-05 20:05:40 +01:00
Marcus Jaschen
8750c37901
Fix for incomplete/buggy solution for #494 (#553)
This commit fixes the incomplete/buggy implementation of the fix for #494.
Values are now converted to the expected format before returned from
`wayTagsNormalize()`.
2022-06-07 11:32:47 +02:00
Marcus Jaschen
4b5d08e5ed
fix for #494 (#550)
If a way segment contains more than one `surface` tags (e.g.
`surface=*` and `cycleway:surface=*`), the tag best suited for the
current routing type (currently only *cycling* is supported) is
selected.

i.e. if a `cycleway:surface=` tag belongs to the current way segment
it will be used for the analysis exclusively (all other `surface`
tags are skipped from now on).
2022-06-01 11:08:06 +02:00
Norbert Renner
e5ea9173ae
Merge pull request #497 from nrenner/68-sl-routing
Add straight line support to routing
2022-05-12 16:26:00 +02:00
Marcus Jaschen
d9699127f9 Highlight route segments for parts with normalized surface and smoothness values
This commit ensures that all matching route segments are highlighted when hovering over a surface or smoothness line in the analysis tables.
2021-11-20 14:17:20 +01:00
Marcus Jaschen
9ca93e4c03 Normalize surface and smoothness variants
The `surface` tag exists in different variants,
e.g. `surface`, `cycleway:surface` etc.

Previously, the `surface` and `smoothness` tags were only processed for route analysis if they were found in their canonical form in the BRouter server response.

With this commit, the variants are normalized down to the main tag name which has the effect that they're included in the route analysis.

Fixes #438
2021-11-20 13:46:14 +01:00
Norbert Renner
f185d78dca Support undefined highway tag for beelines 2021-06-29 21:51:28 +02:00
Gautier P
25429b3c24 Update prettier version 2020-12-05 11:51:16 +01:00
Norbert Renner
4892c2a1db Don't update TrackAnalysis when tab is hidden
- add missing show/hide methods called by sidebar and maintain active state
- rename inconsistent tab id
2020-06-30 21:35:51 +02:00
Henrik Fehlauer
8e65d6a3dd Show analysis table highlight above quality coding layer (#304)
When hovering over rows in the analysis tab, highlighted sections for
the route could only be seen on the regular route, but not when any of
the color-coded route visualisations were selected.

Patch based on a similar fix for data table in d33c795200.
2020-05-25 18:00:00 +00:00
Henrik Fehlauer
8ca92e260d Improve analysis tab CSS
There are some ways the look of the analysis tab can be polished:
- Properly right-align the length header
  (it had extra margins required for the sorting arrows in the data tab)
- Use the same font size for table header and body (like in the data tab)
- Improve padding of the totals row (to align with the rows above)
- Add missing style for headings, so they look more balanced
  (the CSS was already there, but the wrong class was used in the HTML)
- Fine-tune vertical spacing (to help visual grouping)
- Remove unused and redundant CSS
- Do not show yellow hover effect over table header
2020-05-24 18:00:00 +00:00
Norbert Renner
71317b84e4 Fix analysis sorting
Return value of the sort compare function is defined as value less, equal or greater than 0, not as boolean.
2020-06-12 10:57:41 +02:00
Marcus Jaschen
fc54c65e23 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/>.
2020-06-07 16:56:50 +02:00