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.

65 lines
2.7 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Car routes",
  5. "hu": "Főútvonalak",
  6. "pt-br": "Rotas rodoviárias"
  7. },
  8. "query": {
  9. "10": "relation[type=route][route=road]"
  10. },
  11. "members": true,
  12. "feature": {
  13. "pre": "{% set color = '#' ~ tags.network|default('')|md5|slice(0, 6) %}",
  14. "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}",
  15. "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 %}",
  16. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}",
  17. "markerSymbol": "",
  18. "styles": ""
  19. },
  20. "memberFeature": {
  21. "pre": [
  22. "{% set refs = [] %}",
  23. "{% set color = '#d41d8c' %}",
  24. "{% if tags.ref %}",
  25. " {% for ref in tags.ref|split(';') %}",
  26. " {% set refs = refs|merge([ ref|trim ]) %}",
  27. " {% endfor %}",
  28. "{% endif %}",
  29. "",
  30. "{% for master in masters %}",
  31. " {% if master.tags.network %}",
  32. " {% set color = '#' ~ master.tags.network|md5|slice(0, 6) %}",
  33. " {% endif %}",
  34. " {% if master.tags.ref %}",
  35. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  36. " {% endif %}",
  37. "{% endfor %}",
  38. "",
  39. "{% set refs = refs|unique|natsort({ insensitive: true }) %}"
  40. ],
  41. "body": [
  42. "<h4>Routes</h4>",
  43. "<ul>",
  44. "{% for master in masters %}",
  45. " {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}",
  46. " <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
  47. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>",
  48. " <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>",
  49. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  50. " </li>",
  51. "{% endfor %}",
  52. "</ul>"
  53. ],
  54. "listExclude": "1",
  55. "style": {
  56. "color": "{{ color }}",
  57. "width": 4,
  58. "opacity": 1,
  59. "text": "{{ refs|join(' ') }} ",
  60. "textRepeat": "1",
  61. "textOffset": "12",
  62. "textFontWeight": "bold"
  63. }
  64. }
  65. }