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.

105 lines
3.9 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Wanderrouten",
  5. "en": "Hiking routes",
  6. "fr": "Itinéraires pédestres",
  7. "hu": "Turistautak",
  8. "pt": "Rotas de caminhada",
  9. "pt-br": "Rotas de caminhada"
  10. },
  11. "query": {
  12. "10": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn)$\"]",
  13. "11": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn|nwn)$\"]",
  14. "12": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn|nwn|rwn)$\"]",
  15. "14": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"]"
  16. },
  17. "members": true,
  18. "feature": {
  19. "priority": "{{ const[tags.network].priority|default(4) }}",
  20. "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}",
  21. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].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 }}{% 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. "body": [
  44. "<h4>Routes</h4>",
  45. "<ul class='overpass-layer-list'>",
  46. "{% for master in masters %}",
  47. " <li data-object=\"{{ master.id }}\">",
  48. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}</div></span>",
  49. " <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 }}{% endif %}</span>",
  50. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  51. " </li>",
  52. "{% endfor %}",
  53. "</ul>"
  54. ],
  55. "listExclude": "1",
  56. "style": {
  57. "color": "{{ const[network].color }}",
  58. "width": 4,
  59. "opacity": 1,
  60. "text": "{{ refs|join(' · ') }} ",
  61. "textRepeat": "1",
  62. "textOffset": "12",
  63. "textFontWeight": "bold"
  64. }
  65. },
  66. "const": {
  67. "iwn": {
  68. "color": "#ff0000",
  69. "priority": 0,
  70. "zoom": 10
  71. },
  72. "nwn": {
  73. "color": "#ff00ba",
  74. "priority": 1,
  75. "zoom": 11
  76. },
  77. "rwn": {
  78. "color": "#ba00ff",
  79. "priority": 2,
  80. "zoom": 12
  81. },
  82. "lwn": {
  83. "color": "#0000ff",
  84. "priority": 3,
  85. "zoom": 14
  86. },
  87. "": {
  88. "color": "#007fff",
  89. "priority": 4,
  90. "zoom": 14
  91. }
  92. },
  93. "info": [
  94. "<table>",
  95. "{% for value, data in const %}",
  96. "{% if data.zoom <= map.zoom %}",
  97. " <tr>",
  98. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  99. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  100. " </tr>",
  101. "{% endif %}",
  102. "{% endfor %}",
  103. "</table>"
  104. ]
  105. }