Commit graph

15 commits

Author SHA1 Message Date
Gautier P
25429b3c24 Update prettier version 2020-12-05 11:51:16 +01:00
Antonin Delpeuch
7c02d78f0b
Fix color coding by cost. Closes #340. (#341)
Fix color coding by cost. Closes #340.

This makes sure it is relative to the length of the path.
2020-10-24 12:28:26 +02:00
Henrik Fehlauer
09f987ea07 Combine and reuse translations for keyboard shortcuts
Using i18next's "nesting" and "interpolation" features should reduce the
overall number of strings to translate, as well as provide a
standardized pattern for shortcut tooltips (if applicable).

Note that this approach is still allowing for flexibility regarding
differently structured sentences in each language.

Resolves #315
2020-06-21 18:00:00 +00:00
Henrik Fehlauer
8e78c858c1 Add shortcut to toggle color coding button
Press 'C' repeatedly to switch between the various color coding options.
When the last one is reached, we show the regular route again.
2020-05-30 18:00:00 +00:00
Henrik Fehlauer
d6c648d3eb Fix mute shortcut not working for color coded routes
The mute shortcut would only work for regular routes before.

Note that no-go areas, POIs and tracks continue to be unaffected
by muting, so e.g. peeking at a track below the route is still possible.
2020-05-29 18:00:00 +00:00
Henrik Fehlauer
9d648fc1d7 Make hotline contrast more pleasant
Colorful routes can conflict visually with colourful maps, therefore
having an outline to make the route stand out more makes sense.

However, using black results in very high contrast levels, which can
become distracting in itself. By using a dark gray, this should look
much more balanced, while still fulfilling the original purpose.
2020-05-23 18:00:00 +00:00
Henrik Fehlauer
900f925276 Improve incline coding visuals and use different colors for going uphill
Currently it is a bit difficult to guess the slope of the route for
planning purposes, since even for routes in very hilly terrain the
colors hardly change. Only extremely steep hills are indicated,
and there is no visual difference between going uphill or downhill.

By cutting off earlier, more of the route will show meaningful
differences in color. Note that BRouter's gradients are already
averaged compared to the maximum gradients shown on road signs, so 15%
should be a good compromise (anything steeper is difficult to ride on
for longer periods anyway, and rightly deserves to be colored with an
alarming red).

By using different colors for the min and max parameters, uphill and
downhill sections should now be easy to distinguish.

By introducing two more color stops, the gradient becomes much smoother,
with flat sections featuring a distinctive green, where they were drawn
in a muddy dark green before.

Note that this approach had been implemented like this in QLandkarte GT
for several years now, with great success.
2020-05-22 18:00:00 +00:00
Norbert Renner
61903bb66d Use language-independent URL hash id for quality coding layer (#242) 2019-12-12 12:23:23 +01:00
Norbert Renner
7691e15d61 Add active state to route quality coding button, sync layer (#262) 2019-12-12 11:08:50 +01:00
Norbert Renner
0809b17577 Fix broken route segment coloring (#250)
- with var instead of const all callbacks referenced last value in loop,
add closure
- cloning by property overwrites default when undefined, use L.extend
for Object.assign
2019-11-07 18:34:01 +01:00
Gautier Pelloux-Prayer
f4285f38a1 Remove flat() usage 2019-11-03 14:36:26 +01:00
Gautier Pelloux-Prayer
71c5075f9c Add eslint 2019-11-03 14:29:26 +01:00
Matzepan
544aab0716 Fixed problems with gulp-uglify 2019-10-10 19:36:25 +02:00
Unknown
023e30073d Incline is now the first option, cost the last 2019-10-10 19:36:21 +02:00
Unknown
9eeca7e2d5 Added hotline based route overlay
Added a overlay which reflects the quality of the route based on either:
* cost
* altitude
* incline
2019-10-10 19:35:51 +02:00