2 Commits
57feed3e39
...
cf33b348e4
Author | SHA1 | Message | Date |
---|---|---|---|
Stephan Bösch-Plepelits | cf33b348e4 |
car_maxspeed: include traffic_sign=maxspeed
|
2 months ago |
Stephan Bösch-Plepelits | 72bfccdb36 |
car_*: convert to YAML
|
2 months ago |
4 changed files with 338 additions and 299 deletions
-
217car_maxspeed.json
-
261car_maxspeed.yaml
-
82car_routes.json
-
77car_routes.yaml
@ -1,217 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Velocitat màxima", |
|||
"cs": "Maximální rychlost", |
|||
"de": "Höchstgeschwindigkeiten", |
|||
"en": "Maxspeed", |
|||
"es": "Velocidad máxima", |
|||
"fr": "Limites de vitesse", |
|||
"gl": "Velocidade máxima", |
|||
"hu": "Sebességkorlátozás", |
|||
"it": "Velocità massima", |
|||
"ja": "最高速度", |
|||
"nb": "Fartsgrense", |
|||
"nl": "Snelheidslimiet", |
|||
"oc": "Limits de velocitat", |
|||
"pl": "Prędkość maksymalna", |
|||
"pt": "Velocidade máxima", |
|||
"pt-br": "Veloc. máxima", |
|||
"ro": "Viteza maximă", |
|||
"ru": "Максимальная скорость", |
|||
"sr": "Максимална брзина", |
|||
"tr": "En yüksek hız" |
|||
}, |
|||
"query": { |
|||
"11": "way[highway~\"^(motorway|trunk)$\"];", |
|||
"13": "way[highway~\"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|tertiary)$\"];", |
|||
"15": "way[highway~\"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|residential|unclassified)$\"];", |
|||
"17": "way[highway~\"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|residential|unclassified|service|living_street|pedestrian|track|road)$\"];" |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set maxspeedKmh = null %}", |
|||
"{% set maxspeed = null %}", |
|||
"{% set unit = null %}", |
|||
"", |
|||
"{% if tags.maxspeed is defined %}", |
|||
" {% if const.colorOther[tags.maxspeed] %}", |
|||
" {% set maxspeed = tags.maxspeed %}", |
|||
" {% elseif tags.maxspeed|matches(\"^[0-9]+$\") %}", |
|||
" {% set maxspeedKmh = tags.maxspeed %}", |
|||
" {% set maxspeed = tags.maxspeed %}", |
|||
" {% set unit = \"km/h\" %}", |
|||
" {% elseif tags.maxspeed|matches( \"(^[0-9]+) mph$\") %}", |
|||
" {% set m = tags.maxspeed|matches(\"(^[0-9]+) mph$\") %}", |
|||
" {% set maxspeedKmh = m[1] * 1.60934 %}", |
|||
" {% set maxspeed = m[1] %}", |
|||
" {% set unit = \"mph\" %}", |
|||
" {% else %}", |
|||
" {% set maxspeed = 'other' %}", |
|||
" {% endif %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if attribute(tags, 'maxspeed:forward') is defined %}", |
|||
" {% set x = attribute(tags, 'maxspeed:forward') %}", |
|||
" {% if const.colorOther[x] %}", |
|||
" {% set maxspeedF = attribute(tags, 'maxspeed:forward') %}", |
|||
" {% elseif attribute(tags, 'maxspeed:forward')|matches(\"^[0-9]+$\") %}", |
|||
" {% set maxspeedFKmh = attribute(tags, 'maxspeed:forward') %}", |
|||
" {% set maxspeedF = attribute(tags, 'maxspeed:forward') %}", |
|||
" {% set unit = \"km/h\" %}", |
|||
" {% elseif attribute(tags, 'maxspeed:forward')|matches(\"^[0-9]+ mph$\") %}", |
|||
" {% set m = attribute(tags, 'maxspeed:forward')|matches(\"(^[0-9]+) mph$\") %}", |
|||
" {% set maxspeedFKmh = m[1] * 1.60934 %}", |
|||
" {% set maxspeedF = m[1] %}", |
|||
" {% set unit = \"mph\" %}", |
|||
" {% else %}", |
|||
" {% set maxspeedF = 'other' %}", |
|||
" {% endif %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if attribute(tags, 'maxspeed:backward') is defined %}", |
|||
" {% set x = attribute(tags, 'maxspeed:backward') %}", |
|||
" {% if const.colorOther[x] %}", |
|||
" {% set maxspeedB = attribute(tags, 'maxspeed:backward') %}", |
|||
" {% elseif attribute(tags, 'maxspeed:backward')|matches(\"^[0-9]+$\") %}", |
|||
" {% set maxspeedBKmh = attribute(tags, 'maxspeed:backward') %}", |
|||
" {% set maxspeedB = attribute(tags, 'maxspeed:backward') %}", |
|||
" {% set unit = \"km/h\" %}", |
|||
" {% elseif attribute(tags, 'maxspeed:backward')|matches(\"^[0-9]+ mph$\") %}", |
|||
" {% set m = attribute(tags, 'maxspeed:backward')|matches(\"(^[0-9]+) mph$\") %}", |
|||
" {% set maxspeedBKmh = m[1] * 1.60934 %}", |
|||
" {% set maxspeedB = m[1] %}", |
|||
" {% set unit = \"mph\" %}", |
|||
" {% else %}", |
|||
" {% set maxspeedB = 'other' %}", |
|||
" {% endif %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if const.colorOther[maxspeed] %}", |
|||
"{% set color = const.colorOther[maxspeed] %}", |
|||
"{% elseif not maxspeedKmh %}", |
|||
"{% set color = \"#404040\" %}", |
|||
"{% else %}", |
|||
"{% set color = colorInterpolate(const.colorMap, (maxspeedKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if const.colorOther[maxspeedF] %}", |
|||
"{% set colorF = const.colorOther[maxspeedF] %}", |
|||
"{% elseif maxspeedFKmh %}", |
|||
"{% set colorF = colorInterpolate(const.colorMap, (maxspeedFKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if const.colorOther[maxspeedB] %}", |
|||
"{% set colorB = const.colorOther[maxspeedB] %}", |
|||
"{% elseif maxspeedBKmh %}", |
|||
"{% set colorB = colorInterpolate(const.colorMap, (maxspeedBKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", |
|||
"{% endif %}" |
|||
], |
|||
"description": "{{ tagTransList('highway', tags.highway) }}", |
|||
"details": [ |
|||
"{% if maxspeedF or maxspeedB %}", |
|||
"<span style='color: {{ colorB }}'>{{ maxspeedB == 'other' ? attribute(tags, 'maxspeed:backward') : const.colorOther[maxspeedB] ? tagTrans('maxspeed', maxspeedB) : maxspeedB|default(trans('unknown')) }}</span> / <span style='color: {{ colorF }}'>{{ maxspeedF == 'other' ? attribute(tags, 'maxspeed:forward') : const.colorOther[maxspeedF] ? tagTrans('maxspeed', maxspeedF) : maxspeedF|default(trans('unknown')) }}</span> {{ unit }}", |
|||
"{% elseif maxspeed %}", |
|||
"<span style='color: {{ color }}'>{{ maxspeed == 'other' ? tags.maxspeed : const.colorOther[maxspeed] ? tagTrans('maxspeed', maxspeed) : maxspeed }} {{ unit }}</span>", |
|||
"{% elseif tags.maxspeed %}", |
|||
"{{ tags.maxspeed }}", |
|||
"{% else %}", |
|||
"{{ trans('unknown') }}", |
|||
"{% endif %}" |
|||
], |
|||
"markerSymbol": "", |
|||
"listMarkerSymbol": "line", |
|||
"styles": "{% if maxspeedB or maxspeedF %}left,right,default{% else %}default{% endif %}", |
|||
"style": { |
|||
"width": "{% if maxspeedB or maxspeedF %}0{% else %}4{% endif %}", |
|||
"color": "{{ color }}", |
|||
"text": [ |
|||
"{% if maxspeedB or maxspeedF %}", |
|||
" {% if maxspeedB %}🡸 {{ maxspeedB == 'other' ? attribute(tags, 'maxspeed:backward') : maxspeedB }} {% endif %}|{% if maxspeedF %} {{ maxspeedF == 'other' ? attribute(tags, 'maxspeed:forward') : maxspeedF }} 🡺{% endif %} ", |
|||
"{% else %}", |
|||
" {{ maxspeed == 'other' ? tags.maxspeed : maxspeed }} ", |
|||
"{% endif %}" |
|||
], |
|||
"textRepeat": "1", |
|||
"textOffset": "4", |
|||
"textFontWeight": "bold" |
|||
}, |
|||
"style:left": { |
|||
"width": "2", |
|||
"color": "{{ colorB|default('#404040') }}", |
|||
"offset": "-1" |
|||
}, |
|||
"style:right": { |
|||
"width": "2", |
|||
"color": "{{ colorF|default('#404040') }}", |
|||
"offset": "1" |
|||
} |
|||
}, |
|||
"const": { |
|||
"colorMap": [ |
|||
"#00af00", |
|||
"#ff7f00", |
|||
"#ff0000", |
|||
"#af00af" |
|||
], |
|||
"colorOther": { |
|||
"none": "#ff00ff", |
|||
"walk": "#00afff", |
|||
"other": "#0000ff" |
|||
}, |
|||
"highestColorSpeed": 150, |
|||
"offsetColorSpeed": 10 |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|||
" <td colspan>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": \"walk\" }))|raw }}</td>", |
|||
" <td colspan>{{ tagTrans('maxspeed', 'walk') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": \"none\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('maxspeed', 'none') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": \"other\" }))|raw }}</td>", |
|||
" <td>{{ trans('other') }}</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"<div style='display: inline-block; width: 49%;'>", |
|||
"<table>", |
|||
"{% for i in range(10, 140, 20) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": i }))|raw }}</td>", |
|||
" <td>{{ i }}km/h</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": 150 }))|raw }}</td>", |
|||
" <td>≥150km/h</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"</div>", |
|||
"<div style='display: inline-block; width: 49%;'>", |
|||
"<table>", |
|||
"{% for i in range(10, 60, 10) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": (i * 1.60934)|round }))|raw }}</td>", |
|||
" <td>{{ i }}mph</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": (75 * 1.60934)|round }))|raw }}</td>", |
|||
" <td>75mph</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": (95 * 1.60934)|round }))|raw }}</td>", |
|||
" <td>≥95mph</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"</div>" |
|||
] |
|||
} |
@ -0,0 +1,261 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Velocitat màxima |
|||
cs: Maximální rychlost |
|||
de: Höchstgeschwindigkeiten |
|||
en: Maxspeed |
|||
es: Velocidad máxima |
|||
fr: Limites de vitesse |
|||
gl: Velocidade máxima |
|||
hu: Sebességkorlátozás |
|||
it: Velocità massima |
|||
ja: 最高速度 |
|||
nb: Fartsgrense |
|||
nl: Snelheidslimiet |
|||
oc: Limits de velocitat |
|||
pl: Prędkość maksymalna |
|||
pt: Velocidade máxima |
|||
pt-br: Veloc. máxima |
|||
ro: Viteza maximă |
|||
ru: Максимальная скорость |
|||
sr: Максимална брзина |
|||
tr: En yüksek hız |
|||
query: |
|||
11: way[highway~"^(motorway|trunk)$"]; |
|||
13: way[highway~"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|tertiary)$"]; |
|||
15: way[highway~"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|residential|unclassified)$"]; |
|||
16: |- |
|||
( |
|||
way[highway~"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|residential|unclassified)$"]; |
|||
node[traffic_sign~"^(|.*;)maxspeed(;.*|)$"]; |
|||
) |
|||
17: |- |
|||
( |
|||
way[highway~"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|residential|unclassified|service|living_street|pedestrian|track|road)$"]; |
|||
node[traffic_sign~"^(|.*;)maxspeed(;.*|)$"]; |
|||
) |
|||
feature: |
|||
pre: |- |
|||
{% set maxspeedKmh = null %} |
|||
{% set maxspeed = null %} |
|||
{% set unit = null %} |
|||
|
|||
{% if tags.maxspeed is defined %} |
|||
{% if const.colorOther[tags.maxspeed] %} |
|||
{% set maxspeed = tags.maxspeed %} |
|||
{% elseif tags.maxspeed|matches("^[0-9]+$") %} |
|||
{% set maxspeedKmh = tags.maxspeed %} |
|||
{% set maxspeed = tags.maxspeed %} |
|||
{% set unit = "km/h" %} |
|||
{% elseif tags.maxspeed|matches( "(^[0-9]+) mph$") %} |
|||
{% set m = tags.maxspeed|matches("(^[0-9]+) mph$") %} |
|||
{% set maxspeedKmh = m[1] * 1.60934 %} |
|||
{% set maxspeed = m[1] %} |
|||
{% set unit = "mph" %} |
|||
{% else %} |
|||
{% set maxspeed = 'other' %} |
|||
{% endif %} |
|||
{% endif %} |
|||
|
|||
{% if attribute(tags, 'maxspeed:forward') is defined %} |
|||
{% set x = attribute(tags, 'maxspeed:forward') %} |
|||
{% if const.colorOther[x] %} |
|||
{% set maxspeedF = attribute(tags, 'maxspeed:forward') %} |
|||
{% elseif attribute(tags, 'maxspeed:forward')|matches("^[0-9]+$") %} |
|||
{% set maxspeedFKmh = attribute(tags, 'maxspeed:forward') %} |
|||
{% set maxspeedF = attribute(tags, 'maxspeed:forward') %} |
|||
{% set unit = "km/h" %} |
|||
{% elseif attribute(tags, 'maxspeed:forward')|matches("^[0-9]+ mph$") %} |
|||
{% set m = attribute(tags, 'maxspeed:forward')|matches("(^[0-9]+) mph$") %} |
|||
{% set maxspeedFKmh = m[1] * 1.60934 %} |
|||
{% set maxspeedF = m[1] %} |
|||
{% set unit = "mph" %} |
|||
{% else %} |
|||
{% set maxspeedF = 'other' %} |
|||
{% endif %} |
|||
{% endif %} |
|||
|
|||
{% if attribute(tags, 'maxspeed:backward') is defined %} |
|||
{% set x = attribute(tags, 'maxspeed:backward') %} |
|||
{% if const.colorOther[x] %} |
|||
{% set maxspeedB = attribute(tags, 'maxspeed:backward') %} |
|||
{% elseif attribute(tags, 'maxspeed:backward')|matches("^[0-9]+$") %} |
|||
{% set maxspeedBKmh = attribute(tags, 'maxspeed:backward') %} |
|||
{% set maxspeedB = attribute(tags, 'maxspeed:backward') %} |
|||
{% set unit = "km/h" %} |
|||
{% elseif attribute(tags, 'maxspeed:backward')|matches("^[0-9]+ mph$") %} |
|||
{% set m = attribute(tags, 'maxspeed:backward')|matches("(^[0-9]+) mph$") %} |
|||
{% set maxspeedBKmh = m[1] * 1.60934 %} |
|||
{% set maxspeedB = m[1] %} |
|||
{% set unit = "mph" %} |
|||
{% else %} |
|||
{% set maxspeedB = 'other' %} |
|||
{% endif %} |
|||
{% endif %} |
|||
|
|||
{% if const.colorOther[maxspeed] %} |
|||
{% set color = const.colorOther[maxspeed] %} |
|||
{% elseif not maxspeedKmh %} |
|||
{% set color = "#404040" %} |
|||
{% else %} |
|||
{% set color = colorInterpolate(const.colorMap, (maxspeedKmh - const.offsetColorSpeed) / const.highestColorSpeed) %} |
|||
{% endif %} |
|||
|
|||
{% if const.colorOther[maxspeedF] %} |
|||
{% set colorF = const.colorOther[maxspeedF] %} |
|||
{% elseif maxspeedFKmh %} |
|||
{% set colorF = colorInterpolate(const.colorMap, (maxspeedFKmh - const.offsetColorSpeed) / const.highestColorSpeed) %} |
|||
{% endif %} |
|||
|
|||
{% if const.colorOther[maxspeedB] %} |
|||
{% set colorB = const.colorOther[maxspeedB] %} |
|||
{% elseif maxspeedBKmh %} |
|||
{% set colorB = colorInterpolate(const.colorMap, (maxspeedBKmh - const.offsetColorSpeed) / const.highestColorSpeed) %} |
|||
{% endif %} |
|||
description: |- |
|||
{% if tags.highway %} |
|||
{{ tagTransList('highway', tags.highway) }} |
|||
{% else %} |
|||
{{ keyTrans('traffic_sign') }}: {{ tagTransList('traffic_sign', tags.traffic_sign) }} |
|||
{% endif %} |
|||
details: |- |
|||
{% if maxspeedF or maxspeedB %} |
|||
<span style='color: {{ colorB }}'>{{ maxspeedB == 'other' ? attribute(tags, 'maxspeed:backward') : const.colorOther[maxspeedB] ? tagTrans('maxspeed', maxspeedB) : maxspeedB|default(trans('unknown')) }}</span> / <span style='color: {{ colorF }}'>{{ maxspeedF == 'other' ? attribute(tags, 'maxspeed:forward') : const.colorOther[maxspeedF] ? tagTrans('maxspeed', maxspeedF) : maxspeedF|default(trans('unknown')) }}</span> {{ unit }} |
|||
{% elseif maxspeed %} |
|||
<span style='color: {{ color }}'>{{ maxspeed == 'other' ? tags.maxspeed : const.colorOther[maxspeed] ? tagTrans('maxspeed', maxspeed) : maxspeed }} {{ unit }}</span> |
|||
{% elseif tags.maxspeed %} |
|||
{{ tags.maxspeed }} |
|||
{% else %} |
|||
{{ trans('unknown') }} |
|||
{% endif %} |
|||
markerSymbol: |- |
|||
{% if not tags.highway %} |
|||
{{ markerCircle({ color: 'red', width: 2, fill: true, fillColor: '#ffffff', fillOpacity: 1, radius: 9 }) }} |
|||
{% endif %} |
|||
listMarkerSymbol: |- |
|||
{% if tags.highway %} |
|||
line |
|||
{% else %} |
|||
{{ markerCircle({ color: 'red', width: 2, fill: true, fillColor: '#ffffff', fillOpacity: 1, radius: 9 }) }} |
|||
{% endif %} |
|||
markerSign: | |
|||
{% if not tags.highway %} |
|||
<span style='font-size: 8pt; |
|||
|
|||
{% if tags.direction %} |
|||
transform: rotate({{ tags.direction|parseDirection|default(0) + 180 }}deg); |
|||
{% endif %} |
|||
|
|||
'>{{ tags.maxspeed|default('?') }}</span> |
|||
{% endif %} |
|||
listMarkerSign: | |
|||
{% if not tags.highway %} |
|||
<span style='font-size: 8pt;'>{{ tags.maxspeed|default('?') }}</span> |
|||
{% endif %} |
|||
styles: |- |
|||
{% if not tags.highway %} |
|||
traffic_sign |
|||
{% elseif maxspeedB or maxspeedF %} |
|||
left,right,default |
|||
{% else %} |
|||
default |
|||
{% endif %} |
|||
style: |
|||
width: '{% if maxspeedB or maxspeedF %}0{% else %}4{% endif %}' |
|||
color: '{{ color }}' |
|||
text: |- |
|||
{% if maxspeedB or maxspeedF %} |
|||
{% if maxspeedB %}🡸 {{ maxspeedB == 'other' ? attribute(tags, 'maxspeed:backward') : maxspeedB }} {% endif %}|{% if maxspeedF %} {{ maxspeedF == 'other' ? attribute(tags, 'maxspeed:forward') : maxspeedF }} 🡺{% endif %} |
|||
{% else %} |
|||
{{ maxspeed == 'other' ? tags.maxspeed : maxspeed }} |
|||
{% endif %} |
|||
textRepeat: '1' |
|||
textOffset: '4' |
|||
textFontWeight: bold |
|||
style:left: |
|||
width: '2' |
|||
color: |- |
|||
{{ colorB|default('#404040') }} |
|||
offset: '-1' |
|||
style:right: |
|||
width: '2' |
|||
color: | |
|||
{{ colorF|default('#404040') }} |
|||
offset: '1' |
|||
style:traffic_sign: |
|||
width: 0 |
|||
radius: 0 |
|||
|
|||
const: |
|||
colorMap: |
|||
- '#00af00' |
|||
- '#ff7f00' |
|||
- '#ff0000' |
|||
- '#af00af' |
|||
colorOther: |
|||
none: '#ff00ff' |
|||
walk: '#00afff' |
|||
other: '#0000ff' |
|||
highestColorSpeed: 150 |
|||
offsetColorSpeed: 10 |
|||
info: |- |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({}))|raw }}</td> |
|||
<td colspan>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": "walk" }))|raw }}</td> |
|||
<td colspan>{{ tagTrans('maxspeed', 'walk') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": "none" }))|raw }}</td> |
|||
<td>{{ tagTrans('maxspeed', 'none') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": "other" }))|raw }}</td> |
|||
<td>{{ trans('other') }}</td> |
|||
</tr> |
|||
</table> |
|||
<div style='display: inline-block; width: 49%;'> |
|||
<table> |
|||
{% for i in range(10, 140, 20) %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": i }))|raw }}</td> |
|||
<td>{{ i }}km/h</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": 150 }))|raw }}</td> |
|||
<td>≥150km/h</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div style='display: inline-block; width: 49%;'> |
|||
<table> |
|||
{% for i in range(10, 60, 10) %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": (i * 1.60934)|round }))|raw }}</td> |
|||
<td>{{ i }}mph</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": (75 * 1.60934)|round }))|raw }}</td> |
|||
<td>75mph</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": (95 * 1.60934)|round }))|raw }}</td> |
|||
<td>≥95mph</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
filter: |
|||
type: |
|||
name: | |
|||
{{ trans('filter:type') }} |
|||
type: select |
|||
show_default: true |
|||
values: |- |
|||
<option value='road' query='way[highway]'>{{ keyTrans('highway') }}</option> |
|||
<option value='traffic_sign' query='node[traffic_sign]'>{{ keyTrans('traffic_sign') }}</option> |
@ -1,82 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Rutes en cotxe", |
|||
"cs": "Automobilové cesty", |
|||
"de": "Autorouten", |
|||
"en": "Car routes", |
|||
"es": "Rutas de coche", |
|||
"fr": "Itinéraires auto", |
|||
"gl": "Rotas automobilísticas", |
|||
"hu": "Főútvonalak", |
|||
"it": "Tratte automobilistiche", |
|||
"ja": "車のルート", |
|||
"nb": "Bilruter", |
|||
"nl": "Autoroutes", |
|||
"oc": "Itineraris auto", |
|||
"pl": "Trasy samochodowe", |
|||
"pt": "Rotas rodoviárias", |
|||
"pt-br": "Rotas rodoviárias", |
|||
"ro": "Rute auto", |
|||
"ru": "Автомобильные маршруты", |
|||
"sr": "Трасе за возила", |
|||
"tr": "Araba Rotaları" |
|||
}, |
|||
"query": { |
|||
"10": "relation[type=route][route=road]" |
|||
}, |
|||
"members": true, |
|||
"feature": { |
|||
"pre": "{% set color = '#' ~ tags.network|default('')|md5|slice(0, 6) %}", |
|||
"description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", |
|||
"title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", |
|||
"listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}", |
|||
"markerSymbol": "", |
|||
"styles": "" |
|||
}, |
|||
"memberFeature": { |
|||
"pre": [ |
|||
"{% set refs = [] %}", |
|||
"{% set color = '#d41d8c' %}", |
|||
"{% if tags.ref %}", |
|||
" {% for ref in tags.ref|split(';') %}", |
|||
" {% set refs = refs|merge([ ref|trim ]) %}", |
|||
" {% endfor %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% for master in masters %}", |
|||
" {% if master.tags.network %}", |
|||
" {% set color = '#' ~ master.tags.network|md5|slice(0, 6) %}", |
|||
" {% endif %}", |
|||
" {% if master.tags.ref %}", |
|||
" {% set refs = refs|merge([ master.tags.ref ]) %}", |
|||
" {% endif %}", |
|||
"{% endfor %}", |
|||
"", |
|||
"{% set refs = refs|unique|natsort({ insensitive: true }) %}" |
|||
], |
|||
"body": [ |
|||
"<h4>Routes</h4>", |
|||
"<ul>", |
|||
"{% for master in masters %}", |
|||
" {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}", |
|||
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>", |
|||
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>", |
|||
" <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>", |
|||
" <span class='description'>{{ tagTrans('network', master.tags.network) }}</span>", |
|||
" </li>", |
|||
"{% endfor %}", |
|||
"</ul>" |
|||
], |
|||
"listExclude": "1", |
|||
"style": { |
|||
"color": "{{ color }}", |
|||
"width": 4, |
|||
"opacity": 1, |
|||
"text": "{{ refs|join(' · ') }} ", |
|||
"textRepeat": "1", |
|||
"textOffset": "12", |
|||
"textFontWeight": "bold" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Rutes en cotxe |
|||
cs: Automobilové cesty |
|||
de: Autorouten |
|||
en: Car routes |
|||
es: Rutas de coche |
|||
fr: Itinéraires auto |
|||
gl: Rotas automobilísticas |
|||
hu: Főútvonalak |
|||
it: Tratte automobilistiche |
|||
ja: 車のルート |
|||
nb: Bilruter |
|||
nl: Autoroutes |
|||
oc: Itineraris auto |
|||
pl: Trasy samochodowe |
|||
pt: Rotas rodoviárias |
|||
pt-br: Rotas rodoviárias |
|||
ro: Rute auto |
|||
ru: Автомобильные маршруты |
|||
sr: Трасе за возила |
|||
tr: Araba Rotaları |
|||
query: |
|||
10: relation[type=route][route=road] |
|||
members: true |
|||
feature: |
|||
pre: |- |
|||
{% set color = '#' ~ tags.network|default('')|md5|slice(0, 6) %} |
|||
description: |- |
|||
{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %} |
|||
title: |- |
|||
{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %} |
|||
listMarkerSymbol: |- |
|||
{{ markerLine({ 'width': 4, 'color': color })|raw }} |
|||
markerSymbol: '' |
|||
styles: '' |
|||
memberFeature: |
|||
pre: |- |
|||
{% set refs = [] %} |
|||
{% set color = '#d41d8c' %} |
|||
{% if tags.ref %} |
|||
{% for ref in tags.ref|split(';') %} |
|||
{% set refs = refs|merge([ ref|trim ]) %} |
|||
{% endfor %} |
|||
{% endif %} |
|||
|
|||
{% for master in masters %} |
|||
{% if master.tags.network %} |
|||
{% set color = '#' ~ master.tags.network|md5|slice(0, 6) %} |
|||
{% endif %} |
|||
{% if master.tags.ref %} |
|||
{% set refs = refs|merge([ master.tags.ref ]) %} |
|||
{% endif %} |
|||
{% endfor %} |
|||
|
|||
{% set refs = refs|unique|natsort({ insensitive: true }) %} |
|||
body: |- |
|||
<h4>Routes</h4> |
|||
<ul> |
|||
{% for master in masters %} |
|||
{% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %} |
|||
<li data-object="{{ master.id }}" style='list-style: none;'> |
|||
<span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span> |
|||
<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> |
|||
<span class='description'>{{ tagTrans('network', master.tags.network) }}</span> |
|||
</li> |
|||
{% endfor %} |
|||
</ul> |
|||
listExclude: 1 |
|||
style: |
|||
color: '{{ color }}' |
|||
width: 4 |
|||
opacity: 1 |
|||
text: '{{ refs|join(" · ") }} ' |
|||
textRepeat: 1 |
|||
textOffset: 12 |
|||
textFontWeight: bold |
Write
Preview
Loading…
Cancel
Save
Reference in new issue