Browse Source

railway-rails: build map key from const

railway-rails
parent
commit
db21abbcb4
  1. 48
      railway-rails.yaml

48
railway-rails.yaml

@ -123,41 +123,31 @@ feature:
info: |-
<table>
<tr>
<td>{{ markerLine(evaluate({ "railway": "rail", "usage": "main" }))|raw }}</td>
<td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>
</tr>
<tr>
<td>{{ markerLine(evaluate({ "railway": "rail" }))|raw }}</td>
<td>{{ tagTrans('railway', 'rail') }}</td>
</tr>
<tr>
<td>{{ markerLine(evaluate({ "railway": "narrow_gauge" }))|raw }}</td>
<td>{{ tagTrans('railway', 'narrow_gauge') }}</td>
</tr>
<tr>
<td>{{ markerLine(evaluate({ "railway": "light_rail" }))|raw }}</td>
<td>{{ tagTrans('railway', 'light_rail') }}</td>
</tr>
<tr>
<td>{{ markerLine(evaluate({ "railway": "subway" }))|raw }}</td>
<td>{{ tagTrans('railway', 'subway') }}</td>
</tr>
{% if map.zoom >= 14 %}
<tr>
<td>{{ markerLine(evaluate({ "railway": "tram" }))|raw }}</td>
<td>{{ tagTrans('railway', 'tram') }}</td>
</tr>
{% endif %}
{% for k, v in const.types %}
{% if not v.hideInfo %}
{% set railway_usage = k|split('/') %}
{% if railway_usage|length == 2 %}
<tr>
<td>{{ markerLine(evaluate({ 'railway': railway_usage[0], 'usage': railway_usage[1] }))|raw }}</td>
<td>{{ tagTrans('railway', railway_usage[0]) }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', railway_usage[1]) }}</td>
</tr>
{% else %}
<tr>
<td>{{ markerLine(evaluate({ "railway": k }))|raw }}</td>
<td>{{ tagTrans('railway', k) }}</td>
</tr>
{% endif %}
{% endif %}
{% endfor %}
</table>
const:
types:
rail:
color: '#000000'
rail/main:
color: '#ff8100'
rail/branch:
color: '#daca00'
rail:
color: '#000000'
narrow_gauge:
color: '#000000'
subway:
@ -172,4 +162,4 @@ const:
color: '#007f00'
default:
color: '#ff0000'
hide: true
hideInfo: true
Loading…
Cancel
Save