Browse Source

Highlight missing parts

master
parent
commit
ad042b64db
  1. 42
      wien-hvnr.json

42
wien-hvnr.json

@ -35,6 +35,9 @@
"{% set dirBackward = false %}",
"{% set hover = false %}",
"{% set selected = false %}",
"{% set missingDirForward = false %}",
"{% set missingDirBackward = false %}",
"{% set missingPriority = 4 %}",
"",
"{% for master in masters if master.tags.route == 'bicycle' %}",
" {% set masterNetwork = '' %}",
@ -53,6 +56,22 @@
" {% endif %}",
" {% if master.flags.hover %}{% set hover = master.role|default('both') %}{% endif %}",
" {% if master.flags.selected %}{% set selected = master.role|default('both') %}{% endif %}",
"{% endfor %}",
"",
"{% for master in masters if master.tags.missing == 'yes' %}",
" {% set masterNetwork = '' %}",
" {% if master.tags.cycle_network|matches('^AT:Vienna:') %}{% set masterNetwork = master.tags.cycle_network %}{% endif %}",
" {% set _p = const[masterNetwork].priority|default(4) %}",
" {% if _p < missingPriority %}",
" {% set missingPriority = _p %}",
" {% set network = masterNetwork %}",
" {% endif %}",
" {% if master.role == 'forward' %}{% set missingDirForward = true %}",
" {% elseif master.role == 'backward' %}{% set missingDirBackward = true %}",
" {% else %}{% set missingDirForward = true %}{% set missingDirBackward = true %}",
" {% endif %}",
" {% if master.flags.hover %}{% set hover = master.role|default('both') %}{% endif %}",
" {% if master.flags.selected %}{% set selected = master.role|default('both') %}{% endif %}",
"{% endfor %}"
],
"title": "",
@ -75,7 +94,28 @@
"</ul>"
],
"listExclude": "1",
"styles": "default{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}",
"styles": "{% if missingPriority < 4 %}missing{% else %}default{% endif %}{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}",
"style:missing": {
"width": "{% if missingPriority < 4 %}6{% else %}0{% endif %}",
"color": "{{ const[network].missing }}",
"opacity": "1",
"lineCap": "{% if not missingDirForward or not missingDirBackward %}butt{% else %}round{% endif %}",
"dashArray": "{% if not missingDirForward or not missingDirBackward %}27,8{% endif %}",
"dashOffset": "{% if missingDirBackward %}28{% else %}0{% endif %}",
"noClip": "{% if not missingDirForward or not missingDirBackward %}true{% else %}false{% endif %}",
"textRepeat": "1",
"textOffset": "12",
"pattern": "{% if missingDirForward and missingDirBackward %}{% else %}arrowHead{% endif %}",
"pattern-offset": "{% if missingDirBackward %}4{% else %}30.5{% endif %}",
"pattern-repeat": "35",
"pattern-polygon": "true",
"pattern-pixelSize": "9",
"pattern-angleCorrection": "{% if missingDirBackward %}180{% else %}0{% endif %}",
"pattern-path-width": "0",
"pattern-path-color": "{{ const[network].missing }}",
"pattern-path-fillOpacity": "1",
"textFontWeight": "bold"
},
"style": {
"width": "{% if priority < 4 %}4{% else %}0{% endif %}",
"color": "{{ const[network].color }}",

Loading…
Cancel
Save