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.

78 lines
2.8 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": "14",
  34. "pattern-repeat": "25",
  35. "pattern-polygon": "true",
  36. "pattern-pixelSize": "{% if tags.highway == 'cycleway' %}5{% else %}7{% endif %}",
  37. "pattern-path-color": "{% if tags.highway == 'cycleway' %}#007f00{% else %}#000000{% endif %}",
  38. "pattern-path-fillOpacity": "1",
  39. "pattern-angleCorrection": "{% if oneway == -1 %}180{% else %}0{% endif %}"
  40. },
  41. "style:highlight": null,
  42. "style:left": {
  43. "width": "0",
  44. "pattern": "{% if tags.cycleway in [ 'opposite', 'opposite_lane', 'opposite_track' ] %}arrowHead{% endif %}",
  45. "pattern-offset": "0",
  46. "pattern-repeat": "25",
  47. "pattern-polygon": "true",
  48. "pattern-pixelSize": "5",
  49. "pattern-path-color": [
  50. "{% if tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_lane', 'opposite' ] %}",
  51. "#00ff00",
  52. "{% elseif tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_track' ] %}",
  53. "#00af00",
  54. "{% endif %}"
  55. ],
  56. "pattern-path-fillOpacity": "1",
  57. "pattern-angleCorrection": [
  58. "{% if oneway == -1 %}0{% else %}180{% endif %}"
  59. ]
  60. }
  61. },
  62. "info": [
  63. "<table>",
  64. " <tr>",
  65. " <td>{{ markerLine(evaluate({ \"highway\": \"cycleway\" }))|raw }}</td>",
  66. " <td>{{ tagTrans('highway', 'cycleway') }}</td>",
  67. " </tr>",
  68. " <tr>",
  69. " <td>{{ markerLine(evaluate({ \"cycleway\": \"track\" }))|raw }}</td>",
  70. " <td>{{ tagTrans('cycleway', 'track') }}</td>",
  71. " </tr>",
  72. " <tr>",
  73. " <td>{{ markerLine(evaluate({ \"cycleway\": \"lane\" }))|raw }}</td>",
  74. " <td>{{ tagTrans('cycleway', 'lane') }}</td>",
  75. " </tr>",
  76. "</table>"
  77. ]
  78. }