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.

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