diff --git a/emergency.json b/emergency.json index ab04435..0b39e12 100644 --- a/emergency.json +++ b/emergency.json @@ -28,13 +28,23 @@ ], "13": [ "(", - "node[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];", - "way[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];", - "relation[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];", + "node[amenity~\"^(fire_station|hospital|police)$\"];", + "way[amenity~\"^(fire_station|hospital|police)$\"];", + "relation[amenity~\"^(fire_station|hospital|police)$\"];", + "node[emergency~\"^(phone)$\"];", ")" ] }, "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 %}", + "{% endif %}" + ], "description": "{{ tagTrans('amenity', tags.amenity) }}", "markerSign": [ "{% set data = const[tags.amenity] %}", @@ -49,28 +59,28 @@ "{% if data.zoom <= map.zoom %}", " ", " {{ markerCircle({})|raw }}
{{ data.sign }}
", - " {{ tagTrans('amenity', value) }}", + " {{ tagTrans(value|split('=')[0], value|split('=')[1]) }}", " ", "{% endif %}", "{% endfor %}", "" ], "const": { - "fire_station": { + "amenity=fire_station": { "zoom": "11", "sign": "🔥" }, - "hospital": { + "amenity=hospital": { "zoom": "11", "sign": "🏥" }, - "police": { + "amenity=police": { "zoom": "13", "sign": "👮" }, - "emergency_phone": { + "emergency=phone": { "zoom": "13", "sign": "📞" } } -} +} \ No newline at end of file