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.

60 lines
2.5 KiB

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