Browse Source

railway-infrastructure: improve signals, switches, railway_crossing

fossil
parent
commit
6c831b4c26
  1. 24
      railway-infrastructure.json

24
railway-infrastructure.json

@ -23,15 +23,29 @@
"markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}",
"markerSymbol": [
"{% if tags.railway == 'signal' %}",
"<svg width='10' height='10'>",
" <circle cx='4.5' cy='4.5' r='3' style='stroke-width: 3; stroke: #000000; fill: #ffffff'>",
"<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />",
" <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>",
" <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>",
"</svg>",
"{% else %}",
"{% elseif tags.railway == 'switch' %}",
"<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />",
" <line x1='2' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
" <line x1='2' x2='7' y1='10' y2='2' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
"</svg>",
"{% elseif tags.railway == 'railway_crossing' %}",
"<svg anchorX='5' anchorY='8' width='9' height='15'>",
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />",
" <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
" <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>",
"</svg>",
"{% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused' ] %}",
"{{ markerPointer({})|raw }}",
"{% endif %}"
],
"listMarkerSymbol": [
"{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal' ] %}",
"{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal', 'switch', 'railway_crossing' ] %}",
"{% else %}",
"line",
"{% endif %}"
@ -58,6 +72,8 @@
" {% endif %}",
" {% elseif tags.railway == 'platform' %}",
" 1",
" {% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}",
" 0",
" {% else %}",
" 2",
" {% endif %}",

Loading…
Cancel
Save