-
Notifications
You must be signed in to change notification settings - Fork 11
/
emergency.yaml
124 lines (122 loc) · 3.54 KB
/
emergency.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
type: overpass
name:
ast: Servicios d'emerxencia
ca: Serveis d'emergència
cs: Pohotovostní služby
de: Notfalldienste
el: Υπηρεσίες Έκτακτης Ανάγκης
en: Emergency Services
es: Servicios de emergencia
et: Hädaabi teenused
fr: Services d'urgence
gl: Servizos de emerxencia
hu: Vészhelyzet
it: Servizi d'emergenza
ja: 緊急サービス
nb: Nødtjenester
nl: Hulpdiensten
oc: Servicis d'urgéncia
pl: Służby ratunkowe
pt: Emergência
pt-br: Emergência
ro: Servicii urgenta
ru: Экстренные службы
sr: Хитне службе
tr: Acil Servisler
uk: Швидка допомога
query:
11: |-
(
nwr[amenity~"^(.*;|)(fire_station|hospital)(;.*|)$"];
nwr[emergency~"^(.*;|)(lifeguard)(;.*|)$"];
)
13: |-
(
nwr[amenity~"^(.*;|)(fire_station|hospital|police)(;.*|)$"];
nwr[emergency~"^(.*;|)(lifeguard)(;.*|)$"];
node[emergency~"^(.*;|)(phone|defibrillator|access_point)(;.*|)$"];
node[highway^emergency_access_point];
)
feature:
pre: |-
{% set key = null %}
{% set value = null %}
{% for k, d in const %}
{% set kv = k|split('=') %}
{% if attribute(tags, kv[0]) and kv[1] in attribute(tags, kv[0])|split(';') %}
{% set key = kv[0] %}
{% set value = kv[1] %}
{% endif %}
{% endfor %}
{% set kv = key ~ "=" ~ value %}
{% set data = const[kv] %}
description: |-
{{ tagTransList(key, attribute(tags, key)) }}
markerSign: |-
{% if data %}
{{ data.sign|raw }}
{% endif %}
markerSymbol: '{{ markerPointer({ fillColor: data.background|default("#f27f6a") })|raw }}'
listMarkerSymbol: '{{ markerCircle({ fillColor: data.background|default("#f27f6a") })|raw }}'
info: |-
<table>
{% for value, data in const %}
{% if data.zoom <= map.zoom %}
<tr>
<td>{{ markerCircle({ fillColor: data.background|default('#f27f6a') })|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>
<td>{{ tagTrans(value|split('=')[0], value|split('=')[1]) }}</td>
</tr>
{% endif %}
{% endfor %}
</table>
const:
amenity=fire_station:
zoom: '11'
sign: 🔥
amenity=hospital:
zoom: '11'
sign: 🏥
amenity=police:
zoom: '13'
sign: 👮
emergency=lifeguard:
zoom: '11'
sign: <i class='far fa-life-ring'></i>
emergency=phone:
zoom: '13'
sign: 📞
emergency=defibrillator:
zoom: '13'
sign: <img data-src='maki:defibrillator?fill=white'>
background: '#009262'
highway=emergency_access_point:
zoom: '13'
sign: <img data-src='maki:hospital?fill=white'>
background: '#009262'
filter:
type:
name: '{{ trans("filter:type") }}'
type: select
show_default: 'true'
values:
fire_station:
name: '{{ tagTrans("amenity", "fire_station") }}'
query: nwr[amenity^fire_station]
hospital:
name: '{{ tagTrans("amenity", "hospital") }}'
query: nwr[amenity^hospital]
police:
name: '{{ tagTrans("amenity", "police") }}'
query: nwr[amenity^police]
lifeguard:
name: '{{ tagTrans("emergency", "lifeguard") }}'
query: nwr[emergency^lifeguard]
emergency_phone:
name: '{{ tagTrans("emergency", "phone") }}'
query: node[emergency^phone]
defibrillator:
name: '{{ tagTrans("emergency", "defibrillator") }}'
query: node[emergency^defibrillator]
emergency_access_point:
name: '{{ tagTrans("highway", "emergency_access_point") }}'
query: (node[highway^emergency_access_point];node[emergency^access_point];)