|
@ -10,23 +10,23 @@ |
|
|
"17": "(node[railway];way[railway];)" |
|
|
"17": "(node[railway];way[railway];)" |
|
|
}, |
|
|
}, |
|
|
"feature": { |
|
|
"feature": { |
|
|
"style:casing": { |
|
|
|
|
|
"weight": "{% 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 %}", |
|
|
|
|
|
"dashArray": "2,4", |
|
|
|
|
|
"lineCap": "butt" |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}", |
|
|
|
|
|
"description": "{{ tagTrans('railway', tags.railway) }}", |
|
|
|
|
|
"body": [ |
|
|
|
|
|
"{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}", |
|
|
|
|
|
"{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}", |
|
|
|
|
|
"{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}", |
|
|
|
|
|
"{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>", |
|
|
|
|
|
"{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}" |
|
|
|
|
|
], |
|
|
|
|
|
"markerSign": null, |
|
|
|
|
|
"priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", |
|
|
|
|
|
"styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}", |
|
|
"style": { |
|
|
"style": { |
|
|
"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 %}", |
|
|
|
|
|
"weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}1{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}3{% else %}2{% endif %}{% elseif tags.railway == 'platform' %}1{% else %}2{% endif %}{% endif %}", |
|
|
"weight": "{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}1{% else %}{% if tags.railway == 'rail' %}{% if tags.usage == 'main' or tags.usage == 'branch' %}3{% else %}2{% endif %}{% elseif tags.railway == 'platform' %}1{% else %}2{% 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 %}", |
|
|
|
|
|
"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 %}", |
|
|
"fillColor": [ |
|
|
|
|
|
"{% if tags.railway == 'platform' %}", |
|
|
|
|
|
"#3f3f3f", |
|
|
|
|
|
"{% elseif type == 'node' %}", |
|
|
|
|
|
"#ffffff", |
|
|
|
|
|
"{% endif %}" |
|
|
|
|
|
], |
|
|
|
|
|
"fill": [ |
|
|
"fill": [ |
|
|
"{% if tags.railway == 'platform' %}", |
|
|
"{% if tags.railway == 'platform' %}", |
|
|
"1", |
|
|
"1", |
|
@ -35,7 +35,13 @@ |
|
|
"{% else %}", |
|
|
"{% else %}", |
|
|
"{% endif %}" |
|
|
"{% endif %}" |
|
|
], |
|
|
], |
|
|
"opacity": "1", |
|
|
|
|
|
|
|
|
"fillColor": [ |
|
|
|
|
|
"{% if tags.railway == 'platform' %}", |
|
|
|
|
|
"#3f3f3f", |
|
|
|
|
|
"{% elseif type == 'node' %}", |
|
|
|
|
|
"#ffffff", |
|
|
|
|
|
"{% endif %}" |
|
|
|
|
|
], |
|
|
"fillOpacity": [ |
|
|
"fillOpacity": [ |
|
|
"{% if tags.railway == 'platform' %}", |
|
|
"{% if tags.railway == 'platform' %}", |
|
|
"0.2", |
|
|
"0.2", |
|
@ -44,17 +50,11 @@ |
|
|
"{% endif %}" |
|
|
"{% endif %}" |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
"styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}", |
|
|
|
|
|
"markerSign": null, |
|
|
|
|
|
"body": [ |
|
|
|
|
|
"{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}", |
|
|
|
|
|
"{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}", |
|
|
|
|
|
"{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}", |
|
|
|
|
|
"{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>", |
|
|
|
|
|
"{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}" |
|
|
|
|
|
], |
|
|
|
|
|
"description": "{{ tagTrans('railway', tags.railway) }}", |
|
|
|
|
|
"priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", |
|
|
|
|
|
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}" |
|
|
|
|
|
|
|
|
"style:casing": { |
|
|
|
|
|
"weight": "{% 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 %}", |
|
|
|
|
|
"lineCap": "butt", |
|
|
|
|
|
"dashArray": "2,4" |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |