Browse Source

railway-infrastructure: lighten color for tunnels

railway-rails
parent
commit
40bb973457
  1. 11
      railway-infrastructure.yaml

11
railway-infrastructure.yaml

@ -24,7 +24,11 @@ query:
14: (way[railway];node[railway~'^(station|halt|tram_stop)$'];) 14: (way[railway];node[railway~'^(station|halt|tram_stop)$'];)
17: (node[railway];way[railway];) 17: (node[railway];way[railway];)
feature: feature:
title: '{% if tags.ref %}{{ localizedTag(tags, ''ref'') }} - {% endif %}{{ localizedTag(tags, ''name'')|default(localizedTag(tags, ''operator'')) }}'
title: |-
{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}
{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}
{% if attribute(tags, 'tunnel:name') %}- {{ localizedTag(tags, 'tunnel:name') }}{% endif %}
description: |- description: |-
{{ tagTrans('railway', tags.railway) -}} {{ tagTrans('railway', tags.railway) -}}
{%- if tags.usage %} {%- if tags.usage %}
@ -96,7 +100,12 @@ feature:
{% endif %} {% endif %}
color: |- color: |-
{% set color = tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' ? const.color['rail/' ~ tags.usage]|default(const.color.rail) : const.color[tags.railway]|default(const.color.default) %} {% set color = tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' ? const.color['rail/' ~ tags.usage]|default(const.color.rail) : const.color[tags.railway]|default(const.color.default) %}
{% if tags.tunnel and tags.tunnel != 'no' %}
{{ colorInterpolate([ color, '#ffffff' ], 0.3) }}
{% else %}
{{ color }} {{ color }}
{% endif %}
opacity: '1' opacity: '1'
dashArray: '{% if tags.railway == ''rail'' %}{% elseif tags.railway == ''disused'' %}1,5{% elseif tags.railway == ''abandoned'' %}1,7{% endif %}' dashArray: '{% if tags.railway == ''rail'' %}{% elseif tags.railway == ''disused'' %}1,5{% elseif tags.railway == ''abandoned'' %}1,7{% endif %}'
fill: |- fill: |-

Loading…
Cancel
Save