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.

59 lines
2.5 KiB

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