diff --git a/assets/layers/bicycle_library/bicycle_library.json b/assets/layers/bicycle_library/bicycle_library.json
index 633de011a3..05a67322c8 100644
--- a/assets/layers/bicycle_library/bicycle_library.json
+++ b/assets/layers/bicycle_library/bicycle_library.json
@@ -320,7 +320,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": "service:bicycle:pump=yes",
@@ -345,4 +345,4 @@
}
],
"deletion": true
-}
\ No newline at end of file
+}
diff --git a/assets/layers/bike_shop/bike_shop.json b/assets/layers/bike_shop/bike_shop.json
index fc61c5654e..70e63386d9 100644
--- a/assets/layers/bike_shop/bike_shop.json
+++ b/assets/layers/bike_shop/bike_shop.json
@@ -781,7 +781,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": "service:bicycle:pump=yes",
@@ -815,4 +815,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/cafe_pub/cafe_pub.json b/assets/layers/cafe_pub/cafe_pub.json
index 94998e1c9a..b27ef9da35 100644
--- a/assets/layers/cafe_pub/cafe_pub.json
+++ b/assets/layers/cafe_pub/cafe_pub.json
@@ -334,7 +334,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"label": {
@@ -360,4 +360,4 @@
"da": "Et lag med caféer og pubber, hvor man kan samles omkring en drink. Laget stiller nogle relevante spørgsmål",
"fr": "Une couche montrants les cafés et pubs où l’on peut prendre un verre. Cette couche pose des questions y afférentes."
}
-}
\ No newline at end of file
+}
diff --git a/assets/layers/climbing_club/climbing_club.json b/assets/layers/climbing_club/climbing_club.json
index 47cf7002bb..a40d48e71f 100644
--- a/assets/layers/climbing_club/climbing_club.json
+++ b/assets/layers/climbing_club/climbing_club.json
@@ -166,7 +166,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"iconSize": {
@@ -186,4 +186,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/climbing_gym/climbing_gym.json b/assets/layers/climbing_gym/climbing_gym.json
index f06128d5cb..da849d6dc2 100644
--- a/assets/layers/climbing_gym/climbing_gym.json
+++ b/assets/layers/climbing_gym/climbing_gym.json
@@ -213,7 +213,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"iconSize": {
@@ -246,4 +246,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/fitness_centre/fitness_centre.json b/assets/layers/fitness_centre/fitness_centre.json
index 15e5f4591d..e712a0c97f 100644
--- a/assets/layers/fitness_centre/fitness_centre.json
+++ b/assets/layers/fitness_centre/fitness_centre.json
@@ -94,7 +94,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
]
}
@@ -102,4 +102,4 @@
"filter": [
"open_now"
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/fitness_station/fitness_station.json b/assets/layers/fitness_station/fitness_station.json
index a798ea6689..34ab22e124 100644
--- a/assets/layers/fitness_station/fitness_station.json
+++ b/assets/layers/fitness_station/fitness_station.json
@@ -402,7 +402,7 @@
"opening_hours~*"
]
},
- "then": "isOpen"
+ "then": "icons.isOpen"
}
]
}
@@ -410,4 +410,4 @@
"filter": [
"open_now"
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/food/food.json b/assets/layers/food/food.json
index 5a83a2471d..b7a035f808 100644
--- a/assets/layers/food/food.json
+++ b/assets/layers/food/food.json
@@ -1045,7 +1045,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": {
@@ -1091,4 +1091,4 @@
"es": "Una capa que muestra restaurantes y facilidades de comida rápida",
"fr": "Un claque montrant les restaurants et les endroits de nourriture rapide (avec un rendu spécial pour les friteries)"
}
-}
\ No newline at end of file
+}
diff --git a/assets/layers/icons/icons.json b/assets/layers/icons/icons.json
new file mode 100644
index 0000000000..bf23f8d8e3
--- /dev/null
+++ b/assets/layers/icons/icons.json
@@ -0,0 +1,131 @@
+{
+ "id": "icons",
+ "description": {
+ "en": "A layer acting as library for icon-tagrenderings, especially to show as badge next to a POI"
+ },
+ "source": {
+ "osmTags": "id~*"
+ },
+ "title": null,
+ "tagRenderings": [
+ {
+ "id": "wikipedialink",
+ "labels": [
+ "defaults"
+ ],
+ "render": "
",
+ "condition": {
+ "or": [
+ "wikipedia~*",
+ "wikidata~*"
+ ]
+ },
+ "mappings": [
+ {
+ "#": "ignore-image-in-then",
+ "if": "wikipedia=",
+ "then": "
"
+ }
+ ]
+ },
+ {
+ "id": "isOpen",
+ "labels": [
+ "defaults"
+ ],
+ "#": "Shows a coloured clock if opening hours are parsed. Uses the metatagging, suitable to use as a (badged) overlay",
+ "mappings": [
+ {
+ "if": "_isOpen=yes",
+ "then": "clock:#0f0;ring:#0f0"
+ },
+ {
+ "if": "_isOpen=no",
+ "then": "circle:#f00;clock:#fff"
+ },
+ {
+ "#": "Still loading the country",
+ "if": {
+ "and": [
+ "_isOpen=",
+ "opening_hours~*"
+ ]
+ },
+ "then": "clock:#ff0;ring:#ff0"
+ },
+ {
+ "#": "Still loading the country",
+ "if": {
+ "and": [
+ "_isOpen=parse_error",
+ "opening_hours~*"
+ ]
+ },
+ "then": "circle:#f0f;clock:#fff"
+ }
+ ]
+ },
+ {
+ "id": "phonelink",
+ "labels": [
+ "defaults"
+ ],
+ "render": "
",
+ "condition": "phone~*"
+ },
+ {
+ "id": "emaillink",
+ "labels": [
+ "defaults"
+ ],
+ "render": "
",
+ "condition": "email~*"
+ },
+ {
+ "id": "smokingicon",
+ "labels": [
+ "defaults"
+ ],
+ "mappings": [
+ {
+ "#": "ignore-image-in-then",
+ "if": "smoking=no",
+ "then": "
"
+ },
+ {
+ "#": "ignore-image-in-then",
+ "if": "smoking=yes",
+ "then": "
"
+ }
+ ]
+ },
+
+ {
+ "id": "sharelink",
+ "labels": [
+ "defaults"
+ ],
+ "render": "{share_link()}"
+ },
+ {
+ "id": "osmlink",
+ "labels": [
+ "defaults"
+ ],
+ "render": "
",
+ "mappings": [
+ {
+ "if": "id~.*/-.*",
+ "then": ""
+ },
+ {
+ "#": "ignore-image-in-then",
+ "if": "_backend~*",
+ "then": "
"
+ }
+ ],
+ "condition": "id~(node|way|relation)/[0-9]*"
+ }
+ ],
+ "mapRendering": null
+}
diff --git a/assets/layers/parcel_lockers/parcel_lockers.json b/assets/layers/parcel_lockers/parcel_lockers.json
index 1b9530f84d..01c78409bd 100644
--- a/assets/layers/parcel_lockers/parcel_lockers.json
+++ b/assets/layers/parcel_lockers/parcel_lockers.json
@@ -259,7 +259,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"iconSize": "40,40,center",
@@ -269,4 +269,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/pharmacy/pharmacy.json b/assets/layers/pharmacy/pharmacy.json
index 87fa982e24..057226bac8 100644
--- a/assets/layers/pharmacy/pharmacy.json
+++ b/assets/layers/pharmacy/pharmacy.json
@@ -119,7 +119,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"label": {
@@ -173,4 +173,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/playground/playground.json b/assets/layers/playground/playground.json
index 71198948fc..ddf3ea8a1c 100644
--- a/assets/layers/playground/playground.json
+++ b/assets/layers/playground/playground.json
@@ -578,7 +578,7 @@
"opening_hours~*"
]
},
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"iconSize": {
@@ -616,4 +616,4 @@
}
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/postoffices/postoffices.json b/assets/layers/postoffices/postoffices.json
index d9b508b84e..317e93ca6c 100644
--- a/assets/layers/postoffices/postoffices.json
+++ b/assets/layers/postoffices/postoffices.json
@@ -433,7 +433,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": "shop~*",
@@ -451,4 +451,4 @@
"width": "1"
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/shops/shops.json b/assets/layers/shops/shops.json
index 03406dba6f..c872ce8b49 100644
--- a/assets/layers/shops/shops.json
+++ b/assets/layers/shops/shops.json
@@ -326,7 +326,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": {
@@ -411,4 +411,4 @@
"accepts_cards",
"has_organic"
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/sport_pitch/sport_pitch.json b/assets/layers/sport_pitch/sport_pitch.json
index 5e686c05db..2cff74eabf 100644
--- a/assets/layers/sport_pitch/sport_pitch.json
+++ b/assets/layers/sport_pitch/sport_pitch.json
@@ -553,7 +553,7 @@
"opening_hours~*"
]
},
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": {
@@ -602,4 +602,4 @@
"filter": [
"open_now"
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/sports_centre/sports_centre.json b/assets/layers/sports_centre/sports_centre.json
index cba852843e..3e34be973f 100644
--- a/assets/layers/sports_centre/sports_centre.json
+++ b/assets/layers/sports_centre/sports_centre.json
@@ -49,7 +49,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"location": [
@@ -68,4 +68,4 @@
"filter": [
"open_now"
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/toilet/toilet.json b/assets/layers/toilet/toilet.json
index f7ae5a35f6..1165390e0a 100644
--- a/assets/layers/toilet/toilet.json
+++ b/assets/layers/toilet/toilet.json
@@ -700,7 +700,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
],
"location": [
@@ -755,4 +755,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/toilet_at_amenity/toilet_at_amenity.json b/assets/layers/toilet_at_amenity/toilet_at_amenity.json
index 50ec080ff3..1484496feb 100644
--- a/assets/layers/toilet_at_amenity/toilet_at_amenity.json
+++ b/assets/layers/toilet_at_amenity/toilet_at_amenity.json
@@ -372,7 +372,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
},
{
"if": "shop~*",
@@ -466,4 +466,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/layers/veterinary/veterinary.json b/assets/layers/veterinary/veterinary.json
index 91ce944ecf..cadeaf334b 100644
--- a/assets/layers/veterinary/veterinary.json
+++ b/assets/layers/veterinary/veterinary.json
@@ -79,7 +79,7 @@
"iconBadges": [
{
"if": "opening_hours~*",
- "then": "isOpen"
+ "then": "icons.isOpen"
}
]
},
@@ -116,4 +116,4 @@
"id": "vetName"
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/tagRenderings/icons.json b/assets/tagRenderings/icons.json
deleted file mode 100644
index 6a0d786d78..0000000000
--- a/assets/tagRenderings/icons.json
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- "id": "shared_icons",
- "defaults": {
- "builtin": [
- "phonelink",
- "emaillink",
- "wikipedialink",
- "smokingicon",
- "osmlink",
- "sharelink"
- ],
- "override": {}
- },
- "wikipedialink": {
- "render": "
",
- "condition": {
- "or": [
- "wikipedia~*",
- "wikidata~*"
- ]
- },
- "mappings": [
- {
- "#": "ignore-image-in-then",
- "if": "wikipedia=",
- "then": "
"
- }
- ]
- },
- "isOpen": {
- "#": "Shows a coloured clock if opening hours are parsed. Uses the metatagging, suitable to use as a (badged) overlay",
- "mappings": [
- {
- "if": "_isOpen=yes",
- "then": "clock:#0f0;ring:#0f0"
- },
- {
- "if": "_isOpen=no",
- "then": "circle:#f00;clock:#fff"
- },
- {
- "#": "Still loading the country",
- "if": {
- "and": [
- "_isOpen=",
- "opening_hours~*"
- ]
- },
- "then": "clock:#ff0;ring:#ff0"
- },
- {
- "#": "Still loading the country",
- "if": {
- "and": [
- "_isOpen=parse_error",
- "opening_hours~*"
- ]
- },
- "then": "circle:#f0f;clock:#fff"
- }
- ]
- },
- "phonelink": {
- "render": "
",
- "condition": "phone~*"
- },
- "emaillink": {
- "render": "
",
- "condition": "email~*"
- },
- "smokingicon": {
- "mappings": [
- {
- "#": "ignore-image-in-then",
- "if": "smoking=no",
- "then": "
"
- },
- {
- "#": "ignore-image-in-then",
- "if": "smoking=yes",
- "then": "
"
- }
- ]
- },
- "osmlink": {
- "render": "
",
- "mappings": [
- {
- "if": "id~.*/-.*",
- "then": ""
- },
- {
- "#": "ignore-image-in-then",
- "if": "_backend~*",
- "then": "
"
- }
- ],
- "condition": "id~(node|way|relation)/[0-9]*"
- },
- "sharelink": {
- "render": "{share_link()}"
- }
-}
\ No newline at end of file