Port themes to the new format

This commit is contained in:
Pieter Vander Vennet 2021-10-28 00:53:29 +02:00
parent 40a0e7931d
commit 85174461b4
2 changed files with 99 additions and 61 deletions

View file

@ -28,7 +28,13 @@
}, },
"minzoom": 12, "minzoom": 12,
"source": { "source": {
"osmTags": "highway=residential" "osmTags": {
"or": [
"highway=residential",
"highway=tertiary",
"highway=secondary"
]
}
}, },
"title": { "title": {
"render": { "render": {
@ -112,6 +118,15 @@
"color": { "color": {
"render": "#888" "render": "#888"
}, },
"dasharray": {
"render": "",
"mappings": [
{
"if": "sidewalk:right=",
"then": "6,6"
}
]
},
"width": { "width": {
"render": 6, "render": 6,
"mappings": [ "mappings": [
@ -131,6 +146,15 @@
}, },
{ {
"color": "#888", "color": "#888",
"dasharray": {
"render": "",
"mappings": [
{
"if": "sidewalk:right=",
"then": "6,6"
}
]
},
"width": { "width": {
"render": 6, "render": 6,
"mappings": [ "mappings": [

View file

@ -57,23 +57,27 @@
}, },
"name": "Addresses to check", "name": "Addresses to check",
"minzoom": 14, "minzoom": 14,
"wayHandling": 1, "mapRendering": [
"icon": { {
"render": "./assets/themes/uk_addresses/housenumber_unknown.svg", "location": "point",
"mappings": [ "icon": {
{ "render": "./assets/themes/uk_addresses/housenumber_unknown.svg",
"if": "_embedding_object:id~*", "mappings": [
"then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg" {
"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"
}
]
}, },
{ "iconSize": {
"if": "_imported=yes", "render": "40,40,center"
"then": "./assets/themes/uk_addresses/housenumber_unknown_small.svg"
} }
] }
}, ],
"iconSize": {
"render": "40,40,center"
},
"title": { "title": {
"render": "Address to be determined" "render": "Address to be determined"
}, },
@ -225,50 +229,55 @@
} }
} }
], ],
"icon": { "mapRendering": [
"render": "./assets/themes/uk_addresses/housenumber_ok.svg", {
"mappings": [ "location": "point",
{ "icon": {
"if": { "render": "./assets/themes/uk_addresses/housenumber_ok.svg",
"or": [ "mappings": [
{ {
"and": [ "if": {
"addr:housenumber=", "or": [
"nohousenumber!=yes" {
"and": [
"addr:housenumber=",
"nohousenumber!=yes"
]
},
"addr:street="
] ]
}, },
"addr:street=" "then": "./assets/themes/uk_addresses/housenumber_unknown.svg"
] }
}, ]
"then": "./assets/themes/uk_addresses/housenumber_unknown.svg" },
} "width": {
] "render": "8"
}, },
"width": { "iconSize": {
"render": "8" "render": "40,40,center"
}, },
"iconSize": { "color": {
"render": "40,40,center" "render": "#00f",
}, "mappings": [
"color": { {
"render": "#00f", "if": {
"mappings": [ "or": [
{ {
"if": { "and": [
"or": [ "addr:housenumber=",
{ "nohousenumber!=yes"
"and": [ ]
"addr:housenumber=", },
"nohousenumber!=yes" "addr:street="
] ]
}, },
"addr:street=" "then": "#ff0"
] }
}, ]
"then": "#ff0"
} }
] }
} ]
}, },
{ {
"id": "named_streets", "id": "named_streets",
@ -281,12 +290,17 @@
] ]
} }
}, },
"color": { "mapRendering": [
"render": "#ccc" {
}, "location": "point",
"width": { "color": {
"render": "0" "render": "#ccc"
} },
"width": {
"render": "0"
}
}
]
} }
], ],
"enableShareScreen": false, "enableShareScreen": false,