From 35645e7f8358896ebebd09fdc637d49f7fbddb00 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 9 Dec 2021 18:01:58 +0100 Subject: [PATCH] Improvements to the postal code theme --- assets/themes/postal_codes/postal_codes.json | 33 ++++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/assets/themes/postal_codes/postal_codes.json b/assets/themes/postal_codes/postal_codes.json index c464cf4a9..57f565992 100644 --- a/assets/themes/postal_codes/postal_codes.json +++ b/assets/themes/postal_codes/postal_codes.json @@ -78,17 +78,22 @@ ], "isShown": { "render": "yes", - "mappings": [{ - "if" :"_country!=be", - "then": "no" - }] + "mappings": [ + { + "if": "_country!=be", + "then": "no" + } + ] } }, { "id": "wrong_postal_code", "source": { "osmTags": { - "and": ["boundary~*","addr:postcode~*"] + "and": [ + "boundary~*", + "addr:postcode~*" + ] } }, "title": "Boundary relation with addr:postcode={addr:postcode}", @@ -114,16 +119,16 @@ "_postal_code_properties=(() => { const f = feat.overlapWith('postal_code_boundary'); if(f.length===0){return {};}; const p = f[0]?.feat?.properties; return {id:p.id, postal_code: p.postal_code, _closest_town_hall: p._closest_town_hall}; })()", "_postal_code=feat.get('_postal_code_properties')?.postal_code", "_postal_code_center_distance=feat.distanceTo(feat.get('_postal_code_properties').id)" - ], - "description": {}, - "tagRenderings": [ ], + "description": {}, + "tagRenderings": [], "presets": [], "source": { "osmTags": "amenity=townhall" }, "mapRendering": [ - { "icon": "./assets/themes/postal_codes/townhall.svg", + { + "icon": "./assets/themes/postal_codes/townhall.svg", "iconSize": { "render": "40,40,center" }, @@ -135,10 +140,12 @@ ], "isShown": { "render": "yes", - "mappings": [{ - "if" :"_country!=be", - "then": "no" - }] + "mappings": [ + { + "if": "_country!=be", + "then": "no" + } + ] } } ]