From 31e66a0388caa3123ee6019d27dc33a1971e050b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 29 Jul 2018 19:10:37 +0200 Subject: [PATCH] car_routes: inital code (mostly copied from cycle_routes) --- car_routes.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ index.json | 3 +++ 2 files changed, 50 insertions(+) create mode 100644 car_routes.json diff --git a/car_routes.json b/car_routes.json new file mode 100644 index 00000000..2cb3ba79 --- /dev/null +++ b/car_routes.json @@ -0,0 +1,47 @@ +{ + "type": "overpass", + "name": { + "en": "Car routes" + }, + "query": { + "10": "relation[type=route][route=road]" + }, + "members": true, + "feature": { + "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': '#ff0000' )].color })|raw }}", + "styles": "" + }, + "memberFeature": { + "pre": [ + "{% set refs = [] %}", + "{% if tags.ref %}", + " {% set refs = refs|merge([ tags.ref ]) %}", + "{% endif %}", + "", + "{% for master in masters %}", + " {% if master.tags.ref %}", + " {% set refs = refs|merge([ master.tags.ref ]) %}", + " {% endif %}", + "{% endfor %}" + ], + "body": [ + "

Routes

", + "" + ], + "listExclude": "1", + "style": { + "color": "#ff0000", + "width": 4, + "opacity": 1, + "text": "{{ refs|join(' ') }} ", + "textRepeat": "1", + "textOffset": "12", + "textFontWeight": "bold" + } + } +} diff --git a/index.json b/index.json index 7e3ca9ab..dfcb4ee0 100644 --- a/index.json +++ b/index.json @@ -217,6 +217,9 @@ }, { "id": "car_maxspeed" + }, + { + "id": "car_routes" } ] }