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.

75 lines
3.0 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
6 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "ca": "Rutes Fèrries",
  5. "cs": "Železniční trasy",
  6. "de": "Eisenbahnrouten",
  7. "en": "Railway Routes",
  8. "es": "Rutas de ferrocarril",
  9. "fr": "Lignes ferroviaires",
  10. "gl": "Liñas de ferrocarril",
  11. "hu": "Vasútvonalak",
  12. "it": "Percorsi ferroviari",
  13. "ja": "鉄道ルート",
  14. "nb": "Jernbaneruter",
  15. "nl": "Spoorwegroutes",
  16. "oc": "Linhas ferroviàrias",
  17. "pl": "Trasy kolejowe",
  18. "pt": "Rotas ferroviárias",
  19. "pt-br": "Rotas ferroviárias",
  20. "ru": "Железнодорожные маршруты",
  21. "sr": "Трасе железнице",
  22. "tr": "Demiryolu Güzergahları"
  23. },
  24. "query": {
  25. "12": "relation[type=route][route=railway]"
  26. },
  27. "members": true,
  28. "feature": {
  29. "pre": "{% set color = '#' ~ tags.operator|default('')|md5|slice(0, 6) %}",
  30. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}",
  31. "description": "{{ tags.operator }}",
  32. "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}",
  33. "styles": "",
  34. "markerSymbol": ""
  35. },
  36. "memberFeature": {
  37. "pre": [
  38. "{% set refs = [] %}",
  39. "{% set color = '#d41d8c' %}",
  40. "",
  41. "{% for master in masters %}",
  42. " {% if master.tags.operator %}",
  43. " {% set color = '#' ~ master.tags.operator|md5|slice(0, 6) %}",
  44. " {% endif %}",
  45. " {% if master.tags.ref %}",
  46. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  47. " {% endif %}",
  48. "{% endfor %}"
  49. ],
  50. "title": "",
  51. "body": [
  52. "<h4>Routes</h4>",
  53. "<ul>",
  54. "{% for master in masters %}",
  55. " {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}",
  56. " <li data-object=\"{{ master.id }}\" style='list-style: none;'>",
  57. " <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>",
  58. " <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>",
  59. " <span class='description'>{{ master.tags.operator }}</span>",
  60. " </li>",
  61. "{% endfor %}",
  62. "</ul>"
  63. ],
  64. "listExclude": "1",
  65. "style": {
  66. "color": "{{ color }}",
  67. "width": 4,
  68. "opacity": 1,
  69. "text": "{{ refs|join(' · ') }} ",
  70. "textRepeat": "1",
  71. "textOffset": "12",
  72. "textFontWeight": "bold"
  73. }
  74. }
  75. }