Browse Source

cycleway_types: improve rendering of oneway

cycleway
parent
commit
cf4037b94c
  1. 13
      cycleway_types.yaml

13
cycleway_types.yaml

@ -23,6 +23,13 @@ feature:
{% set type = 'bicycle_road' %} {% set type = 'bicycle_road' %}
{% endif %} {% endif %}
{% set mainOneway = tags.oneway %}
{% if mainOneway == 'yes' %}
{% set mainOneway = 1 %}
{% elseif mainOneway == 'no' %}
{% set mainOneway = 0 %}
{% endif %}
{% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %} {% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %}
{% if oneway == 'yes' %} {% if oneway == 'yes' %}
{% set oneway = 1 %} {% set oneway = 1 %}
@ -80,6 +87,12 @@ feature:
{% set rightOneway = 0 %} {% set rightOneway = 0 %}
{% endif %} {% endif %}
{% if mainOneway and ((not rightCycle and mainOneway == rightOneway) or (not leftCycle and mainOneway == leftOneway)) %}
{% set oneway = mainOneway %}
{% elseif mainOneway == oneway and ((rightCycle and mainOneway == rightOneway) or (leftCycle and mainOneway == leftOneway)) %}
{% set oneway = 0 %}
{% endif %}
styles: | styles: |
{% if tags.bridge and tags.bridge != 'no' %} {% if tags.bridge and tags.bridge != 'no' %}
bridge_outer,bridge_inner, bridge_outer,bridge_inner,

Loading…
Cancel
Save