Main categories of OpenStreetBrowser with support for whitewater
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.

61 lines
2.5 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. " {% set refs = refs|merge([ tags.ref ]) %}",
  26. "{% endif %}",
  27. "",
  28. "{% for master in masters %}",
  29. " {% if master.tags.network %}",
  30. " {% set color = '#' ~ master.tags.network|md5|slice(0, 6) %}",
  31. " {% endif %}",
  32. " {% if master.tags.ref %}",
  33. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  34. " {% endif %}",
  35. "{% endfor %}"
  36. ],
  37. "body": [
  38. "<h4>Routes</h4>",
  39. "<ul>",
  40. "{% for master in masters %}",
  41. " {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}",
  42. " <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
  43. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>",
  44. " <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>",
  45. " <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>",
  46. " </li>",
  47. "{% endfor %}",
  48. "</ul>"
  49. ],
  50. "listExclude": "1",
  51. "style": {
  52. "color": "{{ color }}",
  53. "width": 4,
  54. "opacity": 1,
  55. "text": "{{ refs|join(' ') }} ",
  56. "textRepeat": "1",
  57. "textOffset": "12",
  58. "textFontWeight": "bold"
  59. }
  60. }
  61. }