forked from MapComplete/MapComplete
First usable sidewalks theme
This commit is contained in:
parent
02a1d9696f
commit
ff0ee35ec1
19 changed files with 537 additions and 174 deletions
41
assets/layers/left_right_style/left_right_style.json
Normal file
41
assets/layers/left_right_style/left_right_style.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue