Browse Source

cycleway_width: improvements

master
parent
commit
30ef9814aa
  1. 7
      cycleway_width.yaml

7
cycleway_width.yaml

@ -5,13 +5,13 @@ query: |
) )
feature: feature:
style: style:
width: 4
color: |
pre: |
{% set width = attribute(tags, 'cycleway:width') %} {% set width = attribute(tags, 'cycleway:width') %}
{% if width matches "/'$/" %} {% if width matches "/'$/" %}
{% set width = (width|slice(0, -1)) * 0.3048 %} {% set width = (width|slice(0, -1)) * 0.3048 %}
{% endif %} {% endif %}
width: 4
color: |
{% set minWidth = tags.oneway in ['yes', 1, -1] ? const.minWidthOneway : const.minWidthBoth %} {% set minWidth = tags.oneway in ['yes', 1, -1] ? const.minWidthOneway : const.minWidthBoth %}
{% set optWidth = tags.oneway in ['yes', 1, -1] ? const.optWidthOneway : const.optWidthBoth %} {% set optWidth = tags.oneway in ['yes', 1, -1] ? const.optWidthOneway : const.optWidthBoth %}
@ -59,6 +59,7 @@ feature:
<li> <li>
{{ keyTrans('cycleway:width') }}: {{ keyTrans('cycleway:width') }}:
{% if not attribute(tags, 'cycleway:width') %} {% if not attribute(tags, 'cycleway:width') %}
{{ trans('unknown') }}
{% elseif attribute(tags, 'cycleway:width') matches "/(m|')$/" %} {% elseif attribute(tags, 'cycleway:width') matches "/(m|')$/" %}
{{ attribute(tags, 'cycleway:width') }} {{ attribute(tags, 'cycleway:width') }}
{% else %} {% else %}

Loading…
Cancel
Save