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.

166 lines
3.3 KiB

  1. query:
  2. (
  3. way[highway=cycleway];
  4. way[cyclestreet=yes];
  5. way[bicycle_road=yes];
  6. )
  7. feature:
  8. pre: |
  9. {% set type = tags.highway %}
  10. {% if tags.cyclestreet == 'yes' %}
  11. {% set type = 'cyclestreet' %}
  12. {% elseif tags.bicycle_road in ['yes', 'designated'] %}
  13. {% set type = 'bicycle_road' %}
  14. {% endif %}
  15. {% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %}
  16. {% if oneway == 'yes' %}
  17. {% set oneway = 1 %}
  18. {% elseif oneway == 'no' %}
  19. {% set oneway = 0 %}
  20. {% endif %}
  21. styles: |
  22. {% if tags.segregated %}
  23. footway,
  24. {% endif %}
  25. default
  26. style:
  27. width: |
  28. {% if tags.segregated == 'yes' %}
  29. {{ const.types[type].width / 2 }}
  30. {% else %}
  31. {{ const.types[type].width }}
  32. {% endif %}
  33. dashArray: |
  34. {% if oneway and tags.segregated == 'no' %}
  35. 5,5,5,20
  36. {% elseif oneway %}
  37. 25,10
  38. {% elseif tags.segregated == 'no' %}
  39. 5,5
  40. {% endif %}
  41. dashOffset: |
  42. {% if oneway and tags.segregated == 'no' %}
  43. 5
  44. {% elseif oneway %}
  45. 10
  46. {% elseif tags.segregated == 'no' %}
  47. 0
  48. {% endif %}
  49. lineCap: |
  50. {% if tags.segregated == 'no' or oneway %}
  51. butt
  52. {% else %}
  53. round
  54. {% endif %}
  55. color: |
  56. {{ const.types[type].color }}
  57. offset: |
  58. {% if tags.segregated == 'yes' %}
  59. {{ const.types[type].width / 2 - 1 }}
  60. {% endif %}
  61. pattern: |
  62. {% if oneway -%}
  63. arrowHead
  64. {%- endif %}
  65. pattern-repeat: |
  66. 35
  67. pattern-offset: |
  68. {{ oneway == -1 ? 17 : 22 }}
  69. noClip: |
  70. {{ oneway != 0 }}
  71. pattern-polygon: true
  72. pattern-pixelSize: 9
  73. pattern-angleCorrection: |
  74. {{ oneway == -1 ? 180 : 0 }}
  75. pattern-path-color: |
  76. {{ const.types[type].color }}
  77. pattern-path-width: 0
  78. pattern-path-fillOpacity: 1
  79. style:footway:
  80. color: |
  81. {{ const.types.footway.color }}
  82. width: |
  83. {% if tags.segregated == 'yes' %}
  84. {{ const.types.footway.width / 2 }}
  85. {% else %}
  86. {{ const.types.footway.width }}
  87. {% endif %}
  88. dashArray: |
  89. {% if oneway and tags.segregated == 'no' %}
  90. 5,5,5,5,5,10
  91. {% elseif oneway %}
  92. 25,10
  93. {% elseif tags.segregated == 'no' %}
  94. 5,5
  95. {% endif %}
  96. dashOffset: |
  97. {% if oneway %}
  98. 10
  99. {% elseif tags.segregated == 'no' %}
  100. 5
  101. {% endif %}
  102. noClip: |
  103. {{ oneway != 0 }}
  104. lineCap: |
  105. {% if tags.segregated == 'no' or oneway %}
  106. butt
  107. {% else %}
  108. round
  109. {% endif %}
  110. offset: |
  111. {% if tags.segregated == 'yes' %}
  112. {{ (const.types.footway.width / 2 - 1) * -1 }}
  113. {% endif %}
  114. description: |
  115. {% if tags.cyclestreet == 'yes' %}
  116. {{ keyTrans('cyclestreet') }}
  117. {% elseif tags.bicycle_road in ['yes', 'designated'] %}
  118. {{ keyTrans('bicycle_road') }}
  119. {% elseif tags.segregated %}
  120. {{ tagTrans('highway', 'cycleway segregated=' ~ tags.segregated) }}
  121. {% elseif tags.highway %}
  122. {{ tagTrans('highway', tags.highway) }}
  123. {% endif %}
  124. markerSymbol: ''
  125. const:
  126. types:
  127. cycleway:
  128. color: '#009f00'
  129. width: 4
  130. footway:
  131. color: '#ff9f00'
  132. width: 4
  133. cyclestreet:
  134. color: '#006f3f'
  135. width: 8
  136. bicycle_road:
  137. color: '#006f4f'
  138. width: 8