A repository for testing purposes.
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.

80 lines
3.4 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Radwegrichtungen (patterns)",
  5. "en": "Cycleway Directions (patterns)"
  6. },
  7. "query": {
  8. "14": [
  9. "(",
  10. "way[highway=cycleway];",
  11. "way[cycleway];",
  12. "way[\"cycleway:left\"];",
  13. "way[\"cycleway:right\"];",
  14. "way[highway][oneway];",
  15. ")"
  16. ]
  17. },
  18. "feature": {
  19. "pre": [
  20. "{% set oneway = 0 %}",
  21. "{% if tags.oneway in [ 'yes', '1' ] %}{% set oneway = 1 %}",
  22. "{% elseif tags.oneway in [ '-1' ] %}{% set oneway = -1 %}",
  23. "{% endif %}",
  24. "",
  25. "{% set driving_side = 'right' %}"
  26. ],
  27. "markerSymbol": null,
  28. "listMarkerSymbol": "line",
  29. "styles": "{% if oneway != 0 %}default,{% endif %}left,right",
  30. "style": {
  31. "width": "0",
  32. "pattern": "arrowHead",
  33. "pattern-offset": "17",
  34. "pattern-repeat": "25",
  35. "pattern-polygon": "true",
  36. "pattern-pixelSize": "{% if tags.highway == 'cycleway' %}7{% else %}9{% endif %}",
  37. "pattern-path-color": "{% if tags.highway == 'cycleway' %}#007f00{% else %}#000000{% endif %}",
  38. "pattern-path-width": "1",
  39. "pattern-path-fillOpacity": "1",
  40. "pattern-angleCorrection": "{% if oneway == -1 %}180{% else %}0{% endif %}"
  41. },
  42. "style:highlight": null,
  43. "style:left": {
  44. "width": "0",
  45. "pattern": "{% if tags.cycleway in [ 'opposite', 'opposite_lane', 'opposite_track' ] or attribute(tags, 'cycleway:left') in [ 'opposite', 'opposite_lane', 'opposite_track' ] or attribute(tags, 'cycleway:right') in [ 'opposite', 'opposite_lane', 'opposite_track' ] %}arrowHead{% endif %}",
  46. "pattern-offset": "0",
  47. "pattern-repeat": "25",
  48. "pattern-polygon": "true",
  49. "pattern-pixelSize": "7",
  50. "pattern-path-width": "1",
  51. "pattern-path-color": [
  52. "{% if tags.oneway in [ 'yes', '1' ] and (tags.cycleway in [ 'opposite_track' ] or attribute(tags, 'cycleway:left') in [ 'opposite_track' ] or attribute(tags, 'cycleway:right') in [ 'opposite_track' ]) %}",
  53. "#00af00",
  54. "{% elseif tags.oneway in [ 'yes', '1' ] and (tags.cycleway in [ 'opposite_lane', 'opposite' ] or attribute(tags, 'cycleway:left') in [ 'opposite', 'opposite_lane' ] or attribute(tags, 'cycleway:right') in [ 'opposite', 'opposite_lane' ]) %}",
  55. "#00ff00",
  56. "{% endif %}"
  57. ],
  58. "pattern-path-fillOpacity": "1",
  59. "pattern-angleCorrection": [
  60. "{% if oneway == -1 %}0{% else %}180{% endif %}"
  61. ]
  62. }
  63. },
  64. "info": [
  65. "<table>",
  66. " <tr>",
  67. " <td>{{ markerLine(evaluate({ \"oneway\": \"yes\", \"highway\": \"cycleway\" }))|raw }}</td>",
  68. " <td>{{ tagTrans('highway', 'cycleway') }}</td>",
  69. " </tr>",
  70. " <tr>",
  71. " <td>{{ markerLine(evaluate({ \"oneway\": \"yes\", \"cycleway\": \"track\" }))|raw }}</td>",
  72. " <td>{{ tagTrans('cycleway', 'track') }}</td>",
  73. " </tr>",
  74. " <tr>",
  75. " <td>{{ markerLine(evaluate({ \"oneway\": \"yes\", \"cycleway\": \"lane\" }))|raw }}</td>",
  76. " <td>{{ tagTrans('cycleway', 'lane') }}</td>",
  77. " </tr>",
  78. "</table>"
  79. ]
  80. }