Main categories of OpenStreetBrowser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

  1. query: |
  2. (
  3. way[highway=cycleway];
  4. way["cycleway:width"];
  5. )
  6. feature:
  7. style:
  8. width: 4
  9. color: |
  10. {% set width = attribute(tags, 'cycleway:width') %}
  11. {% if width matches "/'$/" %}
  12. {% set width = (width|slice(0, -1)) * 0.3048 %}
  13. {% endif %}
  14. {% set optWidth = tags.oneway in ['yes', 1, -1] ? 3 : 5 %}
  15. {% if width %}
  16. {{ colorInterpolate(['#ff0000', '#7f7f7ff'], width / optWidth) }}
  17. {% else %}black
  18. {% endif %}
  19. markerSymbol: false
  20. listMarkerSymbol: line
  21. description: |
  22. {{ tagTrans('highway', tags.highway) }}
  23. details: |
  24. {% if not attribute(tags, 'cycleway:width') %}
  25. {% elseif attribute(tags, 'cycleway:width') matches "/'$/" %}
  26. {{ attribute(tags, 'cycleway:width') }}
  27. {% else %}
  28. {{ attribute(tags, 'cycleway:width') }}m
  29. {% endif %}
  30. body: |
  31. <ul>
  32. <li>
  33. {{ keyTrans('cycleway:width') }}:
  34. {% if not attribute(tags, 'cycleway:width') %}
  35. {% elseif attribute(tags, 'cycleway:width') matches "/(m|')$/" %}
  36. {{ attribute(tags, 'cycleway:width') }}
  37. {% else %}
  38. {{ attribute(tags, 'cycleway:width') }}m
  39. {% endif %}
  40. </ul>