Browse Source

cycleway_types, cycleway_width: also handle highway=path, bicycle=*

cycleway
parent
commit
9ae3405249
  1. 5
      cycleway_types.yaml
  2. 15
      cycleway_width.yaml

5
cycleway_types.yaml

@ -3,6 +3,7 @@ query:
way[highway=cycleway];
way[cyclestreet=yes];
way[bicycle_road=yes];
way[highway=path][bicycle][bicycle!=no];
way["cycleway"]["cycleway"!~"(no|separate)"];
way["cycleway:left"]["cycleway:left"!~"(no|separate)"];
way["cycleway:right"]["cycleway:right"!~"(no|separate)"];
@ -12,6 +13,10 @@ feature:
pre: |
{% set type = tags.highway %}
{% if tags.highway == 'path' and tags.bicycle and tags.bicycle != 'no' %}
{% set type = 'cycleway' %}
{% endif %}
{% if tags.cyclestreet == 'yes' %}
{% set type = 'cyclestreet' %}
{% elseif tags.bicycle_road in ['yes', 'designated'] %}

15
cycleway_width.yaml

@ -1,6 +1,7 @@
query: |
(
way[highway=cycleway];
way[highway=path][bicycle][bicycle!=no];
way["cycleway:width"];
way["cycleway:left"]["cycleway:left"!~"(no|separate)"];
way["cycleway:right"]["cycleway:right"!~"(no|separate)"];
@ -10,6 +11,12 @@ feature:
pre: |
{% set driving_side = 'right' %}
{% set type = tags.highway %}
{% if tags.highway == 'path' and tags.bicycle and tags.bicycle != 'no' %}
{% set type = 'cycleway' %}
{% endif %}
{% set width = attribute(tags, 'cycleway:width') %}
{% if width matches "/'$/" %}
{% set width = (width|slice(0, -1)) * 0.3048 %}
@ -49,7 +56,7 @@ feature:
style:
width: 4
opacity: |
{{ tags.highway == 'cycleway' or attribute(tags, 'cycleway:width') ? 1 : 0 }}
{{ type == 'cycleway' or attribute(tags, 'cycleway:width') ? 1 : 0 }}
color: |
{% set minWidth = tags.oneway in ['yes', 1, -1] ? const.minWidthOneway : const.minWidthBoth %}
{% set optWidth = tags.oneway in ['yes', 1, -1] ? const.optWidthOneway : const.optWidthBoth %}
@ -67,7 +74,7 @@ feature:
noClip: |
{{ tags.oneway in ['yes', 1, -1] }}
pattern: |
{% if tags.highway == 'cycleway' or attribute(tags, 'cycleway:width') %}
{% if type == 'cycleway' or attribute(tags, 'cycleway:width') %}
{% if tags.oneway in ['yes', 1, -1] %}arrowHead{% endif %}
{% endif %}
pattern-offset: |
@ -161,7 +168,7 @@ feature:
markerSymbol: false
listMarkerSymbol: line
description: |
{{ tagTrans('highway', tags.highway) }}
{{ tagTrans('highway', type) }}
details: |
{% if not attribute(tags, 'cycleway:width') %}
{% elseif attribute(tags, 'cycleway:width') matches "/'$/" %}
@ -171,7 +178,7 @@ feature:
{% endif %}
body: |
<ul>
{% if tags.highway in ['cycleway'] or attribute(tags, 'cycleway:width') %}
{% if type in ['cycleway'] or attribute(tags, 'cycleway:width') %}
<li>
{{ keyTrans('cycleway:width') }}:
{% if not attribute(tags, 'cycleway:width') %}

Loading…
Cancel
Save