Commit graph

30 commits

Author SHA1 Message Date
Simon Legner
76f31aeb2b refact: use shorthand method and property syntax 2024-10-19 13:44:15 +02:00
Tobias
260f34521e Bugfix: TrackMessage selected edge lingered after route deletion 2022-11-05 19:56:24 +01:00
Tobias
aae95877b6 Replaced logic to find nearest segment with turf.nearestPointOnLine()
More accurate on routes that are shaped like an 'U' for whatever reason.
2022-11-02 20:26:32 +01:00
Tobias
f2d034ce8a Improved TrackMessages: highlight matching row when hovering route on map 2022-09-23 22:35:36 +02:00
Gautier P
25429b3c24 Update prettier version 2020-12-05 11:51:16 +01: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
Norbert Renner
d33c795200 Show data table highlight above quality coding layer (#242) 2019-12-12 12:24:43 +01:00
Norbert Renner
0781bb85dc Use Polyline.getCenter instead of bounds to center hover on map (#241)
Returns point on line at half distance instead of centroid of bounds,
which can be far off the line for curved lines and not show line at high
zooms.
2019-11-30 12:28:48 +01:00
Norbert Renner
b57c4f2bf6 Make data row selectable, centers on map, disables hover sync (#241) 2019-11-30 12:18:15 +01:00
Norbert Renner
a585dde182 Add switch to turn off centering hovered data table entry on map (#241) 2019-11-30 09:38:12 +01:00
Unknown
e21bf246ee Center the map to the track when hovering on it 2019-09-27 10:50:26 +02:00
Gautier Pelloux-Prayer
d31be926d2 Increase prettier maxwidth to 120 2019-08-10 19:36:36 +02:00
Gautier Pelloux-Prayer
970a34981f Add prettier and reformat code 2019-05-17 20:55:39 +02:00
Norbert Renner
9112d0984c Remove old layout Control superclass, now obsolete (#111) 2018-07-12 20:28:22 +02:00
Norbert Renner
443ca9c03e Replace sidebar with sidebar-v2, restore old flexbox tabs (#90) (WIP) 2018-03-08 11:47:44 +01:00
Norbert Renner
20ddb88562 Replace L.Mixin.Events with L.Evented (#103) 2018-02-05 17:40:53 +01:00
Norbert Renner
592a3f52f6 Merge branch 'v0.6-fixes' 2017-03-16 21:04:47 +01:00
Norbert Renner
612119f347 Fix data tab showing only two rows (regression from v0.6.2), fixes #72 2017-03-16 19:05:57 +01:00
Gautier Pelloux-Prayer
d7e476db82 Updating UI to also fit on mobile devices. Fix #34 2017-01-23 10:47:28 +01:00
Norbert Renner
4f558a0956 use tab instead of separate control for transit demo 2016-06-03 21:08:48 +02:00
Norbert Renner
224e59380f fix data table height: Firefox treats scrollY as minimum height 2015-05-22 14:31:35 +02:00
Norbert Renner
7c2df94fe8 add track casing + change color to magenta 2015-04-25 16:19:30 +02:00
Norbert Renner
28957b0471 OsmTags column is now WayTags and NodeTags (remove custom header) 2015-04-18 15:10:35 +02:00
Norbert Renner
9eade5bbb6 handle missing messages (+ code style) 2015-03-08 10:02:48 +01:00
Norbert Renner
597303a6d3 fix segment highlight when no match for last message lat/lon 2015-03-08 09:37:39 +01:00
Norbert Renner
bfe5770193 add new columns, no word wrapping in tags column 2015-03-06 17:21:53 +01:00
Norbert Renner
c48f9ffb5c highlight track segment corresponding to hovered table row on map 2015-03-06 17:21:53 +01:00
Norbert Renner
44900f9bd5 don't update table when data tab hidden, update when shown 2015-03-06 17:21:53 +01:00
Norbert Renner
2ab15561a8 configure columns, hide empty columns + destroy because of slow hiding 2015-03-06 17:21:53 +01:00
Norbert Renner
21cd1fbf2a add DataTables for dynamic & interactive track messages table (data tab) 2015-03-06 17:21:53 +01:00