Commit graph

113 commits

Author SHA1 Message Date
Henrik Fehlauer
36d8a207ab Convert all shortcuts to act on keydown already
Contrary to mouse clicks, when pressing keys on a keyboard the
standard behavior is to perform the associated action immediately,
not only when releasing the key again. This should also improve the
perceived performance slightly.

Note that the 'D' shortcut had formerly been handled by Leaflet, which
we now have to do on our own.

While at it, move the character codes over to the options variable, as
found in other parts of the codebase already.

Also removing the listener from the container does not seem needed
anymore nowadays.
2020-05-26 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
32d4a26dfd Fix nogo drawing for mobile Chrome, fixes #259 2020-06-05 20:11:36 +02:00
Norbert Renner
f197fb31be Exclude loaded tracks from URL hash 2020-06-03 20:24:17 +02:00
Norbert Renner
9fd9a52a8c Set track color yellow for CyclOSM (#297) 2020-06-02 22:09:22 +02:00
Norbert Renner
502735cb8e
Replace large awesome-markers with smaller vector-markers (#268) 2019-12-18 21:28:58 +01:00
Norbert Renner
9af707a56e Set loaded markers non-interactive, below route markers (#240) 2019-12-13 14:45:58 +01:00
Norbert Renner
40ad243176 Disable loading wpt type=from/to/via as route because of issues (#254) 2019-12-13 14:30:08 +01:00
Norbert Renner
9d59d51549 Improve distance markers a bit (#243)
- make icons a bit smaller
  - also results in better vertical centering
- round icon too small for 3 digits, multiply width by digits
- increase opacity a bit for better readability
2019-12-13 12:44:24 +01: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
41b349dc9f Remove gap in control bar by hiding empty dummy track loader button 2019-12-11 17:27:55 +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
Gautier Pelloux-Prayer
a23634e1c4 Use custom markers for start and end 2019-10-19 10:15:36 +02:00
Norbert Renner
ddf8e27085
Merge pull request #226 from bagage/222-add-users-poi
export user's POI (point of interest)
2019-10-10 22:17:44 +02:00
Gautier Pelloux-Prayer
fa5af58372 Add markers POI layer 2019-10-10 21:07:49 +02:00
Norbert Renner
a038f0448d
Merge branch 'master' into feature/distance-marker 2019-10-10 20:04:14 +02:00
matzepan
bc480af774
Merge branch 'master' into feature/distance-marker 2019-10-10 19:48:03 +02: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
matzepan
4fdd375b5c removed let 2019-10-02 23:36:35 +02:00
Unknown
fde748f7cf Let seems not to be supported 2019-10-02 23:27:45 +02:00
Unknown
ff1499c62b If a track contains waypoints, they are set to the router 2019-10-02 16:16:29 +02:00
Unknown
1828a642c3 Remove markers when route is deleted 2019-10-02 15:28:37 +02:00
Unknown
173752c691 Added distance markers to the routing path 2019-10-02 14:23:27 +02:00
Unknown
ee54d45790 Changed loaded track to noninteractive 2019-10-01 20:41:28 +02:00
Unknown
4854342c92 Prettified 2019-09-17 12:21:29 +02:00
Unknown
936e5732b2 Implementation of Track loading
Use leaflet-filelayer to load kml, gpx, geojson, json tracks and display them as new Overlay layer.
2019-09-17 12:20:24 +02:00
Gautier Pelloux-Prayer
d31be926d2 Increase prettier maxwidth to 120 2019-08-10 19:36:36 +02:00
Gautier Pelloux-Prayer
d00fe15ff1 Refactor error handling 2019-08-07 18:20:24 +02:00
Gautier Pelloux-Prayer
ba12f0d609 Extract nogo areas upload in BR.NogoAreas 2019-08-07 11:08:19 +02:00
Norbert Renner
ef41a9e5ff Restore active layers (#205) 2019-06-18 09:14:08 +02:00
Gautier Pelloux-Prayer
60029df6d9 Upgrade leaflet geocoder to properly parse lat/lng 2019-06-16 19:04:18 +02:00
Henrik Fehlauer
2022069066 Fix unintentional shortcut activations when typing text
Test Plan:
Pressing 'd' key in search box and in custom profile editor no longer
activates route drawing.
2019-05-30 23:52:59 +02:00
Gautier Pelloux-Prayer
970a34981f Add prettier and reformat code 2019-05-17 20:55:39 +02:00
Gautier Pelloux-Prayer
d009aa5bc6 Add reverse route button 2019-05-11 17:52:16 +02:00
Norbert Renner
430ec1cd38 Refactor StravaSegments init into plugin wrapper 2019-04-04 12:03:28 +02:00
Norbert Renner
282edbbc01 Prevent unnecessary tile loading for default base layer
by only setting it if no layer activated by hash URL
2019-04-03 12:41:39 +02:00
Norbert Renner
d60b1ad15f Use layer id instead of name for hash
- to make it work across languages and on translation changes
- with legacy support for old names
2019-04-02 22:00:32 +02:00
Norbert Renner
f5c952a0eb Refactor hash layers 2019-04-01 21:07:26 +02:00
Norbert Renner
d83ffa3fbc Support optional and custom layers in hash URL
- extend layer control to get current active layers (and more)
- access layer control in hash instead of static initial list
- use ',' layer separator and encode layers individually, so that comma
in layer name gets encoded and is not mistaken as separator as with '-'
2019-03-29 22:20:52 +01:00
Phyks (Lucas Verney)
18327ebbf0 Fix polygon edition 2019-02-21 07:55:55 +01:00
Phyks (Lucas Verney)
ab06b8a8d1 Fix an error when creating a nogo circle 2019-02-20 10:06:31 +01:00
Phyks (Lucas Verney)
6e60751db0 Render polygons from URL hash and pass it to BRouter server 2019-02-18 21:00:36 +01:00
Norbert Renner
54dfa93624 Focus map after sidebar close (#114)
to be consistent with Leaflet Controls and EasyButton behaviour; 
removes focus outline in Firefox from tab that would else remain there
2018-07-25 22:03:23 +02:00
Norbert Renner
59827a524f Restore (short) attribution on the map, closes #110 2018-07-03 20:41:26 +02:00