diff --git a/assets/layers/defibrillator/defibrillator.json b/assets/layers/defibrillator/defibrillator.json index c892eca8f..8f820cb12 100644 --- a/assets/layers/defibrillator/defibrillator.json +++ b/assets/layers/defibrillator/defibrillator.json @@ -52,17 +52,109 @@ { "icon": "square", "color": { - "render": "#008754", + "render": "#878787", "mappings": [ { - "if": "_recently_surveyed=true", + "if": { + "or": [ + "access=private", + "access=no" + ] + }, + "then": "#876563" + }, + { + "if": "access=customers", + "then": "#87763d" + }, + { + "if": { + "or": [ + "opening_hours=", + "opening_hours=unknown", + "opening_hours=closed", + "opening_hours=off" + ] + }, + "then": "#87763d" + }, + { + "if": { + "and": [ + "_recently_surveyed=true", + { + "or": [ + "access=yes", + "access=public", + "access=permissive" + ] + } + ] + }, "then": "#28ba3d" + }, + { + "if": { + "or": [ + "access=yes", + "access=public", + "access=permissive" + ] + }, + "then": "#008754" + } + ] + }, + "iconSize": { + "render": "20,20", + "mappings": [ + { + "if": { + "and": [ + { + "or": [ + "access=yes", + "access=public", + "access=permissive" + ] + }, + "opening_hours!=", + "opening_hours!=unknown", + "opening_hours!=closed", + "opening_hours!=off" + ] + }, + "then": "40,40" } ] } }, { - "icon": "./assets/layers/defibrillator/defibrillator.svg" + "icon": "./assets/layers/defibrillator/defibrillator.svg", + "iconSize": { + "#": "Keep in sync with the same code above", + "render": "20,20", + "mappings": [ + { + "if": { + "and": [ + { + "or": [ + "access=yes", + "access=public", + "access=permissive" + ] + }, + "opening_hours!=", + "opening_hours!=unknown", + "opening_hours!=closed", + "opening_hours!=off" + ] + }, + "then": "40,40" + } + ] + } } ], "location": [