Main categories of OpenStreetBrowser with public transport zoom level
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.8 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Radrouten",
  5. "en": "Cycle Routes",
  6. "fr": "Itinéraires vélo",
  7. "pt": "Ciclovias",
  8. "pt-br": "Ciclorrotas"
  9. },
  10. "query": {
  11. "6": "relation[type=route][route=bicycle][network~'^(icn)$']",
  12. "9": "relation[type=route][route=bicycle][network~'^(icn|ncn)$']",
  13. "12": "relation[type=route][route=bicycle][network~'^(icn|ncn|rcn)$']",
  14. "15": "relation[type=route][route=bicycle]"
  15. },
  16. "members": true,
  17. "feature": {
  18. "priority": "{{ const[tags.network].priority|default(4) }}",
  19. "description": "{{ tagTrans('network', tags.network) }}",
  20. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].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 = const[master.tags.network].priority|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. "title": "",
  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 }}{% else %}{{ trans('unnamed') }}{% 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. "icn": {
  68. "color": "#ff0000",
  69. "priority": 0,
  70. "zoom": 6
  71. },
  72. "ncn": {
  73. "color": "#ff00ba",
  74. "priority": 1,
  75. "zoom": 9
  76. },
  77. "rcn": {
  78. "color": "#ba00ff",
  79. "priority": 2,
  80. "zoom": 12
  81. },
  82. "lcn": {
  83. "color": "#0000ff",
  84. "priority": 3,
  85. "zoom": 15
  86. },
  87. "": {
  88. "color": "#007fff",
  89. "priority": 4,
  90. "zoom": 15
  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. }