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.

59 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. "pt-br": "Rotas ferroviárias"
  7. },
  8. "query": {
  9. "12": "relation[type=route][route=railway]"
  10. },
  11. "members": true,
  12. "feature": {
  13. "pre": "{% set color = '#' ~ tags.operator|default('')|md5|slice(0, 6) %}",
  14. "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}",
  15. "description": "{{ tags.operator }}",
  16. "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 %}",
  17. "styles": "",
  18. "markerSymbol": ""
  19. },
  20. "memberFeature": {
  21. "pre": [
  22. "{% set refs = [] %}",
  23. "{% set color = '#d41d8c' %}",
  24. "",
  25. "{% for master in masters %}",
  26. " {% if master.tags.operator %}",
  27. " {% set color = '#' ~ master.tags.operator|md5|slice(0, 6) %}",
  28. " {% endif %}",
  29. " {% if master.tags.ref %}",
  30. " {% set refs = refs|merge([ master.tags.ref ]) %}",
  31. " {% endif %}",
  32. "{% endfor %}"
  33. ],
  34. "title": "",
  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'>{{ master.tags.operator }}</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. }