From 0ee6a1a47b6cf05385d17e2328dbe6ee87395b9d Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Wed, 3 Nov 2021 11:58:14 +0100 Subject: [PATCH] Update mapRendering --- assets/layers/street_lamps/street_lamps.json | 48 ++++--------------- assets/themes/postboxes/postboxes.json | 6 +-- .../street_lighting/street_lighting.json | 12 ++++- .../street_lighting_assen.json | 25 ++++++---- 4 files changed, 37 insertions(+), 54 deletions(-) diff --git a/assets/layers/street_lamps/street_lamps.json b/assets/layers/street_lamps/street_lamps.json index 32383d616..96a64b76f 100644 --- a/assets/layers/street_lamps/street_lamps.json +++ b/assets/layers/street_lamps/street_lamps.json @@ -23,47 +23,19 @@ } ] }, - "icon": { - "render": "./assets/layers/street_lamps/straight_pole.svg", - "mappings": [ - { - "if": { - "and": [ - "lamp_mount=bent_mast", - "light:count=1" - ] - }, - "then": "./assets/layers/street_lamps/bent_pole_1.svg" - }, - { - "if": { - "and": [ - "lamp_mount=bent_mast", - "light:count=2" - ] - }, - "then": "./assets/layers/street_lamps/bent_pole_2.svg" - } - ] - }, - "iconOverlays": [ + "mapRendering": [ { - "if": "light:colour=white", - "then": "circle:white", - "badge": true - }, - { - "if": "light:colour=orange", - "then": "circle:#FFB000", - "badge": true - }, - { - "if": "light:colour=green", - "then": "circle:#55FF55", - "badge": true + "location": "point", + "icon": "./assets/layers/street_lamps/street_lamp.svg", + "iconBadges": [ + { + "if": "light:colour~*", + "then": "circle:{light:colour}" + } + ], + "iconSize": "40,40,bottom" } ], - "iconSize": "40,40,bottom", "presets": [ { "title": { diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json index 7741ac2d6..a81d180e7 100644 --- a/assets/themes/postboxes/postboxes.json +++ b/assets/themes/postboxes/postboxes.json @@ -48,7 +48,7 @@ "tagRenderings": [ "images", { - + "id": "minimap", "render": "{minimap(17): height: 10rem; overflow: hidden; border: 1px solid #DADADA; border-radius: 0.5rem; }" } ], @@ -128,8 +128,6 @@ "images", { "id": "minimap", - - "render": "{minimap(17): height: 10rem; overflow: hidden; border: 1px solid #DADADA; border-radius: 0.5rem; }" }, { @@ -227,4 +225,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/assets/themes/street_lighting/street_lighting.json b/assets/themes/street_lighting/street_lighting.json index f1bd77be0..c7bb25c5a 100644 --- a/assets/themes/street_lighting/street_lighting.json +++ b/assets/themes/street_lighting/street_lighting.json @@ -48,7 +48,11 @@ } ] }, - "color": "#ff0", + "mapRendering": [ + { + "color": "#ff0" + } + ], "tagRenderings": [ { "id": "lit", @@ -113,7 +117,11 @@ } ] }, - "color": "#a9a9a9", + "mapRendering": [ + { + "color": "#a9a9a9" + } + ], "tagRenderings": [ { "id": "lit", diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json index 799950826..695347f42 100644 --- a/assets/themes/street_lighting/street_lighting_assen.json +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -34,16 +34,21 @@ "_has_closeby_feature=Number(feat.properties._closest_osm_street_lamp_distance) < 5 ? 'yes' : 'no'" ], "title": "Straatlantaarn in dataset", - "icon": { - "render": "circle:red", - "mappings": [ - { - "if": "_has_closeby_feature=yes", - "then": "circle:#008000aa" - } - ] - }, - "iconSize": "20,20,center", + "mapRendering": [ + { + "location": "point", + "icon": { + "render": "circle:red", + "mappings": [ + { + "if": "_has_closeby_feature=yes", + "then": "circle:#008000aa" + } + ] + }, + "iconSize": "20,20,center" + } + ], "tagRenderings": [ "all_tags" ]