First usable sidewalks theme

This commit is contained in:
Pieter Vander Vennet 2021-10-22 18:53:07 +02:00
parent 02a1d9696f
commit ff0ee35ec1
19 changed files with 537 additions and 174 deletions

View file

@ -0,0 +1,41 @@
{
"id": "left_right_style",
"description": "Special meta-style which will show one single line, either on the left or on the right depending on the id. This is used in the small popups with left_right roads",
"source": {
"osmTags": {
"or": [
"id=left",
"id=right"
]
}
},
"mapRendering": [
{
"width": 6,
"offset": {
"mappings": [
{
"if": "id=left",
"then": "-5"
},
{
"if": "id=right",
"then": "5"
}
]
},
"color": {
"mappings": [
{
"if": "id=left",
"then": "#00f"
},
{
"if": "id=right",
"then": "#f00"
}
]
}
}
]
}

View file

@ -32,20 +32,111 @@
},
"title": {
"render": {
"en": "Street {name}"
}
"en": "{name}"
},
"mappings": [
{
"if": "name=",
"then": "Nameless street"
}
]
},
"description": {
"en": "Layer showing sidewalks of highways"
},
"tagRenderings": [],
"tagRenderings": [
{
"id": "streetname",
"render": {
"en": "This street is named {name}"
}
},
{
"leftRightKeys": "sidewalk:left|right",
"renderings": [
{
"id": "sidewalk_minimap",
"render": "{sided_minimap(left|right):height:3rem;border-radius:0.5rem;overflow:hidden}"
},
{
"id": "has_sidewalk",
"question": "Is there a sidewalk on the left|right side of the road?",
"mappings": [{
"if": "sidewalk:left|right=yes",
"then": "Yes, there is a sidewalk on this side of the road"
},
{
"if": "sidewalk:left|right=no",
"then": "No, there is no seperated sidewalk to walk on"
}]
},
{
"id": "sidewalk_width",
"question": "What is the width of the sidewalk on this side of the road?",
"render": "This sidewalk is {sidewalk:left|right:width}m wide",
"condition": "sidewalk:left|right=yes",
"freeform": {
"key": "sidewalk:left|right:width",
"type": "length",
"helperArgs": ["21", "map"]
}
}
]
}],
"mapRendering": [
{
"location": [
"point"
]
"location": ["start","end"],
"icon": "circle:#ccc",
"iconSize": "20,20,center"
},
{}
{
"color": "#ffffff55",
"width": 8
},
{
"color": {
"render": "#888"
},
"width": {
"render": 6,
"mappings": [
{
"if": {
"or": [
"sidewalk:left=",
"sidewalk:left=no",
"sidewalk:left=separate"
]
},
"then": 0
}
]
},
"offset": -6
},
{
"color": "#888",
"width": {
"render": 6,
"mappings": [
{
"if": {
"or": [
"sidewalk:right=",
"sidewalk:right=no",
"sidewalk:right=separate"
]
},
"then": 0
}
]
},
"offset": 6
}
],
"allowSplit": true
}