forked from plepe/openstreetbrowser-categories-main
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emergency.json
129 lines (129 loc) · 4.42 KB
/
emergency.json
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
125
126
127
128
129
{
"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",
"hu": "Vészhelyzet",
"it": "Servizi d'emergenza",
"ja": "緊急サービス",
"nl": "Hulpdiensten",
"pt": "Emergência",
"pt-br": "Emergência",
"ro": "Servicii urgenta",
"ru": "Экстренные службы",
"uk": "Швидка допомога"
},
"query": {
"11": [
"(",
"node[amenity~\"^(fire_station|hospital)$\"];",
"way[amenity~\"^(fire_station|hospital)$\"];",
"relation[amenity~\"^(fire_station|hospital)$\"];",
")"
],
"13": [
"(",
"node[amenity~\"^(fire_station|hospital|police)$\"];",
"way[amenity~\"^(fire_station|hospital|police)$\"];",
"relation[amenity~\"^(fire_station|hospital|police)$\"];",
"node[emergency~\"^(phone)$\"];",
"node[highway=emergency_access_point];",
")"
]
},
"feature": {
"pre": [
"{% if tags.amenity in [ 'fire_station', 'hospital', 'police' ] %}",
"{% set key = 'amenity' %}",
"{% set value = tags.amenity %}",
"{% elseif tags.emergency %}",
"{% set key = 'emergency' %}",
"{% set value = tags.emergency %}",
"{% elseif tags.highway == 'emergency_access_point' %}",
"{% set key = 'highway' %}",
"{% set value = tags.highway %}",
"{% endif %}",
"{% set kv = key ~ \"=\" ~ value %}"
],
"description": "{{ tagTrans(key, value) }}",
"markerSign": [
"{% set data = const[kv] %}",
"{% 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=phone": {
"zoom": "13",
"sign": "📞"
},
"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]"
},
"emergency_phone": {
"name": "{{ tagTrans('emergency', 'phone') }}",
"query": "node[emergency=phone]"
},
"emergency_access_point": {
"name": "{{ tagTrans('highway', 'emergency_access_point') }}",
"query": "node[highway=emergency_access_point]"
}
}
}
}
}