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.

119 lines
4.6 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Radrouten",
  5. "en": "Cycle Routes",
  6. "fr": "Itinéraires vélo",
  7. "hu": "Kerékpáros útvonalak",
  8. "pt": "Ciclovias",
  9. "pt-br": "Ciclorrotas"
  10. },
  11. "query": {
  12. "6": "relation[type=route][route=bicycle][network~'^(icn)$']",
  13. "9": "relation[type=route][route=bicycle][network~'^(icn|ncn)$']",
  14. "12": "relation[type=route][route=bicycle][network~'^(icn|ncn|rcn)$']",
  15. "15": "relation[type=route][route=bicycle]"
  16. },
  17. "members": true,
  18. "feature": {
  19. "priority": "{{ const[tags.network].priority|default(4) }}",
  20. "description": "{{ tagTrans('network', tags.network) }}",
  21. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}",
  22. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}",
  23. "styles": "",
  24. "markerSymbol": ""
  25. },
  26. "memberFeature": {
  27. "pre": [
  28. "{% set priority = 4 %}",
  29. "{% set network = '' %}",
  30. "{% set refs = [] %}",
  31. "{% set dirForward = false %}",
  32. "{% set dirBackward = false %}",
  33. "",
  34. "{% for master in masters %}",
  35. " {% set _p = const[master.tags.network].priority|default(4) %}",
  36. " {% if _p < priority %}",
  37. " {% set priority = _p %}",
  38. " {% set network = master.tags.network %}",
  39. " {% endif %}",
  40. " {% if master.tags.ref %}",
  41. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  42. " {% endif %}",
  43. " {% if master.role == 'forward' %}{% set dirForward = true %}",
  44. " {% elseif master.role == 'backward' %}{% set dirBackward = true %}",
  45. " {% else %}{% set dirForward = true %}{% set dirBackward = true %}",
  46. " {% endif %}",
  47. "{% endfor %}"
  48. ],
  49. "title": "",
  50. "body": [
  51. "<h4>Routes</h4>",
  52. "<ul class='overpass-layer-list'>",
  53. "{% for master in masters %}",
  54. " <li data-object=\"{{ master.id }}\">",
  55. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
  56. " <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>",
  57. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  58. " </li>",
  59. "{% endfor %}",
  60. "</ul>"
  61. ],
  62. "listExclude": "1",
  63. "style": {
  64. "color": "{{ const[network].color }}",
  65. "width": "{% if not dirForward or not dirBackward %}0{% else %}4{% endif %}",
  66. "opacity": 1,
  67. "text": "{{ refs|join(' · ') }} ",
  68. "textRepeat": "1",
  69. "textOffset": "12",
  70. "textFontWeight": "bold",
  71. "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}",
  72. "pattern-pixelSize": "4",
  73. "pattern-repeat": "7",
  74. "pattern-polygon": "",
  75. "pattern-path-weight": "2",
  76. "pattern-path-color": "{{ const[network].color }}",
  77. "pattern-path-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}"
  78. }
  79. },
  80. "const": {
  81. "icn": {
  82. "color": "#ff0000",
  83. "priority": 0,
  84. "zoom": 6
  85. },
  86. "ncn": {
  87. "color": "#ff00ba",
  88. "priority": 1,
  89. "zoom": 9
  90. },
  91. "rcn": {
  92. "color": "#ba00ff",
  93. "priority": 2,
  94. "zoom": 12
  95. },
  96. "lcn": {
  97. "color": "#0000ff",
  98. "priority": 3,
  99. "zoom": 15
  100. },
  101. "": {
  102. "color": "#007fff",
  103. "priority": 4,
  104. "zoom": 15
  105. }
  106. },
  107. "info": [
  108. "<table>",
  109. "{% for value, data in const %}",
  110. "{% if data.zoom <= map.zoom %}",
  111. " <tr>",
  112. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  113. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  114. " </tr>",
  115. "{% endif %}",
  116. "{% endfor %}",
  117. "</table>"
  118. ]
  119. }