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.

99 lines
3.7 KiB

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