Browse Source

cycle_turn_on_red: support 'stop' restriction

master
Stephan Bösch-Plepelits 10 months ago
parent
commit
d39b7e02dd
  1. 13
      cycle_turn_on_red.yaml

13
cycle_turn_on_red.yaml

@ -1,8 +1,9 @@
query:
12: |
(
node[~"^red_turn:.*:bicycle$"~"^yes$"];
node[~"^red_turn:.*:bicycle$"~"^(yes|stop)$"];
relation["restriction:bicycle"="give_way"];
relation["restriction:bicycle"="stop"];
)
members: true
feature:
@ -11,7 +12,7 @@ feature:
body: |
<ul>
{% for k, v in tags %}
{% if k|matches('^red_turn:.*:bicycle$') and v == 'yes' %}<li>{{ k }}={{ v }}</li>{% endif %}
{% if k|matches('^red_turn:.*:bicycle$') and v in ['yes', 'stop'] %}<li>{{ k }}={{ v }}</li>{% endif %}
{% endfor %}
</ul>
exclude: |
@ -21,13 +22,17 @@ memberFeature:
{{ tagTrans('highway', tags.highway) }}
exclude: |
{% set isVia = false %}
{% set restriction = null %}
{% for master in masters %}
{% if attribute(master.tags, 'restriction:bicycle') == 'give_way' and master.role == 'via' %}{% set isVia = true %}{% endif %}
{% if attribute(master.tags, 'restriction:bicycle') in ['give_way', 'stop'] and master.role == 'via' %}
{% set isVia = true %}
{% set restriction = attribute(master.tags, 'restriction:bicycle') %}
{% endif %}
{% endfor %}
{{ not isVia }}
body: |
<ul>
<li>restriction:bicycle=give_way</li>
<li>restriction:bicycle={{ restriction }}</li>
</ul>
markerSymbol: |
{{ markerPointer({})|raw }}

Loading…
Cancel
Save