From 85174461b4282836f8adf3cd98468a497b74c01e Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 28 Oct 2021 00:53:29 +0200 Subject: [PATCH] Port themes to the new format --- assets/themes/sidewalks/sidewalks.json | 26 +++- assets/themes/uk_addresses/uk_addresses.json | 134 ++++++++++--------- 2 files changed, 99 insertions(+), 61 deletions(-) diff --git a/assets/themes/sidewalks/sidewalks.json b/assets/themes/sidewalks/sidewalks.json index 59c29a952..31c97b49e 100644 --- a/assets/themes/sidewalks/sidewalks.json +++ b/assets/themes/sidewalks/sidewalks.json @@ -28,7 +28,13 @@ }, "minzoom": 12, "source": { - "osmTags": "highway=residential" + "osmTags": { + "or": [ + "highway=residential", + "highway=tertiary", + "highway=secondary" + ] + } }, "title": { "render": { @@ -112,6 +118,15 @@ "color": { "render": "#888" }, + "dasharray": { + "render": "", + "mappings": [ + { + "if": "sidewalk:right=", + "then": "6,6" + } + ] + }, "width": { "render": 6, "mappings": [ @@ -131,6 +146,15 @@ }, { "color": "#888", + "dasharray": { + "render": "", + "mappings": [ + { + "if": "sidewalk:right=", + "then": "6,6" + } + ] + }, "width": { "render": 6, "mappings": [ diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json index 03c1de997..71e5c173e 100644 --- a/assets/themes/uk_addresses/uk_addresses.json +++ b/assets/themes/uk_addresses/uk_addresses.json @@ -57,23 +57,27 @@ }, "name": "Addresses to check", "minzoom": 14, - "wayHandling": 1, - "icon": { - "render": "./assets/themes/uk_addresses/housenumber_unknown.svg", - "mappings": [ - { - "if": "_embedding_object:id~*", - "then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg" + "mapRendering": [ + { + "location": "point", + "icon": { + "render": "./assets/themes/uk_addresses/housenumber_unknown.svg", + "mappings": [ + { + "if": "_embedding_object:id~*", + "then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg" + }, + { + "if": "_imported=yes", + "then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg" + } + ] }, - { - "if": "_imported=yes", - "then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg" + "iconSize": { + "render": "40,40,center" } - ] - }, - "iconSize": { - "render": "40,40,center" - }, + } + ], "title": { "render": "Address to be determined" }, @@ -225,50 +229,55 @@ } } ], - "icon": { - "render": "./assets/themes/uk_addresses/housenumber_ok.svg", - "mappings": [ - { - "if": { - "or": [ - { - "and": [ - "addr:housenumber=", - "nohousenumber!=yes" + "mapRendering": [ + { + "location": "point", + "icon": { + "render": "./assets/themes/uk_addresses/housenumber_ok.svg", + "mappings": [ + { + "if": { + "or": [ + { + "and": [ + "addr:housenumber=", + "nohousenumber!=yes" + ] + }, + "addr:street=" ] }, - "addr:street=" - ] - }, - "then": "./assets/themes/uk_addresses/housenumber_unknown.svg" - } - ] - }, - "width": { - "render": "8" - }, - "iconSize": { - "render": "40,40,center" - }, - "color": { - "render": "#00f", - "mappings": [ - { - "if": { - "or": [ - { - "and": [ - "addr:housenumber=", - "nohousenumber!=yes" + "then": "./assets/themes/uk_addresses/housenumber_unknown.svg" + } + ] + }, + "width": { + "render": "8" + }, + "iconSize": { + "render": "40,40,center" + }, + "color": { + "render": "#00f", + "mappings": [ + { + "if": { + "or": [ + { + "and": [ + "addr:housenumber=", + "nohousenumber!=yes" + ] + }, + "addr:street=" ] }, - "addr:street=" - ] - }, - "then": "#ff0" + "then": "#ff0" + } + ] } - ] - } + } + ] }, { "id": "named_streets", @@ -281,12 +290,17 @@ ] } }, - "color": { - "render": "#ccc" - }, - "width": { - "render": "0" - } + "mapRendering": [ + { + "location": "point", + "color": { + "render": "#ccc" + }, + "width": { + "render": "0" + } + } + ] } ], "enableShareScreen": false,