From 5c080689cc15191fc32d6e2248d2fb589ffaa508 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Tue, 4 Dec 2018 09:18:32 +0100
Subject: [PATCH] new category organisations

---
 index.json         |  3 ++
 organisations.json | 75 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)
 create mode 100644 organisations.json

diff --git a/index.json b/index.json
index 77bd73e..b2f3364 100644
--- a/index.json
+++ b/index.json
@@ -100,6 +100,9 @@
                 },
                 {
                     "id": "tourism_services"
+                },
+                {
+                    "id": "organisations"
                 }
             ]
         },
diff --git a/organisations.json b/organisations.json
new file mode 100644
index 0000000..dcc1aa4
--- /dev/null
+++ b/organisations.json
@@ -0,0 +1,75 @@
+{
+    "type": "overpass",
+    "name": {
+        "en": "Organisations"
+    },
+    "query": {
+        "13": [
+            "(",
+            "nwr[office~\"^(ngo|quango|political_party|association|charity)$\"];",
+            ")"
+        ]
+    },
+    "feature": {
+        "pre": [
+            "{% set key = 'office' %}",
+            "{% set value = tags.office %}",
+            ""
+        ],
+        "description": "{{ tagTrans(key, value) }}",
+        "body": "{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}<br/>{% endif %}",
+        "markerSign": [
+            "{% set data = const[key ~ '=' ~ value] %}",
+            "{% if data %}",
+            "{{ data.sign|raw }}",
+            "{% endif %}"
+        ],
+        "priority": [
+            "{% set data = const[key ~ '=' ~ value] %}",
+            "{% if data %}",
+            "{{ data.priority }}",
+            "{% endif %}"
+        ]
+    },
+    "info": [
+        "<table>",
+        "{% for kv, data in const %}",
+        "{% if data.zoom <= map.zoom %}",
+        "  <tr>",
+        "    <td>{{ markerCircle({})|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
+        "    <td>",
+        "      {{ tagTrans(kv|split('=')[0], kv|split('=')[1]) }}",
+        "    </td>",
+        "  </tr>",
+        "{% endif %}",
+        "{% endfor %}",
+        "</table>"
+    ],
+    "const": {
+        "office=ngo": {
+            "priority": 0,
+            "sign": "<i class='fas fa-users'></i>",
+            "zoom": 13
+        },
+        "office=quango": {
+            "priority": 0,
+            "sign": "<i class='fas fa-users'></i>",
+            "zoom": 13
+        },
+        "office=political_party": {
+            "priority": 0,
+            "sign": "<i class='fas fa-flag'></i>",
+            "zoom": 13
+        },
+        "office=association": {
+            "priority": 0,
+            "sign": "<i class='fas fa-people-carry'></i>",
+            "zoom": 13
+        },
+        "office=charity": {
+            "priority": 0,
+            "sign": "<i class='fas fa-hands-helping'></i>",
+            "zoom": 13
+        }
+    }
+}