Main categories of OpenStreetBrowser with support for whitewater
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.

106 lines
3.8 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. "",
  32. "{% for master in masters %}",
  33. " {% set _p = const[master.tags.network].priority|default(4) %}",
  34. " {% if _p < priority %}",
  35. " {% set priority = _p %}",
  36. " {% set network = master.tags.network %}",
  37. " {% endif %}",
  38. " {% if master.tags.ref %}",
  39. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  40. " {% endif %}",
  41. "{% endfor %}"
  42. ],
  43. "title": "",
  44. "body": [
  45. "<h4>Routes</h4>",
  46. "<ul class='overpass-layer-list'>",
  47. "{% for master in masters %}",
  48. " <li data-object=\"{{ master.id }}\">",
  49. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
  50. " <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>",
  51. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  52. " </li>",
  53. "{% endfor %}",
  54. "</ul>"
  55. ],
  56. "listExclude": "1",
  57. "style": {
  58. "color": "{{ const[network].color }}",
  59. "width": 4,
  60. "opacity": 1,
  61. "text": "{{ refs|join(' · ') }} ",
  62. "textRepeat": "1",
  63. "textOffset": "12",
  64. "textFontWeight": "bold"
  65. }
  66. },
  67. "const": {
  68. "icn": {
  69. "color": "#ff0000",
  70. "priority": 0,
  71. "zoom": 6
  72. },
  73. "ncn": {
  74. "color": "#ff00ba",
  75. "priority": 1,
  76. "zoom": 9
  77. },
  78. "rcn": {
  79. "color": "#ba00ff",
  80. "priority": 2,
  81. "zoom": 12
  82. },
  83. "lcn": {
  84. "color": "#0000ff",
  85. "priority": 3,
  86. "zoom": 15
  87. },
  88. "": {
  89. "color": "#007fff",
  90. "priority": 4,
  91. "zoom": 15
  92. }
  93. },
  94. "info": [
  95. "<table>",
  96. "{% for value, data in const %}",
  97. "{% if data.zoom <= map.zoom %}",
  98. " <tr>",
  99. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  100. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  101. " </tr>",
  102. "{% endif %}",
  103. "{% endfor %}",
  104. "</table>"
  105. ]
  106. }