forked from plepe/openstreetbrowser-categories-main
-
Notifications
You must be signed in to change notification settings - Fork 0
/
roads.json
111 lines (111 loc) · 3.86 KB
/
roads.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
{
"type": "overpass",
"query": {
"10": "way[highway~'^(motorway|trunk)']",
"12": "way[highway~'^(motorway|trunk|primary)']",
"13": "way[highway~'^(motorway|trunk|primary|secondary)']",
"14": "way[highway~'^(motorway|trunk|primary|secondary|tertiary)']",
"15": "way[highway~'^(motorway|trunk|primary|secondary|tertiary|pedestrian|unclassified)']",
"16": "way[highway~'^(motorway|trunk|primary|secondary|tertiary|pedestrian|unclassified|residential)']",
"17": "way[highway~'^(motorway|trunk|primary|secondary|tertiary|pedestrian|unclassified|residential|living_street|service)']",
"18": "way[highway][highway!~'^(raceway|bus_guideway)$']"
},
"feature": {
"pre": [
"{% set highway = tags.highway %}{% set is_link = false %}",
"{% if tags.highway|matches('_link$') %}",
" {% set highway = tags.highway|slice(0, tags.highway|length - 5) %}{% set is_link = true %}",
"{% endif %}"
],
"description": "{{ tagTrans('highway', tags.highway) }}",
"priority": "{{ const.priorities[highway]|default(50) + (is_link ? 0.5 : 0) }}",
"markerSymbol": "",
"listMarkerSymbol": "line",
"style": {
"width": "{{ is_link ? 2 : 4 }}",
"color": "{{ const.colors[highway]|default('#ff0000') }}",
"text": " {{ localizedTag(tags, 'name') }} ",
"textRepeat": "1",
"textFontWeight": "bold"
}
},
"info": [
"<table>",
"{% for k, color in const.colors %}",
" {% if map.zoom >= const.zooms[k] %}",
" <tr>",
" <td>{{ markerLine({ \"width\": \"4\", \"color\": color })|raw }}</td>",
" <td>{{ tagTrans('highway', k) }}</td>",
" </tr>",
" {% endif %}",
"{% endfor %}",
" <tr>",
" <td>{{ markerLine({ \"width\": \"2\", \"color\": const.colors.motorway })|raw }}</td>",
" <td>{{ tagTrans('highway', 'motorway_link') }}</td>",
" </tr>",
" <tr>",
" <td>{{ markerLine({ \"width\": \"4\", \"color\": \"#ff0000\" })|raw }}</td>",
" <td>{{ trans('invalid value') }}</td>",
" </tr>",
"</table>"
],
"const": {
"priorities": {
"motorway": 1,
"trunk": 2,
"primary": 10,
"secondary": 11,
"tertiary": 12,
"pedestrian": 20,
"unclassified": 21,
"residential": 22,
"living_street": 23,
"service": 24,
"track": 30,
"escape": 31,
"cycleway": 41,
"bridleway": 42,
"footway": 43,
"path": 44,
"steps": 45
},
"colors": {
"motorway": "#ff2f2f",
"trunk": "#ff4f4f",
"primary": "#ff7f00",
"secondary": "#ffaf00",
"tertiary": "#ffff00",
"pedestrian": "#ff00ff",
"unclassified": "#4f4fff",
"residential": "#7f4fff",
"living_street": "#af2fff",
"service": "#4f4f7f",
"track": "#bb6300",
"escape": "#bb3300",
"cycleway": "#7faf00",
"bridleway": "#00af7f",
"footway": "#00af00",
"path": "#007f00",
"steps": "#00af00"
},
"zooms": {
"motorway": 10,
"trunk": 10,
"primary": 12,
"secondary": 13,
"tertiary": 14,
"pedestrian": 15,
"unclassified": 15,
"residential": 16,
"living_street": 17,
"service": 17,
"track": 18,
"escape": 18,
"cycleway": 18,
"bridleway": 18,
"footway": 18,
"path": 18,
"steps": 18
}
}
}