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.

111 lines
3.9 KiB

  1. {
  2. "type": "overpass",
  3. "query": {
  4. "10": "way[highway~'^(motorway|trunk)']",
  5. "12": "way[highway~'^(motorway|trunk|primary)']",
  6. "13": "way[highway~'^(motorway|trunk|primary|secondary)']",
  7. "14": "way[highway~'^(motorway|trunk|primary|secondary|tertiary)']",
  8. "15": "way[highway~'^(motorway|trunk|primary|secondary|tertiary|pedestrian|unclassified)']",
  9. "16": "way[highway~'^(motorway|trunk|primary|secondary|tertiary|pedestrian|unclassified|residential)']",
  10. "17": "way[highway~'^(motorway|trunk|primary|secondary|tertiary|pedestrian|unclassified|residential|living_street|service)']",
  11. "18": "way[highway][highway!~'^(raceway|bus_guideway)$']"
  12. },
  13. "feature": {
  14. "pre": [
  15. "{% set highway = tags.highway %}{% set is_link = false %}",
  16. "{% if tags.highway|matches('_link$') %}",
  17. " {% set highway = tags.highway|slice(0, tags.highway|length - 5) %}{% set is_link = true %}",
  18. "{% endif %}"
  19. ],
  20. "description": "{{ tagTrans('highway', tags.highway) }}",
  21. "priority": "{{ const.priorities[highway]|default(50) + (is_link ? 0.5 : 0) }}",
  22. "markerSymbol": "",
  23. "listMarkerSymbol": "line",
  24. "style": {
  25. "width": "{{ is_link ? 2 : 4 }}",
  26. "color": "{{ const.colors[highway]|default('#ff0000') }}",
  27. "text": " {{ localizedTag(tags, 'name') }} ",
  28. "textRepeat": "1",
  29. "textFontWeight": "bold"
  30. }
  31. },
  32. "info": [
  33. "<table>",
  34. "{% for k, color in const.colors %}",
  35. " {% if map.zoom >= const.zooms[k] %}",
  36. " <tr>",
  37. " <td>{{ markerLine({ \"width\": \"4\", \"color\": color })|raw }}</td>",
  38. " <td>{{ tagTrans('highway', k) }}</td>",
  39. " </tr>",
  40. " {% endif %}",
  41. "{% endfor %}",
  42. " <tr>",
  43. " <td>{{ markerLine({ \"width\": \"2\", \"color\": const.colors.motorway })|raw }}</td>",
  44. " <td>{{ tagTrans('highway', 'motorway_link') }}</td>",
  45. " </tr>",
  46. " <tr>",
  47. " <td>{{ markerLine({ \"width\": \"4\", \"color\": \"#ff0000\" })|raw }}</td>",
  48. " <td>{{ trans('invalid value') }}</td>",
  49. " </tr>",
  50. "</table>"
  51. ],
  52. "const": {
  53. "priorities": {
  54. "motorway": 1,
  55. "trunk": 2,
  56. "primary": 10,
  57. "secondary": 11,
  58. "tertiary": 12,
  59. "pedestrian": 20,
  60. "unclassified": 21,
  61. "residential": 22,
  62. "living_street": 23,
  63. "service": 24,
  64. "track": 30,
  65. "escape": 31,
  66. "cycleway": 41,
  67. "bridleway": 42,
  68. "footway": 43,
  69. "path": 44,
  70. "steps": 45
  71. },
  72. "colors": {
  73. "motorway": "#ff2f2f",
  74. "trunk": "#ff4f4f",
  75. "primary": "#ff7f00",
  76. "secondary": "#ffaf00",
  77. "tertiary": "#ffff00",
  78. "pedestrian": "#ff00ff",
  79. "unclassified": "#4f4fff",
  80. "residential": "#7f4fff",
  81. "living_street": "#af2fff",
  82. "service": "#4f4f7f",
  83. "track": "#bb6300",
  84. "escape": "#bb3300",
  85. "cycleway": "#7faf00",
  86. "bridleway": "#00af7f",
  87. "footway": "#00af00",
  88. "path": "#007f00",
  89. "steps": "#00af00"
  90. },
  91. "zooms": {
  92. "motorway": 10,
  93. "trunk": 10,
  94. "primary": 12,
  95. "secondary": 13,
  96. "tertiary": 14,
  97. "pedestrian": 15,
  98. "unclassified": 15,
  99. "residential": 16,
  100. "living_street": 17,
  101. "service": 17,
  102. "track": 18,
  103. "escape": 18,
  104. "cycleway": 18,
  105. "bridleway": 18,
  106. "footway": 18,
  107. "path": 18,
  108. "steps": 18
  109. }
  110. }
  111. }