Browse Source

car_routes: complete; color by 'network' tag

fitness_trail
parent
commit
529e8ecfd8
  1. 18
      car_routes.json
  2. 2
      railway-routes.json

18
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 @@
"<h4>Routes</h4>",
"<ul>",
"{% for master in masters %}",
" <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</b>{% if master.tags.network %} <i>{{ tagTrans('network', master.tags.network) }}</i>{% endif %}</li>",
" {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}",
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>",
" <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
" <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
" </li>",
"{% endfor %}",
"</ul>"
],
"listExclude": "1",
"style": {
"color": "#ff0000",
"color": "{{ color }}",
"width": 4,
"opacity": 1,
"text": "{{ refs|join(' ') }} ",

2
railway-routes.json

@ -32,7 +32,7 @@
"title": "",
"body": [
"<h4>Routes</h4>",
"<ul style='padding-left: 0'>",
"<ul>",
"{% for master in masters %}",
" {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}",
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>",

Loading…
Cancel
Save