query: | ( way[highway=cycleway]; way["cycleway:width"]; ) feature: style: width: 4 color: | {% set width = attribute(tags, 'cycleway:width') %} {% if width matches "/'$/" %} {% set width = (width|slice(0, -1)) * 0.3048 %} {% endif %} {% set minWidth = tags.oneway in ['yes', 1, -1] ? const.minWidthOneway : const.minWidthBoth %} {% set optWidth = tags.oneway in ['yes', 1, -1] ? const.optWidthOneway : const.optWidthBoth %} {% if width %} {{ colorInterpolate(const.colorScheme, (width - minWidth) / (optWidth - minWidth)) }} {% else %}black {% endif %} markerSymbol: false listMarkerSymbol: line description: | {{ tagTrans('highway', tags.highway) }} details: | {% if not attribute(tags, 'cycleway:width') %} {% elseif attribute(tags, 'cycleway:width') matches "/'$/" %} {{ attribute(tags, 'cycleway:width') }} {% else %} {{ attribute(tags, 'cycleway:width') }}m {% endif %} body: |
Symbol | {{ keyTrans('oneway') }}={{ tagTrans('oneway', 'yes') }} | {{ keyTrans('oneway') }}={{ tagTrans('oneway', 'no') }} |
---|---|---|
{{ markerLine({ width: 4, color: colorInterpolate(const.colorScheme, v) }) }} | {% if v == 0 %}<={% elseif v == 1 %}>={% endif %} {{ (const.minWidthOneway + (v * (const.optWidthOneway - const.minWidthOneway)))|number_format(2) }}m | {% if v == 0 %}<={% elseif v == 1 %}>={% endif %} {{ (const.minWidthBoth + (v * (const.optWidthBoth - const.minWidthBoth)))|number_format(2) }}m |