diff --git a/cycle_routes.json b/cycle_routes.json index 69ccde1e..ecf5afe1 100644 --- a/cycle_routes.json +++ b/cycle_routes.json @@ -9,18 +9,24 @@ "pt-br": "Ciclorrotas" }, "query": { - "6": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"][network~'^(icn)$']", - "9": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"][network~'^(icn|ncn)$']", - "12": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"][network~'^(icn|ncn|rcn)$']", - "15": "relation[type=route][route~\"(|.*;)bicycle(|;.*)\"]" + "6": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn)(|;.*)$']", + "9": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn|ncn)(|;.*)$']", + "12": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"][network~'^(|.*;)(icn|ncn|rcn)(|;.*)$']", + "15": "relation[type=route][route~\"^(|.*;)bicycle(|;.*)$\"]" }, "members": true, "feature": { + "pre": [ + "{% set network = tags.network %}", + "{% for n in tags.network|split(';') %}", + "{% if n|matches('cn$') %}{% set network = n %}{% endif %}", + "{% endfor %}" + ], "title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", - "description": "{{ tagTrans('network', tags.network) }}", + "description": "{{ tagTrans('network', network) }}", "markerSymbol": "", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}", - "priority": "{{ const[tags.network].priority|default(4) }}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network].color|default(const[''].color) })|raw }}", + "priority": "{{ const[network].priority|default(4) }}", "styles": "", "style:hover": { "width": "0" diff --git a/hiking_routes.json b/hiking_routes.json index 2e1e25e9..f0ce546d 100644 --- a/hiking_routes.json +++ b/hiking_routes.json @@ -9,16 +9,22 @@ "pt-br": "Rotas de caminhada" }, "query": { - "10": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn)$\"]", - "11": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn|nwn)$\"]", - "12": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"][network~\"^(iwn|nwn|rwn)$\"]", - "14": "relation[type=route][route~\"(|.*;)hiking(|;.*)\"]" + "10": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn)(|;.*)$\"]", + "11": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn)(|;.*)$\"]", + "12": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"][network~\"^(|.*;)(iwn|nwn|rwn)(|;.*)$\"]", + "14": "relation[type=route][route~\"^(|.*;)hiking(|;.*)$\"]" }, "members": true, "feature": { - "priority": "{{ const[tags.network].priority|default(4) }}", - "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", - "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].color|default(const[''].color) })|raw }}", + "pre": [ + "{% set network = tags.network %}", + "{% for n in tags.network|split(';') %}", + "{% if n|matches('wn$') %}{% set network = n %}{% endif %}", + "{% endfor %}" + ], + "priority": "{{ const[network].priority|default(4) }}", + "description": "{% if network %}{{ tagTrans('network', network) }}{% endif %}", + "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[network|default('')].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 }}{% endif %}", "styles": "", "markerSymbol": ""