Add presets and titles

This commit is contained in:
Robin van der Linde 2022-07-14 15:45:57 +02:00
parent f7506e07cd
commit 5290e0042b
Signed by untrusted user: Robin-van-der-Linde
GPG key ID: 53956B3252478F0D
2 changed files with 30 additions and 2 deletions

View file

@ -11,13 +11,41 @@
"source": {
"osmTags": "tourism=hotel"
},
"minzoom": 13,
"title": {
"render": {
"en": "Hotel",
"nl": "Hotel"
},
"mappings": [
{
"if": "name~*",
"then": {
"en": "Hotel {name}",
"nl": "Hotel {name}"
}
}
]
},
"presets": [
{
"title": {
"en": "a hotel",
"nl": "een hotel"
},
"tags": [
"tourism=hotel"
]
}
],
"mapRendering": [
{
"location": [
"point",
"centroid"
],
"icon": "pin:white"
"icon": "circle:white;./assets/layers/hotel/hotel.svg",
"iconSize": "40,40,center"
}
],
"tagRenderings": [

View file

@ -123,7 +123,7 @@ describe('RewriteSpecial', function () {
const r = new RewriteSpecial().convert(tr, "test").result
expect(r).to.deep.eq({
"id": "uk_addresses_import_button",
"render": {'*': "{import_button(address,urpn_count=$urpn_count;ref:GB:uprn=$ref:GB:uprn$,Add this address,./assets/themes/uk_addresses/housenumber_add.svg,,,,none)}"}
"render": {'*': "{import_button(address,urpn_count=$urpn_count;ref:GB:uprn=$ref:GB:uprn$,Add this address,./assets/themes/uk_addresses/housenumber_add.svg,,,,none,)}"}
})
})
});