Browse Source

cycleway_types: instead of 'crossing' introduce a more general 'otherInfrastructure'

cycleway
parent
commit
7810bcb451
  1. 30
      cycleway_types.yaml

30
cycleway_types.yaml

@ -33,7 +33,8 @@ feature:
{% set leftCycle = '' %}{% set rightCycle = '' %} {% set leftCycle = '' %}{% set rightCycle = '' %}
{% if tags.cycleway %} {% if tags.cycleway %}
{% if tags.cycleway in ['crossing'] %}
{% if const.otherInfrastructure[tags.cycleway] %}
{# skip #}
{% elseif (tags.oneway in ['yes', 1] and map.driving_side == 'right') or (tags.oneway in [-1] and map.driving_side == 'left') %} {% elseif (tags.oneway in ['yes', 1] and map.driving_side == 'right') or (tags.oneway in [-1] and map.driving_side == 'left') %}
{{ tags.cycleway|debug }} {{ tags.cycleway|debug }}
{% if tags.cycleway matches '/^opposite/' %} {% if tags.cycleway matches '/^opposite/' %}
@ -84,8 +85,8 @@ feature:
bridge, bridge,
{% endif %} {% endif %}
{% if tags.cycleway in ['crossing'] or tags.path in ['crossing'] %}
crossing,
{% if const.otherInfrastructure[tags.cycleway|default(tags.path)] %}
other,
{% endif %} {% endif %}
{% if tags.segregated %} {% if tags.segregated %}
@ -287,12 +288,15 @@ feature:
zIndex: |- zIndex: |-
{{ tags.layer|default(0) }} {{ tags.layer|default(0) }}
style:crossing:
style:other:
width: | width: |
{{ const.types[type].width + 4 }}
color: black
lineCap: butt
dashArray: "4,4"
{{ const.types[type].width + const.otherInfrastructure[tags.cycleway].extraWidth }}
color: |
{{ const.otherInfrastructure[tags.cycleway].color }}
lineCap: |
{{ const.otherInfrastructure[tags.cycleway].lineCap|default('round') }}
dashArray: |
{{ const.otherInfrastructure[tags.cycleway].dashArray|default('') }}
zIndex: |- zIndex: |-
{{ tags.layer|default(0) - 0.1 }} {{ tags.layer|default(0) - 0.1 }}
@ -317,11 +321,11 @@ feature:
body: | body: |
<ul> <ul>
{% if tags.cycleway in ['crossing'] %}
{% if const.otherInfrastructure[tags.cycleway] %}
<li> <li>
{{ keyTrans('cycleway') }}: {{ tagTrans('cycleway', tags.cycleway) }} {{ keyTrans('cycleway') }}: {{ tagTrans('cycleway', tags.cycleway) }}
</li> </li>
{% elseif tags.cycleway and not tags.cycleway in ['crossing'] %}
{% elseif tags.cycleway %}
<li> <li>
{{ keyTrans('cycleway') }}: {{ keyTrans('cycleway') }}:
<div class='warning'>Recommendation: Indicate side of way by using 'cycleway:left' and/or 'cycleway:right'.</div> <div class='warning'>Recommendation: Indicate side of way by using 'cycleway:left' and/or 'cycleway:right'.</div>
@ -455,6 +459,12 @@ const:
opposite_track: opposite_track:
color: '#ff0000' color: '#ff0000'
warning: 'Deprecated tag! Use oneway:bicycle=no and cycleway:%other_driving_side%=track, cycleway:%other_driving_side%:oneway=-1 instead.' warning: 'Deprecated tag! Use oneway:bicycle=no and cycleway:%other_driving_side%=track, cycleway:%other_driving_side%:oneway=-1 instead.'
otherInfrastructure:
crossing:
extraWidth: 4
lineCap: butt
dashArray: '4,4'
color: black
hiddenTypes: hiddenTypes:
'no': true 'no': true
separate: true separate: true
Loading…
Cancel
Save