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.

91 lines
2.9 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] }}",
  19. "description": "{{ tagTrans('network', tags.network) }}",
  20. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color })|raw }}",
  21. "styles": ""
  22. },
  23. "memberFeature": {
  24. "pre": [
  25. "{% set priority = 4 %}",
  26. "{% set network = '' %}",
  27. "{% set refs = [] %}",
  28. "",
  29. "{% for master in masters %}",
  30. " {% set _p = {iwn:0,nwn:1,rwn:2,lwn:3}[master.tags.network] %}",
  31. " {% if _p < priority %}",
  32. " {% set priority = _p %}",
  33. " {% set network = master.tags.network %}",
  34. " {% endif %}",
  35. " {% if master.tags.ref %}",
  36. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  37. " {% endif %}",
  38. "{% endfor %}"
  39. ],
  40. "title": "",
  41. "body": [
  42. "<ul>",
  43. "{% for master in masters %}",
  44. " {% if master.tags.public_transport != 'stop_area' %}",
  45. " <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</b> <i>{{ tagTrans('network', master.tags.network) }}</i></li>",
  46. " {% endif %}",
  47. "{% endfor %}",
  48. "</ul>"
  49. ],
  50. "listExclude": "1",
  51. "style": {
  52. "color": "{{ const[network].color }}",
  53. "width": 4,
  54. "opacity": 1,
  55. "text": "{{ refs|join(' ') }} ",
  56. "textRepeat": "1",
  57. "textOffset": "12",
  58. "textFontWeight": "bold"
  59. }
  60. },
  61. "const": {
  62. "iwn": {
  63. "color": "#ff0000",
  64. "zoom": 10
  65. },
  66. "nwn": {
  67. "color": "#ff00ba",
  68. "zoom": 11
  69. },
  70. "rwn": {
  71. "color": "#ba00ff",
  72. "zoom": 12
  73. },
  74. "lwn": {
  75. "color": "#0000ff",
  76. "zoom": 14
  77. }
  78. },
  79. "info": [
  80. "<table>",
  81. "{% for value, data in const %}",
  82. "{% if data.zoom <= map.zoom %}",
  83. " <tr>",
  84. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  85. " <td>{{ tagTrans('network', value) }}</td>",
  86. " </tr>",
  87. "{% endif %}",
  88. "{% endfor %}",
  89. "</table>"
  90. ]
  91. }