forked from MapComplete/MapComplete
Themes(maxspeed): support forward/backward, fix #1127
This commit is contained in:
parent
45435703f9
commit
5515114be9
4 changed files with 109 additions and 11 deletions
|
@ -102,7 +102,13 @@
|
|||
"render": "#000000",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "maxspeed=",
|
||||
"if": {
|
||||
"and": [
|
||||
"maxspeed=",
|
||||
"maxspeed:forward=",
|
||||
"maxspeed:backward="
|
||||
]
|
||||
},
|
||||
"then": "#ff0000"
|
||||
}
|
||||
]
|
||||
|
@ -112,6 +118,7 @@
|
|||
],
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "maxspeed-maxspeed",
|
||||
"render": {
|
||||
"en": "The maximum allowed speed on this road is {canonical(maxspeed)}",
|
||||
"de": "Die zulässige Höchstgeschwindigkeit auf dieser Straße beträgt {canonical(maxspeed)}",
|
||||
|
@ -135,7 +142,10 @@
|
|||
},
|
||||
"freeform": {
|
||||
"key": "maxspeed",
|
||||
"type": "pnat"
|
||||
"type": "pnat",
|
||||
"addExtraTags": [
|
||||
"_forward_backward=no"
|
||||
]
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -162,9 +172,70 @@
|
|||
"maxspeed=20"
|
||||
],
|
||||
"hideInAnswer": "_country!=be"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
"maxspeed=",
|
||||
"_forward_backward=yes"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"en": "The maximum allowed speed on this road depends on the direction a vehicle goes"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "maxspeed-maxspeed"
|
||||
"condition": {
|
||||
"or": [
|
||||
"maxspeed~*",
|
||||
{
|
||||
"and": [
|
||||
"maxspeed:forward=",
|
||||
"maxspeed:backward="
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "maxspeed-forward",
|
||||
"condition": {
|
||||
"or": [
|
||||
"maxspeed:backward~*",
|
||||
"maxspeed:forward~*",
|
||||
"_forward_backward=yes"
|
||||
]
|
||||
},
|
||||
"question": {
|
||||
"en": "What is the maximum allowed speed when travelling {direction_absolute()}?"
|
||||
},
|
||||
"render": {
|
||||
"en": "The maximum allowed speed when travelling {direction_absolute()} on this road is {canonical(maxspeed:forward)}"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "maxspeed:forward",
|
||||
"type": "pnat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "maxspeed-backward",
|
||||
"condition": {
|
||||
"or": [
|
||||
"maxspeed:forward~*",
|
||||
"maxspeed:backward~*",
|
||||
"_forward_backward=yes"
|
||||
]
|
||||
},
|
||||
"question": {
|
||||
"en": "What is the maximum allowed speed when travelling {direction_absolute(,180)}?"
|
||||
},
|
||||
"render": {
|
||||
"en": "The maximum allowed speed when travelling {direction_absolute(,180)} on this road is {canonical(maxspeed:backward)}"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "maxspeed:backward",
|
||||
"type": "pnat"
|
||||
}
|
||||
}
|
||||
],
|
||||
"allowMove": false,
|
||||
|
@ -177,6 +248,20 @@
|
|||
"denominations": [
|
||||
"mph"
|
||||
]
|
||||
},
|
||||
"maxspeed:forward": {
|
||||
"quantity": "speed",
|
||||
"canonical": "kmh",
|
||||
"denominations": [
|
||||
"mph"
|
||||
]
|
||||
},
|
||||
"maxspeed:backward": {
|
||||
"quantity": "speed",
|
||||
"canonical": "kmh",
|
||||
"denominations": [
|
||||
"mph"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue