Browse Source

cycleway_types: include bicycle_road=* and cyclestreet=*

cycleway
parent
commit
321998e50f
  1. 47
      cycleway_types.yaml

47
cycleway_types.yaml

@ -1,8 +1,19 @@
query: query:
( (
way[highway=cycleway]; way[highway=cycleway];
way[cyclestreet=yes];
way[bicycle_road=yes];
) )
feature: feature:
pre: |
{% set type = tags.highway %}
{% if tags.cyclestreet == 'yes' %}
{% set type = 'cyclestreet' %}
{% elseif tags.bicycle_road in ['yes', 'designated'] %}
{% set type = 'bicycle_road' %}
{% endif %}
styles: | styles: |
{% if tags.segregated %} {% if tags.segregated %}
footway, footway,
@ -10,10 +21,10 @@ feature:
default default
style: style:
width: | width: |
{% if tags.segregated %}
{{ tags.segregated == 'yes' ? 2 : 4 %}
{% if tags.segregated == 'yes' %}
{{ const.types[type].width / 2 }}
{% else %} {% else %}
4
{{ const.types[type].width }}
{% endif %} {% endif %}
dashArray: | dashArray: |
@ -29,11 +40,11 @@ feature:
{% endif %} {% endif %}
color: | color: |
{{ const.types.cycleway.color }}
{{ const.types[type].color }}
offset: | offset: |
{% if tags.segregated == 'yes' %} {% if tags.segregated == 'yes' %}
1.5
{{ const.types[type].width / 2 - 1 }}
{% endif %} {% endif %}
style:footway: style:footway:
@ -41,10 +52,10 @@ feature:
{{ const.types.footway.color }} {{ const.types.footway.color }}
width: | width: |
{% if tags.segregated %}
{{ tags.segregated == 'yes' ? 2 : 4 %}
{% if tags.segregated == 'yes' %}
{{ const.types.footway.width / 2 }}
{% else %} {% else %}
4
{{ const.types.footway.width }}
{% endif %} {% endif %}
dashArray: | dashArray: |
@ -63,11 +74,15 @@ feature:
offset: | offset: |
{% if tags.segregated == 'yes' %} {% if tags.segregated == 'yes' %}
-1.5
{{ (const.types.footway.width / 2 - 1) * -1 }}
{% endif %} {% endif %}
description: | description: |
{% if tags.segregated %}
{% if tags.cyclestreet == 'yes' %}
{{ keyTrans('cyclestreet') }}
{% elseif tags.bicycle_road in ['yes', 'designated'] %}
{{ keyTrans('bicycle_road') }}
{% elseif tags.segregated %}
{{ tagTrans('highway', 'cycleway segregated=' ~ tags.segregated) }} {{ tagTrans('highway', 'cycleway segregated=' ~ tags.segregated) }}
{% elseif tags.highway %} {% elseif tags.highway %}
{{ tagTrans('highway', tags.highway) }} {{ tagTrans('highway', tags.highway) }}
@ -78,6 +93,14 @@ feature:
const: const:
types: types:
cycleway: cycleway:
color: '#007f00'
color: '#009f00'
width: 4
footway: footway:
color: '#ff7f00'
color: '#ff9f00'
width: 4
cyclestreet:
color: '#006f3f'
width: 8
bicycle_road:
color: '#006f4f'
width: 8
Loading…
Cancel
Save