From 658f12458a1ec538020c70f2527a1412fb5a5218 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?=
 <plepe@noreply.openstreetbrowser.org>
Date: Fri, 26 Jan 2018 20:36:23 +0100
Subject: [PATCH] Emergency: map key

---
 emergency.json | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)

diff --git a/emergency.json b/emergency.json
index 1d82e0b..062f4ad 100644
--- a/emergency.json
+++ b/emergency.json
@@ -19,14 +19,18 @@
     },
     "query": {
         "11": [
-            "(node[amenity~\"^(fire_station|hospital)$\"];",
+            "(",
+            "node[amenity~\"^(fire_station|hospital)$\"];",
             "way[amenity~\"^(fire_station|hospital)$\"];",
-            "relation[amenity~\"^(fire_station|hospital)$\"])"
+            "relation[amenity~\"^(fire_station|hospital)$\"];",
+            ")"
         ],
         "13": [
-            "(node[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];",
+            "(",
+            "node[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];",
             "way[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];",
-            "relation[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"])"
+            "relation[amenity~\"^(fire_station|hospital|police|emergency_phone)$\"];",
+            ")"
         ]
     },
     "feature": {
@@ -38,18 +42,34 @@
             "{% endif %}"
         ]
     },
+    "info": [
+        "<table>",
+        "{% for value, data in const %}",
+        "{% if data.zoom <= map.zoom %}",
+        "  <tr>",
+        "    <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign }}</div></td>",
+        "    <td>{{ tagTrans('amenity', value) }}</td>",
+        "  </tr>",
+        "{% endif %}",
+        "{% endfor %}",
+        "</table>"
+    ],
     "const": {
         "fire_station": {
+            "zoom": "11",
             "sign": "🔥"
         },
         "hospital": {
+            "zoom": "11",
             "sign": "🏥"
         },
         "police": {
+            "zoom": "13",
             "sign": "👮"
         },
         "emergency_phone": {
+            "zoom": "13",
             "sign": "📞"
         }
     }
-}
+}
\ No newline at end of file