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.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "en": "Railway Routes",
  5. "fr": "Lignes ferroviaires",
  6. "hu": "Vasútvonalak",
  7. "pt-br": "Rotas ferroviárias"
  8. },
  9. "query": {
  10. "12": "relation[type=route][route=railway]"
  11. },
  12. "members": true,
  13. "feature": {
  14. "pre": "{% set color = '#' ~ tags.operator|default('')|md5|slice(0, 6) %}",
  15. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}",
  16. "description": "{{ tags.operator }}",
  17. "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 %}",
  18. "styles": "",
  19. "markerSymbol": ""
  20. },
  21. "memberFeature": {
  22. "pre": [
  23. "{% set refs = [] %}",
  24. "{% set color = '#d41d8c' %}",
  25. "",
  26. "{% for master in masters %}",
  27. " {% if master.tags.operator %}",
  28. " {% set color = '#' ~ master.tags.operator|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. "title": "",
  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'>{{ master.tags.operator }}</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. }