From 11c08791ea11f755fa7f0e41252886daf3801598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 30 Oct 2018 06:18:10 +0100 Subject: [PATCH 01/10] Cycle routes: show directions on ways --- cycle_routes.json | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cycle_routes.json b/cycle_routes.json index 3844eec18..93610247e 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -28,6 +28,8 @@ "{% set priority = 4 %}", "{% set network = '' %}", "{% set refs = [] %}", + "{% set dirForward = false %}", + "{% set dirBackward = false %}", "", "{% for master in masters %}", " {% set _p = const[master.tags.network].priority|default(4) %}", @@ -38,6 +40,10 @@ " {% if master.tags.ref %}", " {% set refs = refs|merge([ master.tags.ref ]) %}", " {% endif %}", + " {% if master.role == 'forward' %}{% set dirForward = true %}", + " {% elseif master.role == 'backward' %}{% set dirBackward = true %}", + " {% else %}{% set dirForward = true %}{% set dirBackward = true %}", + " {% endif %}", "{% endfor %}" ], "title": "", @@ -56,12 +62,19 @@ "listExclude": "1", "style": { "color": "{{ const[network].color }}", - "width": 4, + "width": "{% if not dirForward or not dirBackward %}0{% else %}4{% endif %}", "opacity": 1, "text": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", - "textFontWeight": "bold" + "textFontWeight": "bold", + "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", + "pattern-pixelSize": "4", + "pattern-repeat": "7", + "pattern-polygon": "", + "pattern-path-weight": "2", + "pattern-path-color": "{{ const[network].color }}", + "pattern-path-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}" } }, "const": { From 06132618339186eff714503de4916dd96404a21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 30 Oct 2018 12:05:29 +0100 Subject: [PATCH 02/10] Cycle routes: hover/selected on the member features instead of master --- cycle_routes.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/cycle_routes.json b/cycle_routes.json index 93610247e..ee3bdb69a 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -21,6 +21,12 @@ "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}", "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 %}", "styles": "", + "style:hover": { + "width": 0 + }, + "style:selected": { + "width": 0 + }, "markerSymbol": "" }, "memberFeature": { @@ -30,6 +36,8 @@ "{% set refs = [] %}", "{% set dirForward = false %}", "{% set dirBackward = false %}", + "{% set hover = false %}", + "{% set selected = false %}", "", "{% for master in masters %}", " {% set _p = const[master.tags.network].priority|default(4) %}", @@ -44,6 +52,8 @@ " {% elseif master.role == 'backward' %}{% set dirBackward = true %}", " {% else %}{% set dirForward = true %}{% set dirBackward = 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": "", @@ -60,6 +70,7 @@ "" ], "listExclude": "1", + "styles": "default{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}", "style": { "color": "{{ const[network].color }}", "width": "{% if not dirForward or not dirBackward %}0{% else %}4{% endif %}", @@ -75,6 +86,30 @@ "pattern-path-weight": "2", "pattern-path-color": "{{ const[network].color }}", "pattern-path-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}" + }, + "style:hover": { + "pane": "hover", + "width": "{% if hover == 'forward' or hover == 'backward' %}0{% else %}4{% endif %}", + "color": "black", + "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", + "pattern-pixelSize": "4", + "pattern-repeat": "7", + "pattern-polygon": "", + "pattern-path-weight": "2", + "pattern-path-color": "black", + "pattern-path-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}" + }, + "style:selected": { + "pane": "selected", + "width": "{% if selected == 'forward' or selected == 'backward' %}0{% else %}3{% endif %}", + "color": "#3f3f3f", + "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", + "pattern-pixelSize": "4", + "pattern-repeat": "7", + "pattern-polygon": "", + "pattern-path-weight": "2", + "pattern-path-color": "#3f3f3f", + "pattern-path-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}" } }, "const": { From 2ab2a904b2f37b0ab4f441c1eac8ac31de3e1122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 1 Nov 2018 10:05:17 +0100 Subject: [PATCH 03/10] pt: instead of circles on stops use markers of type circle (always on top) --- pt.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pt.json b/pt.json index 46451cf37..5ef65901b 100644 --- a/pt.json +++ b/pt.json @@ -118,13 +118,14 @@ "{% endfor %}", "" ], - "styles": "{% if isStop and stopCount > 0 %}stop{% elseif isWay %}way{% else %}{% endif %}", + "styles": "{% if isStop and stopCount > 0 %}{% elseif isWay %}way{% else %}{% endif %}", "listStopsMarkerSign": null, "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsExclude": "{{ not isStop or stopCount == 0 }}", "listStopsTitle": "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}
  • {{ trans('loading') }}
  • {% endif %}", "listStopsDescription": "{{ refs|join(' · ') }}", "listRoutesExclude": "true", + "markerSymbol": "{% if isStop and stopCount > 0 %}{{ markerCircle({ width: 0, fill: true, fillColor: color, fillOpacity: '1', radius: 5 })|raw }}{% endif %}", "style:way": { "width": "3", "color": "{{ color|default('#ff0000') }}", @@ -132,11 +133,6 @@ "textRepeat": "1", "textOffset": "12", "textFontWeight": "bold" - }, - "style:stop": { - "width": "5", - "color": "{{ color|default('#ff0000') }}", - "radius": "3" } }, "info": [ From 4225e151fa1f995507862df5d5629415fb86975b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 1 Nov 2018 10:06:06 +0100 Subject: [PATCH 04/10] pt: show arrowHeads to indicate direction of routes --- pt.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pt.json b/pt.json index 5ef65901b..210e56f56 100644 --- a/pt.json +++ b/pt.json @@ -82,6 +82,8 @@ "{% set isWay = false %}", "{% set aRoute = null %}", "{% set refs = [] %}", + "{% set dirForward = false %}", + "{% set dirBackward = false %}", "{% for master in masters %}", " {% if master.tags.public_transport == 'stop_area' %}", " {% set stopName = master.tags.name %}", @@ -97,6 +99,10 @@ " {% if master.tags.ref %}", " {% set refs = refs|merge([ master.tags.ref ]) %}", " {% endif %}", + " {% if master.dir == 'forward' %}{% set dirForward = true %}", + " {% elseif master.dir == 'backward' %}{% set dirBackward = true %}", + " {% else %}{% set dirForward = true %}{% set dirBackward = true %}", + " {% endif %}", " {% endif %}", "{% endfor %}", "", @@ -128,11 +134,19 @@ "markerSymbol": "{% if isStop and stopCount > 0 %}{{ markerCircle({ width: 0, fill: true, fillColor: color, fillOpacity: '1', radius: 5 })|raw }}{% endif %}", "style:way": { "width": "3", + "opacity": "{% if (dirForward and dirBackward) or (not dirForward and not dirBackward) %}1{% else %}0{% endif %}", "color": "{{ color|default('#ff0000') }}", "text": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", - "textFontWeight": "bold" + "textFontWeight": "bold", + "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", + "pattern-pixelSize": "4", + "pattern-repeat": "7", + "pattern-polygon": "", + "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", + "pattern-path-weight": "2", + "pattern-path-color": "{{ color|default('#ff0000') }}" } }, "info": [ From 6d3e7c932e7531d2e508be7668a5b9cc08fb95ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 1 Nov 2018 10:25:36 +0100 Subject: [PATCH 05/10] pt: show directions in hover and selected --- pt.json | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/pt.json b/pt.json index 210e56f56..3f4bb5b15 100644 --- a/pt.json +++ b/pt.json @@ -84,6 +84,8 @@ "{% set refs = [] %}", "{% set dirForward = false %}", "{% set dirBackward = false %}", + "{% set hover = false %}", + "{% set selected = false %}", "{% for master in masters %}", " {% if master.tags.public_transport == 'stop_area' %}", " {% set stopName = master.tags.name %}", @@ -104,6 +106,9 @@ " {% else %}{% set dirForward = true %}{% set dirBackward = true %}", " {% endif %}", " {% endif %}", + "", + " {% if master.flags.hover %}{% set hover = master.dir|default('both') %}{% endif %}", + " {% if master.flags.selected %}{% set selected = master.dir|default('both') %}{% endif %}", "{% endfor %}", "", "{% set refs = refs|unique|natsort({ insensitive: true }) %}", @@ -118,20 +123,20 @@ "
  • ", "
    {{ markerCircle({fillColor:const[master.tags.route].color})|raw }}
    {{ const[master.tags.route].sign|raw }}
    ", " {% 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 %}", - " {{ tagTrans('route', master.tags.route) }}", + " {{ tagTrans('route', master.tags.route) }}{{ master.dir }}", "
  • ", " {% endif %}", "{% endfor %}", "" ], - "styles": "{% if isStop and stopCount > 0 %}{% elseif isWay %}way{% else %}{% endif %}", + "styles": "{% if isStop and stopCount > 0 %}{% elseif isWay %}way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}", "listStopsMarkerSign": null, "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsExclude": "{{ not isStop or stopCount == 0 }}", "listStopsTitle": "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}
  • {{ trans('loading') }}
  • {% endif %}", "listStopsDescription": "{{ refs|join(' · ') }}", "listRoutesExclude": "true", - "markerSymbol": "{% if isStop and stopCount > 0 %}{{ markerCircle({ width: 0, fill: true, fillColor: color, fillOpacity: '1', radius: 5 })|raw }}{% endif %}", + "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerCircle({ width: 0, fill: true, fillColor: hover ? '#000000' : '#3f3f3f', fillOpacity: '1', radius: 7 })|raw }}{% else %}{{ markerCircle({ width: 0, fill: true, fillColor: color, fillOpacity: '1', radius: 5 })|raw }}{% endif %}{% endif %}", "style:way": { "width": "3", "opacity": "{% if (dirForward and dirBackward) or (not dirForward and not dirBackward) %}1{% else %}0{% endif %}", @@ -147,6 +152,30 @@ "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", "pattern-path-weight": "2", "pattern-path-color": "{{ color|default('#ff0000') }}" + }, + "style:hover": { + "pane": "hover", + "width": "{% if hover == 'forward' or hover == 'backward' %}0{% else %}4{% endif %}", + "color": "black", + "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", + "pattern-pixelSize": "4", + "pattern-repeat": "7", + "pattern-polygon": "", + "pattern-path-weight": "2", + "pattern-path-color": "black", + "pattern-path-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}" + }, + "style:selected": { + "pane": "selected", + "width": "{% if selected == 'forward' or selected == 'backward' %}0{% else %}3{% endif %}", + "color": "#3f3f3f", + "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", + "pattern-pixelSize": "4", + "pattern-repeat": "7", + "pattern-polygon": "", + "pattern-path-weight": "2", + "pattern-path-color": "#3f3f3f", + "pattern-path-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}" } }, "info": [ From 682ac5c0f989dc64187fd074b0d4412092416441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 5 Nov 2018 21:11:17 +0100 Subject: [PATCH 06/10] cycle_routes: bettern pattern --- cycle_routes.json | 62 ++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/cycle_routes.json b/cycle_routes.json index ee3bdb69a..5cef3e3f2 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -73,43 +73,61 @@ "styles": "default{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}", "style": { "color": "{{ const[network].color }}", - "width": "{% if not dirForward or not dirBackward %}0{% else %}4{% endif %}", + "width": "4", + "dashArray": "{% if not dirForward or not dirBackward %}13,10{% endif %}", + "dashOffset": "{% if dirBackward %}16{% else %}0{% endif %}", + "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", + "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", "opacity": 1, "text": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", "textFontWeight": "bold", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", - "pattern-pixelSize": "4", - "pattern-repeat": "7", - "pattern-polygon": "", - "pattern-path-weight": "2", - "pattern-path-color": "{{ const[network].color }}", - "pattern-path-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}" + "pattern-pixelSize": "9", + "pattern-repeat": "23", + "pattern-offset": "{% if dirBackward %}2{% else %}18.5{% endif %}", + "pattern-polygon": "true", + "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", + "pattern-path-weight": "0", + "pattern-path-fillOpacity": "1", + "pattern-path-color": "{{ const[network].color }}" }, "style:hover": { "pane": "hover", - "width": "{% if hover == 'forward' or hover == 'backward' %}0{% else %}4{% endif %}", + "width": "4", + "dashArray": "{% if hover == 'forward' or hover == 'backward' %}15,8{% endif %}", + "dashOffset": "{% if hover == 'backward' %}16{% else %}0{% endif %}", + "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", + "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", "color": "black", "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "4", - "pattern-repeat": "7", - "pattern-polygon": "", - "pattern-path-weight": "2", - "pattern-path-color": "black", - "pattern-path-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}" + "pattern-pixelSize": "9", + "pattern-repeat": "23", + "pattern-offset": "{% if hover == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-polygon": "true", + "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", + "pattern-path-weight": "0", + "pattern-path-fillOpacity": "1", + "pattern-path-color": "black" }, "style:selected": { "pane": "selected", - "width": "{% if selected == 'forward' or selected == 'backward' %}0{% else %}3{% endif %}", - "color": "#3f3f3f", + "width": "4", + "dashArray": "{% if selected == 'forward' or selected == 'backward' %}15,8{% endif %}", + "dashOffset": "{% if selected == 'backward' %}16{% else %}0{% endif %}", + "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", + "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", + "color": "black", "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "4", - "pattern-repeat": "7", - "pattern-polygon": "", - "pattern-path-weight": "2", - "pattern-path-color": "#3f3f3f", - "pattern-path-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}" + "pattern-pixelSize": "9", + "pattern-repeat": "23", + "pattern-offset": "{% if selected == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-polygon": "true", + "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", + "pattern-path-weight": "0", + "pattern-path-fillOpacity": "1", + "pattern-path-color": "#3f3f3f" } }, "const": { From 2759d6c6e38aec302a66a97341fb7e51fc7a7366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 8 Nov 2018 10:33:46 +0100 Subject: [PATCH 07/10] pt: better patterns --- pt.json | 66 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/pt.json b/pt.json index 3f4bb5b15..cd3bbe0ca 100644 --- a/pt.json +++ b/pt.json @@ -67,6 +67,12 @@ ], "markerSymbol": "", "styles": "", + "style:hover": { + "width": 0 + }, + "style:selected": { + "width": 0 + }, "listStopsExclude": "true", "listRoutesMarkerSign": "{{ const[tags.route].sign|raw }}", "listRoutesMarkerSymbol": "{{ markerCircle({fillColor:const[tags.route].color})|raw }}", @@ -129,7 +135,7 @@ "{% endfor %}", "" ], - "styles": "{% if isStop and stopCount > 0 %}{% elseif isWay %}way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}", + "styles": "{% if isStop and stopCount > 0 %}{% elseif isWay %}casing,way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}", "listStopsMarkerSign": null, "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsExclude": "{{ not isStop or stopCount == 0 }}", @@ -138,44 +144,62 @@ "listRoutesExclude": "true", "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerCircle({ width: 0, fill: true, fillColor: hover ? '#000000' : '#3f3f3f', fillOpacity: '1', radius: 7 })|raw }}{% else %}{{ markerCircle({ width: 0, fill: true, fillColor: color, fillOpacity: '1', radius: 5 })|raw }}{% endif %}{% endif %}", "style:way": { - "width": "3", - "opacity": "{% if (dirForward and dirBackward) or (not dirForward and not dirBackward) %}1{% else %}0{% endif %}", "color": "{{ color|default('#ff0000') }}", + "width": "4", + "dashArray": "{% if not dirForward or not dirBackward %}15,8{% endif %}", + "dashOffset": "{% if dirBackward %}16{% else %}0{% endif %}", + "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", + "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", + "opacity": 1, "text": "{{ refs|join(' · ') }} ", "textRepeat": "1", "textOffset": "12", "textFontWeight": "bold", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", - "pattern-pixelSize": "4", - "pattern-repeat": "7", - "pattern-polygon": "", + "pattern-pixelSize": "9", + "pattern-repeat": "23", + "pattern-offset": "{% if dirBackward %}2{% else %}18.5{% endif %}", + "pattern-polygon": "true", "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", - "pattern-path-weight": "2", + "pattern-path-weight": "0", + "pattern-path-fillOpacity": "1", "pattern-path-color": "{{ color|default('#ff0000') }}" }, "style:hover": { "pane": "hover", - "width": "{% if hover == 'forward' or hover == 'backward' %}0{% else %}4{% endif %}", + "width": "4", + "dashArray": "{% if hover == 'forward' or hover == 'backward' %}15,8{% endif %}", + "dashOffset": "{% if hover == 'backward' %}16{% else %}0{% endif %}", + "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", + "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", "color": "black", "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "4", - "pattern-repeat": "7", - "pattern-polygon": "", - "pattern-path-weight": "2", - "pattern-path-color": "black", - "pattern-path-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}" + "pattern-pixelSize": "9", + "pattern-repeat": "23", + "pattern-offset": "{% if hover == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-polygon": "true", + "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", + "pattern-path-weight": "0", + "pattern-path-fillOpacity": "1", + "pattern-path-color": "black" }, "style:selected": { "pane": "selected", - "width": "{% if selected == 'forward' or selected == 'backward' %}0{% else %}3{% endif %}", + "width": "4", + "dashArray": "{% if selected == 'forward' or selected == 'backward' %}15,8{% endif %}", + "dashOffset": "{% if selected == 'backward' %}16{% else %}0{% endif %}", + "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", + "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", "color": "#3f3f3f", "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", - "pattern-pixelSize": "4", - "pattern-repeat": "7", - "pattern-polygon": "", - "pattern-path-weight": "2", - "pattern-path-color": "#3f3f3f", - "pattern-path-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}" + "pattern-pixelSize": "9", + "pattern-repeat": "23", + "pattern-offset": "{% if selected == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-polygon": "true", + "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", + "pattern-path-weight": "0", + "pattern-path-fillOpacity": "1", + "pattern-path-color": "#3f3f3f" } }, "info": [ From 0e11d00ed8f65d2749a85ec6ccf42befae569c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 12 Nov 2018 21:52:13 +0100 Subject: [PATCH 08/10] pt, cycle_routes: longer arrows --- cycle_routes.json | 26 +++++++++++++------------- pt.json | 24 ++++++++++++------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/cycle_routes.json b/cycle_routes.json index 5cef3e3f2..3e001bcc2 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -74,8 +74,8 @@ "style": { "color": "{{ const[network].color }}", "width": "4", - "dashArray": "{% if not dirForward or not dirBackward %}13,10{% endif %}", - "dashOffset": "{% if dirBackward %}16{% else %}0{% endif %}", + "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}", + "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}", "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", "opacity": 1, @@ -85,8 +85,8 @@ "textFontWeight": "bold", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "23", - "pattern-offset": "{% if dirBackward %}2{% else %}18.5{% endif %}", + "pattern-repeat": "35", + "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", "pattern-path-weight": "0", @@ -96,15 +96,15 @@ "style:hover": { "pane": "hover", "width": "4", - "dashArray": "{% if hover == 'forward' or hover == 'backward' %}15,8{% endif %}", - "dashOffset": "{% if hover == 'backward' %}16{% else %}0{% endif %}", + "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}", + "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}", "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", "color": "black", "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "23", - "pattern-offset": "{% if hover == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-repeat": "35", + "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", "pattern-path-weight": "0", @@ -114,15 +114,15 @@ "style:selected": { "pane": "selected", "width": "4", - "dashArray": "{% if selected == 'forward' or selected == 'backward' %}15,8{% endif %}", - "dashOffset": "{% if selected == 'backward' %}16{% else %}0{% endif %}", + "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}", + "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}", "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", - "color": "black", + "color": "#3f3f3f", "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "23", - "pattern-offset": "{% if selected == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-repeat": "35", + "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", "pattern-path-weight": "0", diff --git a/pt.json b/pt.json index cd3bbe0ca..b1cdc2b4f 100644 --- a/pt.json +++ b/pt.json @@ -146,8 +146,8 @@ "style:way": { "color": "{{ color|default('#ff0000') }}", "width": "4", - "dashArray": "{% if not dirForward or not dirBackward %}15,8{% endif %}", - "dashOffset": "{% if dirBackward %}16{% else %}0{% endif %}", + "dashArray": "{% if not dirForward or not dirBackward %}27,8{% endif %}", + "dashOffset": "{% if dirBackward %}28{% else %}0{% endif %}", "lineCap": "{% if not dirForward or not dirBackward %}butt{% else %}round{% endif %}", "noClip": "{% if not dirForward or not dirBackward %}true{% else %}false{% endif %}", "opacity": 1, @@ -157,8 +157,8 @@ "textFontWeight": "bold", "pattern": "{% if dirForward and dirBackward %}{% else %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "23", - "pattern-offset": "{% if dirBackward %}2{% else %}18.5{% endif %}", + "pattern-repeat": "35", + "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", "pattern-path-weight": "0", @@ -168,15 +168,15 @@ "style:hover": { "pane": "hover", "width": "4", - "dashArray": "{% if hover == 'forward' or hover == 'backward' %}15,8{% endif %}", - "dashOffset": "{% if hover == 'backward' %}16{% else %}0{% endif %}", + "dashArray": "{% if hover == 'forward' or hover == 'backward' %}27,8{% endif %}", + "dashOffset": "{% if hover == 'backward' %}28{% else %}0{% endif %}", "lineCap": "{% if hover == 'forward' or hover == 'backward' %}butt{% else %}round{% endif %}", "noClip": "{% if hover == 'forward' or hover == 'backward' %}true{% else %}false{% endif %}", "color": "black", "pattern": "{% if hover == 'forward' or hover == 'backward' %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "23", - "pattern-offset": "{% if hover == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-repeat": "35", + "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", "pattern-path-weight": "0", @@ -186,15 +186,15 @@ "style:selected": { "pane": "selected", "width": "4", - "dashArray": "{% if selected == 'forward' or selected == 'backward' %}15,8{% endif %}", - "dashOffset": "{% if selected == 'backward' %}16{% else %}0{% endif %}", + "dashArray": "{% if selected == 'forward' or selected == 'backward' %}27,8{% endif %}", + "dashOffset": "{% if selected == 'backward' %}28{% else %}0{% endif %}", "lineCap": "{% if selected == 'forward' or selected == 'backward' %}butt{% else %}round{% endif %}", "noClip": "{% if selected == 'forward' or selected == 'backward' %}true{% else %}false{% endif %}", "color": "#3f3f3f", "pattern": "{% if selected == 'forward' or selected == 'backward' %}arrowHead{% endif %}", "pattern-pixelSize": "9", - "pattern-repeat": "23", - "pattern-offset": "{% if selected == 'backward' %}2{% else %}18.5{% endif %}", + "pattern-repeat": "35", + "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", "pattern-path-weight": "0", From ee8d4b21cb0123f937e3bb8b9cb82abbba6a2af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 12 Nov 2018 22:03:19 +0100 Subject: [PATCH 09/10] pt: Show pointer on stops, when route hovered/selected --- pt.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pt.json b/pt.json index b1cdc2b4f..14d5b3c67 100644 --- a/pt.json +++ b/pt.json @@ -135,14 +135,21 @@ "{% endfor %}", "" ], - "styles": "{% if isStop and stopCount > 0 %}{% elseif isWay %}casing,way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}", + "styles": "{% if isStop and stopCount > 0 %}stop{% elseif isWay %}casing,way{% if hover %},hover{% endif %}{% if selected %},selected{% endif %}{% endif %}", "listStopsMarkerSign": null, "listStopsMarkerSymbol": "{{ markerCircle({ width: 5, color: color, fillOpacity: '1', radius: 3 })|raw }}", "listStopsExclude": "{{ not isStop or stopCount == 0 }}", "listStopsTitle": "{% if tags %}{{ tags.name|default(stopName)|default(trans('unknown')) }}{% else %}
  • {{ trans('loading') }}
  • {% endif %}", "listStopsDescription": "{{ refs|join(' · ') }}", "listRoutesExclude": "true", - "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerCircle({ width: 0, fill: true, fillColor: hover ? '#000000' : '#3f3f3f', fillOpacity: '1', radius: 7 })|raw }}{% else %}{{ markerCircle({ width: 0, fill: true, fillColor: color, fillOpacity: '1', radius: 5 })|raw }}{% endif %}{% endif %}", + "markerSymbol": "{% if isStop and stopCount > 0 %}{% if hover or selected %}{{ markerPointer({ })|raw }}{% endif %}{% endif %}", + "markerSign": " ", + "style:stop": { + "color": "{{ color|default('#ff0000') }}", + "width": "4", + "radius": "3", + "zIndex": "1" + }, "style:way": { "color": "{{ color|default('#ff0000') }}", "width": "4", From ddd764584b6ec8531cd25a1ed243ef5bcf2389c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 13 Nov 2018 21:36:40 +0100 Subject: [PATCH 10/10] pt, cycle_routes: use width for pattern paths --- cycle_routes.json | 6 +++--- pt.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cycle_routes.json b/cycle_routes.json index 3e001bcc2..828dfaf76 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -89,7 +89,7 @@ "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", - "pattern-path-weight": "0", + "pattern-path-width": "0", "pattern-path-fillOpacity": "1", "pattern-path-color": "{{ const[network].color }}" }, @@ -107,7 +107,7 @@ "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", - "pattern-path-weight": "0", + "pattern-path-width": "0", "pattern-path-fillOpacity": "1", "pattern-path-color": "black" }, @@ -125,7 +125,7 @@ "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", - "pattern-path-weight": "0", + "pattern-path-width": "0", "pattern-path-fillOpacity": "1", "pattern-path-color": "#3f3f3f" } diff --git a/pt.json b/pt.json index 14d5b3c67..6db6264b8 100644 --- a/pt.json +++ b/pt.json @@ -168,7 +168,7 @@ "pattern-offset": "{% if dirBackward %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if dirBackward %}180{% else %}0{% endif %}", - "pattern-path-weight": "0", + "pattern-path-width": "0", "pattern-path-fillOpacity": "1", "pattern-path-color": "{{ color|default('#ff0000') }}" }, @@ -186,7 +186,7 @@ "pattern-offset": "{% if hover == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if hover == 'backward' %}180{% else %}0{% endif %}", - "pattern-path-weight": "0", + "pattern-path-width": "0", "pattern-path-fillOpacity": "1", "pattern-path-color": "black" }, @@ -204,7 +204,7 @@ "pattern-offset": "{% if selected == 'backward' %}4{% else %}30.5{% endif %}", "pattern-polygon": "true", "pattern-angleCorrection": "{% if selected == 'backward' %}180{% else %}0{% endif %}", - "pattern-path-weight": "0", + "pattern-path-width": "0", "pattern-path-fillOpacity": "1", "pattern-path-color": "#3f3f3f" }