Browse Source

cycle_routes, hiking_routes: fix priority

fitness_trail
parent
commit
805e910681
  1. 9
      cycle_routes.json
  2. 9
      hiking_routes.json

9
cycle_routes.json

@ -15,7 +15,7 @@
}, },
"members": true, "members": true,
"feature": { "feature": {
"priority": "{{ {icn:0,ncn:1,rcn:2,lcn:3}[tags.network] }}",
"priority": "{{ const[tags.network].priority|default(4) }}",
"description": "{{ tagTrans('network', tags.network) }}", "description": "{{ tagTrans('network', tags.network) }}",
"listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network].color|default(const[''].color) })|raw }}", "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 %}", "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 %}",
@ -29,7 +29,7 @@
"{% set refs = [] %}", "{% set refs = [] %}",
"", "",
"{% for master in masters %}", "{% for master in masters %}",
" {% set _p = {icn:0,ncn:1,rcn:2,lcn:3}[master.tags.network]|default(4) %}",
" {% set _p = const[master.tags.network].priority|default(4) %}",
" {% if _p < priority %}", " {% if _p < priority %}",
" {% set priority = _p %}", " {% set priority = _p %}",
" {% set network = master.tags.network %}", " {% set network = master.tags.network %}",
@ -66,22 +66,27 @@
"const": { "const": {
"icn": { "icn": {
"color": "#ff0000", "color": "#ff0000",
"priority": 0,
"zoom": 6 "zoom": 6
}, },
"ncn": { "ncn": {
"color": "#ff00ba", "color": "#ff00ba",
"priority": 1,
"zoom": 9 "zoom": 9
}, },
"rcn": { "rcn": {
"color": "#ba00ff", "color": "#ba00ff",
"priority": 2,
"zoom": 12 "zoom": 12
}, },
"lcn": { "lcn": {
"color": "#0000ff", "color": "#0000ff",
"priority": 3,
"zoom": 15 "zoom": 15
}, },
"": { "": {
"color": "#007fff", "color": "#007fff",
"priority": 4,
"zoom": 15 "zoom": 15
} }
}, },

9
hiking_routes.json

@ -15,7 +15,7 @@
}, },
"members": true, "members": true,
"feature": { "feature": {
"priority": "{{ {iwn:0,nwn:1,rwn:2,lwn:3}[tags.network]|default(4) }}",
"priority": "{{ const[tags.network].priority|default(4) }}",
"description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}", "description": "{% if tags.network %}{{ tagTrans('network', tags.network) }}{% endif %}",
"listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.network|default('')].color|default(const[''].color) })|raw }}", "listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': const[tags.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 }}{% else %}{{ trans('unnamed') }}{% endif %}", "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 %}",
@ -29,7 +29,7 @@
"{% set refs = [] %}", "{% set refs = [] %}",
"", "",
"{% for master in masters %}", "{% for master in masters %}",
" {% set _p = {iwn:0,nwn:1,rwn:2,lwn:3}[master.tags.network]|default(4) %}",
" {% set _p = const[master.tags.network].priority|default(4) %}",
" {% if _p < priority %}", " {% if _p < priority %}",
" {% set priority = _p %}", " {% set priority = _p %}",
" {% set network = master.tags.network %}", " {% set network = master.tags.network %}",
@ -65,22 +65,27 @@
"const": { "const": {
"iwn": { "iwn": {
"color": "#ff0000", "color": "#ff0000",
"priority": 0,
"zoom": 10 "zoom": 10
}, },
"nwn": { "nwn": {
"color": "#ff00ba", "color": "#ff00ba",
"priority": 1,
"zoom": 11 "zoom": 11
}, },
"rwn": { "rwn": {
"color": "#ba00ff", "color": "#ba00ff",
"priority": 2,
"zoom": 12 "zoom": 12
}, },
"lwn": { "lwn": {
"color": "#0000ff", "color": "#0000ff",
"priority": 3,
"zoom": 14 "zoom": 14
}, },
"": { "": {
"color": "#007fff", "color": "#007fff",
"priority": 4,
"zoom": 14 "zoom": 14
} }
}, },

Loading…
Cancel
Save