Main categories of OpenStreetBrowser with public transport zoom level
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.

130 lines
5.0 KiB

  1. {
  2. "type": "overpass",
  3. "query": {
  4. "14": [
  5. "(",
  6. "way[highway=cycleway];",
  7. ")"
  8. ],
  9. "16": [
  10. "(",
  11. "way[highway][highway!~'^(motorway.*|trunk.*|footway|service|steps|platform|corridor)$'][bicycle!=no];",
  12. "way[highway~'^(cycleway|living_street)$'];",
  13. "way[bicycle~'^(yes|designated)$'];",
  14. "way[cycleway];",
  15. ")"
  16. ]
  17. },
  18. "feature": {
  19. "pre": [
  20. "{% set forward = false %}",
  21. "{% set backward = false %}",
  22. "{% set cycleway = tags.cycleway|split(';') %}",
  23. "{% set road_type = const[tags.highway] ? tags.highway : 'default' %}",
  24. "{% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %}",
  25. "{% if tags.highway == 'path' and tags.bicycle == 'designated' %}{% set road_type = 'cycleway' %}{% endif %}",
  26. "{% if oneway in ['yes', '1'] %}{% set forward = road_type %}{% elseif oneway in ['-1'] %}{% set backward = road_type %}{% else %}{% set forward = road_type %}{% set backward = road_type %}{% endif %}",
  27. "{% for c in cycleway %}",
  28. " {% if c in ['opposite', 'opposite_lane', 'opposite_track'] %}{% set backward = c|slice(9)|default(road_type) %}{% endif %}",
  29. " {% if const[c] %}{% if oneway in ['yes', '1', '-1'] %}{% set forward = c %}{% else %}{% set forward = c %}{% set backward = c %}{% endif %}{% endif %}",
  30. "{% endfor %}"
  31. ],
  32. "body": [
  33. "{{ keyTrans('highway') }}: {{ tagTrans('highway', tags.highway) }}<br>",
  34. "{% if tags.cycleway %}{{ keyTrans('cycleway') }}: {% for c in cycleway %}{{ tagTrans('cycleway', c) }} {% endfor %}<br>{% endif %}",
  35. "{% if tags.surface %}{{ keyTrans('surface') }}: {{ tagTrans('surface', tags.surface) }}<br>{% endif %}"
  36. ],
  37. "markerSymbol": null,
  38. "listMarkerSymbol": "line",
  39. "styles": "{% if forward and backward and forward == backward %}default{% else %}{% if forward %},forward{% endif %}{% if backward %},backward{% endif %}{% endif %}",
  40. "style": {
  41. "color": "{{ const[forward].color }}",
  42. "fill": "{% if tags.area == 'yes' %}true{% else %}false{% endif %}",
  43. "width": "{% if tags.area == 'yes' %}0{% else %}{{ const[forward].width }}{% endif %}"
  44. },
  45. "style:forward": {
  46. "width": "0",
  47. "fill": "false",
  48. "pattern": "arrowHead",
  49. "pattern-offset": "8",
  50. "pattern-repeat": "60",
  51. "pattern-polygon": "true",
  52. "pattern-pixelSize": "9",
  53. "pattern-angleCorrection": "0",
  54. "pattern-path-width": "0",
  55. "pattern-path-color": "{{ const[forward].color }}",
  56. "pattern-path-fillOpacity": "1",
  57. "pattern-lineOffset": "0",
  58. "pattern2": "dash",
  59. "pattern2-offset": "50",
  60. "pattern2-repeat": "60",
  61. "pattern2-pixelSize": "22",
  62. "pattern2-path-width": "{{ const[forward].width }}",
  63. "pattern2-path-color": "{{ const[forward].color }}",
  64. "pattern2-lineOffset": "0",
  65. "pattern2-path-lineCap": "butt",
  66. "pattern2-path-fillOpacity": "1"
  67. },
  68. "style:backward": {
  69. "width": "0",
  70. "fill": "false",
  71. "pattern": "arrowHead",
  72. "pattern-offset": "10",
  73. "pattern-repeat": "60",
  74. "pattern-polygon": "true",
  75. "pattern-pixelSize": "9",
  76. "pattern-angleCorrection": "180",
  77. "pattern-path-width": "0",
  78. "pattern-path-color": "{{ const[backward].color }}",
  79. "pattern-path-fillOpacity": "1",
  80. "pattern-lineOffset": "0",
  81. "pattern2": "dash",
  82. "pattern2-offset": "25",
  83. "pattern2-repeat": "60",
  84. "pattern2-pixelSize": "22",
  85. "pattern2-path-width": "{{ const[backward].width }}",
  86. "pattern2-path-color": "{{ const[backward].color }}",
  87. "pattern2-lineOffset": "0",
  88. "pattern2-path-lineCap": "butt",
  89. "pattern2-path-fillOpacity": "1"
  90. }
  91. },
  92. "const": {
  93. "cycleway": {
  94. "width": "3",
  95. "color": "#005f00"
  96. },
  97. "track": {
  98. "width": "3",
  99. "color": "#005f00"
  100. },
  101. "lane": {
  102. "width": "3",
  103. "color": "#00af00"
  104. },
  105. "share_busway": {
  106. "width": "3",
  107. "color": "#5f0000"
  108. },
  109. "footway": {
  110. "width": "3",
  111. "color": "#005faf"
  112. },
  113. "path": {
  114. "width": "3",
  115. "color": "#005faf"
  116. },
  117. "pedestrian": {
  118. "width": "4",
  119. "color": "#00afaf"
  120. },
  121. "living_street": {
  122. "width": "4",
  123. "color": "#005f5f"
  124. },
  125. "default": {
  126. "width": "4",
  127. "color": "#000000"
  128. }
  129. }
  130. }