-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrailway-routes.yaml
66 lines (65 loc) · 2.24 KB
/
railway-routes.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
type: overpass
name:
ca: Rutes Fèrries
cs: Železniční trasy
de: Eisenbahnrouten
en: Railway Routes
es: Rutas de ferrocarril
fr: Lignes ferroviaires
gl: Liñas de ferrocarril
hu: Vasútvonalak
it: Percorsi ferroviari
ja: 鉄道ルート
nb: Jernbaneruter
nl: Spoorwegroutes
oc: Linhas ferroviàrias
pl: Trasy kolejowe
pt: Rotas ferroviárias
pt-br: Rotas ferroviárias
ru: Железнодорожные маршруты
sr: Трасе железнице
tr: Demiryolu Güzergahları
query:
12: relation[type=route][route=railway]
members: true
feature:
pre: '{% set color = ''#'' ~ tags.operator|default('''')|md5|slice(0, 6) %}'
listMarkerSymbol: '{{ markerLine({ ''width'': 4, ''color'': color })|raw }}'
description: '{{ tags.operator }}'
title: '{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}'
styles: ''
markerSymbol: ''
memberFeature:
pre: |-
{% set refs = [] %}
{% set color = '#d41d8c' %}
{% for master in masters %}
{% if master.tags.operator %}
{% set color = '#' ~ master.tags.operator|md5|slice(0, 6) %}
{% endif %}
{% if master.tags.ref %}
{% set refs = refs|merge([ master.tags.ref ]) %}
{% endif %}
{% endfor %}
title: ''
body: |-
<h4>Routes</h4>
<ul>
{% for master in masters %}
{% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}
<li data-object="{{ master.id }}" style='list-style: none;'>
<span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>
<span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>
<span class='description'>{{ master.tags.operator }}</span>
</li>
{% endfor %}
</ul>
listExclude: '1'
style:
color: '{{ color }}'
width: 4
opacity: 1
text: '{{ refs|join('' · '') }} '
textRepeat: '1'
textOffset: '12'
textFontWeight: bold