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.

100 lines
3.6 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": "{{ {icn:0,ncn:1,rcn:2,lcn:3}[tags.network] }}",
  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 = {icn:0,ncn:1,rcn:2,lcn: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. "title": "",
  43. "body": [
  44. "<h4>Routes</h4>",
  45. "<ul>",
  46. "{% for master in masters %}",
  47. " <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
  48. " {{ markerLine({ width: 4, color: const[master.tags.network].color|default(const[''].color) })|raw }}",
  49. " {% 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 %}",
  50. " <i style='color: #707070'>{{ tagTrans('network', master.tags.network) }}</i>",
  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. "zoom": 6
  70. },
  71. "ncn": {
  72. "color": "#ff00ba",
  73. "zoom": 9
  74. },
  75. "rcn": {
  76. "color": "#ba00ff",
  77. "zoom": 12
  78. },
  79. "lcn": {
  80. "color": "#0000ff",
  81. "zoom": 15
  82. },
  83. "": {
  84. "color": "#007fff",
  85. "zoom": 15
  86. }
  87. },
  88. "info": [
  89. "<table>",
  90. "{% for value, data in const %}",
  91. "{% if data.zoom <= map.zoom %}",
  92. " <tr>",
  93. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  94. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  95. " </tr>",
  96. "{% endif %}",
  97. "{% endfor %}",
  98. "</table>"
  99. ]
  100. }