Browse Source

railway-rails: lifecycle styles

railway-rails
parent
commit
1e54478e72
  1. 45
      railway-rails.yaml

45
railway-rails.yaml

@ -61,8 +61,8 @@ feature:
listMarkerSymbol: line listMarkerSymbol: line
styles: |- styles: |-
{% if tags.bridge and tags.bridge != 'no' %}casing_bridge,{% endif %} {% if tags.bridge and tags.bridge != 'no' %}casing_bridge,{% endif %}
{% if const.types[tags.railway] %}casing,casing_layer,{% endif %}
{% if tags.railway in ['abandoned', 'disused', 'razed'] %}disused,{% endif %}
casing,casing_layer,
{% if lifecyle != 'active' %}background,{% endif %}
{% if tags.railway == 'narrow_gauge' %}default,narrow {% if tags.railway == 'narrow_gauge' %}default,narrow
{% else %}default {% else %}default
{% endif %} {% endif %}
@ -75,14 +75,13 @@ feature:
{{ color }} {{ color }}
opacity: 1 opacity: 1
lineCap: |-
{{ lifecyle == 'active' ? 'round' : 'butt' }}
dashArray: |- dashArray: |-
{% if tags.railway == 'disused' %}1,5
{% elseif tags.railway == 'abandoned' %}1,7
{% elseif tags.railway == 'razed' %}1,9
{% endif %}
{{ const.lifecyle[lifecyle].dashArray }}
fill: false fill: false
style:disused:
style:background:
width: |- width: |-
{{ width }} {{ width }}
zIndex: |- zIndex: |-
@ -139,6 +138,24 @@ info: |-
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<tr>
<td>{{ markerLine(evaluate({ 'railway': 'rail', 'tunnel': 'yes'}))|raw }}</td>
<td>{{ keyTrans('tunnel') }}</td>
</tr>
<tr>
<td>{{ markerLine(evaluate({ 'railway': 'rail', 'bridge': 'yes'}))|raw }}</td>
<td>{{ keyTrans('bridge') }}</td>
</tr>
{% for k, v in const.lifecyle %}
{% if not v.hideInfo %}
<tr>
<td>{{ markerLine(evaluate({ 'railway': k, (k): 'rail'}))|raw }}</td>
<td>{{ tagTrans('railway', k) }}</td>
</tr>
{% endif %}
{% endfor %}
</table> </table>
const: const:
types: types:
@ -163,3 +180,17 @@ const:
default: default:
color: '#ff0000' color: '#ff0000'
hideInfo: true hideInfo: true
lifecyle:
active:
dashArray: ''
hideInfo: true
proposed:
dashArray: '5,5'
construction:
dashArray: '5,2'
disused:
dashArray: '2,5'
abandoned:
dashArray: '1,5'
razed:
dashArray: '1,9'
Loading…
Cancel
Save