Required fork of leaflet-hotline with a new option to disable the
gradient display.
This is was done so that short stretches of very bad surface adjacent to
very good ones are visible.
Also note the eslint-disable-line for this compat warning:
URLSearchParams is not supported in Safari 7, op_mini all, IE 10, android 4.1
don't seem relevant today because those are EOL for a long time now.
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
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.
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.
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.
- 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