Merge pull request #989 from pietervdvn/feature/onwheels-icons

Add hotel layer
This commit is contained in:
Pieter Vander Vennet 2022-07-25 13:04:48 +02:00 committed by GitHub
commit 24707348dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 111 additions and 1 deletions

View file

@ -0,0 +1,81 @@
{
"id": "hotel",
"name": {
"en": "Hotels",
"nl": "Hotels"
},
"description": {
"en": "Layer showing all hotels",
"nl": "Laag die alle hotels toont"
},
"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": "circle:white;./assets/layers/hotel/hotel.svg",
"iconSize": "40,40,center"
}
],
"tagRenderings": [
"images",
"reviews",
{
"id": "name",
"freeform": {
"key": "name",
"placeholder": {
"en": "Name of the hotel",
"nl": "Naam van het hotel"
}
},
"question": {
"en": "What is the name of this hotel?",
"nl": "Wat is de naam van dit hotel?"
},
"render": {
"en": "This hotel is called {name}",
"nl": "Dit hotel heet {name}"
}
},
"phone",
"email",
"website",
"wheelchair-access"
],
"allowMove": {
"enableImproveAccuracy": true,
"enableRelocation": true
}
}

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<path d="M 0.5 3 C 0.223 3 0 3.223 0 3.5 L 0 4 L 0 8 L 0 9 L 0 9.5 L 0 11 L 1 11 L 1 9.5 L 1 9 L 13 9 L 13 10.5 L 13 11 L 13.5 11 L 14 11 L 14 10.5 L 14 9 L 14 8 L 14 6 L 14 5.5 C 14 5.223 13.777 5 13.5 5 C 13.223 5 13 5.223 13 5.5 L 13 6 L 13 8 L 1 8 L 1 4 L 1 3.5 C 1 3.223 0.777 3 0.5 3 z M 3.5 4 C 2.671573 4 2 4.671573 2 5.5 C 2 6.328427 2.671573 7 3.5 7 C 4.328427 7 5 6.328427 5 5.5 C 5 4.671573 4.328427 4 3.5 4 z M 6 5 L 6 7 L 12 7 C 12 6 10.963825 5 10 5 L 6 5 z"/>
</svg>

After

Width:  |  Height:  |  Size: 569 B

View file

@ -0,0 +1,15 @@
[
{
"path": "hotel.svg",
"license": "",
"authors": [
"Andy Allan",
"Michael Glanznig",
"Adamant36",
"Paul Dicker"
],
"sources": [
"https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/tourism/hotel.svg"
]
}
]

View file

@ -165,7 +165,18 @@
}
},
"walls_and_buildings",
"elevator"
"elevator",
{
"builtin": "hotel",
"override": {
"mapRendering": [
{
"icon": "./assets/themes/onwheels/hotel.svg",
"iconSize": "40,40,bottom"
}
]
}
}
],
"overrideAll": {
"+calculatedTags": [