{ "type": "overpass", "name": { "de": "Höchstgeschwindigkeiten", "en": "Maxspeed", "fr": "Limites de vitesse", "hu": "Sebességkorlátozás", "pt": "Velocidade máxima", "pt-br": "Velocidade máxima" }, "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": [ "{% if maxspeedF or maxspeedB %}", "{{ maxspeedB == 'other' ? attribute(tags, 'maxspeed:backward') : const.colorOther[maxspeedB] ? tagTrans('maxspeed', maxspeedB) : maxspeedB|default(trans('unknown')) }} / {{ maxspeedF == 'other' ? attribute(tags, 'maxspeed:forward') : const.colorOther[maxspeedF] ? tagTrans('maxspeed', maxspeedF) : maxspeedF|default(trans('unknown')) }} {{ unit }}", "{% elseif maxspeed %}", "{{ maxspeed == 'other' ? tags.maxspeed : const.colorOther[maxspeed] ? tagTrans('maxspeed', maxspeed) : maxspeed }} {{ unit }}", "{% 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": [ "", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "
{{ markerLine(evaluate({}))|raw }}{{ trans('unknown') }}
{{ markerLine(evaluate({ \"maxspeed\": \"walk\" }))|raw }}{{ tagTrans('maxspeed', 'walk') }}
{{ markerLine(evaluate({ \"maxspeed\": \"none\" }))|raw }}{{ tagTrans('maxspeed', 'none') }}
{{ markerLine(evaluate({ \"maxspeed\": \"other\" }))|raw }}{{ trans('other') }}
", "
", "", "{% for i in range(10, 140, 20) %}", " ", " ", " ", " ", "{% endfor %}", " ", " ", " ", " ", "
{{ markerLine(evaluate({ \"maxspeed\": i }))|raw }}{{ i }}km/h
{{ markerLine(evaluate({ \"maxspeed\": 150 }))|raw }}≥150km/h
", "
", "
", "", "{% for i in range(10, 60, 10) %}", " ", " ", " ", " ", "{% endfor %}", " ", " ", " ", " ", " ", " ", " ", " ", "
{{ markerLine(evaluate({ \"maxspeed\": (i * 1.60934)|round }))|raw }}{{ i }}mph
{{ markerLine(evaluate({ \"maxspeed\": (75 * 1.60934)|round }))|raw }}75mph
{{ markerLine(evaluate({ \"maxspeed\": (95 * 1.60934)|round }))|raw }}≥95mph
", "
" ] }