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.

94 lines
3.0 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 })|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 = {icn:0,ncn:1,rcn:2,lcn:3}[master.tags.network]|default(4) %}",
  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. "<h4>Routes</h4>",
  43. "<ul>",
  44. "{% for master in masters %}",
  45. " <li data-object=\"{{ master.id }}\"><b>{{ master.tags.name|default(master.tags.ref) }}</b>{% if master.tags.network %} <i>{{ tagTrans('network', master.tags.network) }}</i>{% endif %}</li>",
  46. "{% endfor %}",
  47. "</ul>"
  48. ],
  49. "listExclude": "1",
  50. "style": {
  51. "color": "{{ const[network].color }}",
  52. "width": 4,
  53. "opacity": 1,
  54. "text": "{{ refs|join(' ') }} ",
  55. "textRepeat": "1",
  56. "textOffset": "12",
  57. "textFontWeight": "bold"
  58. }
  59. },
  60. "const": {
  61. "icn": {
  62. "color": "#ff0000",
  63. "zoom": 6
  64. },
  65. "ncn": {
  66. "color": "#ff00ba",
  67. "zoom": 9
  68. },
  69. "rcn": {
  70. "color": "#ba00ff",
  71. "zoom": 12
  72. },
  73. "lcn": {
  74. "color": "#0000ff",
  75. "zoom": 15
  76. },
  77. "": {
  78. "color": "#007fff",
  79. "zoom": 15
  80. }
  81. },
  82. "info": [
  83. "<table>",
  84. "{% for value, data in const %}",
  85. "{% if data.zoom <= map.zoom %}",
  86. " <tr>",
  87. " <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
  88. " <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
  89. " </tr>",
  90. "{% endif %}",
  91. "{% endfor %}",
  92. "</table>"
  93. ]
  94. }