diff --git a/car_routes.json b/car_routes.json index 2cb3ba795..22e00baa7 100644 --- a/car_routes.json +++ b/car_routes.json @@ -8,18 +8,25 @@ }, "members": true, "feature": { + "pre": "{% set color = '#' ~ tags.network|default('')|md5|slice(0, 6) %}", "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': '#ff0000' )].color })|raw }}", + "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}", + "markerSymbol": "", "styles": "" }, "memberFeature": { "pre": [ "{% set refs = [] %}", + "{% set color = '#d41d8c' %}", "{% if tags.ref %}", " {% set refs = refs|merge([ tags.ref ]) %}", "{% endif %}", "", "{% for master in masters %}", + " {% if master.tags.network %}", + " {% set color = '#' ~ master.tags.network|md5|slice(0, 6) %}", + " {% endif %}", " {% if master.tags.ref %}", " {% set refs = refs|merge([ master.tags.ref ]) %}", " {% endif %}", @@ -29,13 +36,18 @@ "

Routes

", "" ], "listExclude": "1", "style": { - "color": "#ff0000", + "color": "{{ color }}", "width": 4, "opacity": 1, "text": "{{ refs|join(' ') }} ", diff --git a/railway-routes.json b/railway-routes.json index c81f51fa9..ba5c66fb4 100644 --- a/railway-routes.json +++ b/railway-routes.json @@ -32,7 +32,7 @@ "title": "", "body": [ "

Routes

", - "