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
This commit is contained in:
Norbert Renner 2019-12-13 12:44:24 +01:00
parent d33c795200
commit 9d59d51549
3 changed files with 11 additions and 6 deletions

View file

@ -17,7 +17,8 @@ BR.Routing = L.Routing.extend({
snapping: null,
zIndexOffset: -2000,
distanceMarkers: {
iconSize: 20,
// width as base number, multiplied by number of digits + one for padding
iconSize: [6, 18],
offset: 5000,
textFunction: function(distance) {
return distance / 1000;