Browse Source

railway-infrastructure: layer lines

railway-rails
parent
commit
d5799b8f19
  1. 24
      railway-infrastructure.yaml

24
railway-infrastructure.yaml

@ -79,7 +79,7 @@ feature:
{% else %}5
{% endif %}
styles: |-
{% if const.color[tags.railway] %}casing,{% endif %}
{% if const.color[tags.railway] %}casing,casing_layer,{% endif %}
{% if tags.railway == 'narrow_gauge' %}default,narrow
{% else %}default
{% endif %}
@ -102,6 +102,8 @@ feature:
2
{% endif %}
{% endif %}
zIndex: |-
{{ tags.layer|default(0) + 10 }}
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) %}
@ -149,6 +151,26 @@ feature:
{% endif %}
{% endif %}
style:casing_layer:
color: '#ffffff'
zIndex: |-
{{ tags.layer|default(0) + 9.99 }}
width: |-
{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}
2
{% else %}
{% if tags.railway == 'rail' %}
{% if tags.usage == 'main' or tags.usage == 'branch' %}
5
{% else %}
4
{% endif %}
{% else %}
3
{% endif %}
{% endif %}
lineCap: butt
style:narrow:
width: '{% if tags.service == ''yard'' or tags.service == ''siding'' or tags.service == ''spur'' or tags.service == ''crossover'' %}5{% else %}{% if tags.railway == ''rail'' %}{% if tags.usage == ''main'' or tags.usage == ''branch'' %}7{% else %}6{% endif %}{% elseif tags.railway == ''platform'' %}5{% else %}6{% endif %}{% endif %}'
color: '{% if tags.railway == ''rail'' or tags.railway == ''narrow_gauge'' or tags.railway == ''disused'' %}{% if tags.usage == ''main'' %}#ff8100{% elseif tags.usage == ''branch'' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == ''subway'' %}#0000ff{% elseif tags.railway == ''tram'' %}#ff00ff{% elseif tags.railway == ''light_rail'' %}#00BD14{% elseif tags.railway == ''platform'' %}#3f3f3f{% else %}#000000{% endif %}'

Loading…
Cancel
Save