forked from plepe/openstreetbrowser-categories-main
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hiking_routes.json
123 lines (123 loc) · 4.64 KB
/
hiking_routes.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"type": "overpass",
"name": {
"de": "Wanderrouten",
"en": "Hiking routes",
"fr": "Itinéraires pédestres",
"hu": "Turistautak",
"pt": "Rotas de caminhada",
"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(|;.*)$\"]"
},
"members": true,
"feature": {
"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": ""
},
"memberFeature": {
"pre": [
"{% set priority = 4 %}",
"{% set network = '' %}",
"{% set refs = [] %}",
"",
"{% for master in masters %}",
" {% set masterNetwork = '' %}",
" {% for n in master.tags.network|split(';') %}",
" {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}",
" {% endfor %}",
" {% set _p = const[masterNetwork].priority|default(4) %}",
" {% if _p < priority %}",
" {% set priority = _p %}",
" {% set network = masterNetwork %}",
" {% endif %}",
" {% if master.tags.ref %}",
" {% set refs = refs|merge([ master.tags.ref ]) %}",
" {% endif %}",
"{% endfor %}"
],
"body": [
"<h4>Routes</h4>",
"<ul class='overpass-layer-list'>",
"{% for master in masters %}",
" {% set masterNetwork = '' %}",
" {% for n in master.tags.network|split(';') %}",
" {% if n|matches('wn$') %}{% set masterNetwork = n %}{% endif %}",
" {% endfor %}",
" <li data-object=\"{{ master.id }}\"><a>",
" <div class='marker'>",
" <div class='symbol'>{{ markerLine({ width: 4, color: const[masterNetwork].color|default(const[''].color) })|raw }}</div>",
" </div>",
" <div class='content'>",
" <div class='description'>{{ tagTrans('network', masterNetwork) }}</div>",
" <div 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 }}{% endif %}</div>",
" </div>",
" </a></li>",
"{% endfor %}",
"</ul>"
],
"listExclude": "1",
"style": {
"color": "{{ const[network].color }}",
"width": 4,
"opacity": 1,
"text": "{{ refs|join(' · ') }} ",
"textRepeat": "1",
"textOffset": "12",
"textFontWeight": "bold"
}
},
"const": {
"iwn": {
"color": "#ff0000",
"priority": 0,
"zoom": 10
},
"nwn": {
"color": "#ff00ba",
"priority": 1,
"zoom": 11
},
"rwn": {
"color": "#ba00ff",
"priority": 2,
"zoom": 12
},
"lwn": {
"color": "#0000ff",
"priority": 3,
"zoom": 14
},
"": {
"color": "#007fff",
"priority": 4,
"zoom": 14
}
},
"info": [
"<table>",
"{% for value, data in const %}",
"{% if data.zoom <= map.zoom %}",
" <tr>",
" <td>{{ markerLine({ 'width': 4, color: data.color })|raw }}</td>",
" <td>{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}</td>",
" </tr>",
"{% endif %}",
"{% endfor %}",
"</table>"
]
}