This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
/
road.mss
150 lines (144 loc) · 4.6 KB
/
road.mss
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Basic color palette, from which variations will be derived.
@motorway: #fc8;
@main: #fea;
@street: #fff;
@street_limited: #f3f3f3;
// ---------------------------------------------------------------------
// Roads are split across 3 layers: #road, #bridge, and #tunnel. Each
// road segment will only exist in one of the three layers. The
// #bridge layer makes use of Mapnik's group-by rendering mode;
// attachments in this layer will be grouped by layer for appropriate
// rendering of multi-level overpasses.
// The main road style is for all 3 road layers and divided into 2 main
// attachments. The 'case' attachment is
#road, #bridge, #tunnel {
// casing/outlines & single lines
::case[zoom>=6]['mapnik::geometry_type'=2] {
[class='motorway'] {
line-join:round;
line-color: mix(@motorway, #800, 75);
#road { line-cap: round; }
#tunnel { line-dasharray:3,2; }
[zoom>=6] { line-width:0.4; }
[zoom>=7] { line-width:0.6; }
[zoom>=8] { line-width:1.5; }
[zoom>=10] { line-width:3; }
[zoom>=13] { line-width:3.5; }
[zoom>=14] { line-width:5; }
[zoom>=15] { line-width:7; }
[zoom>=16] { line-width:9; }
}
[class='motorway_link'][zoom>=13] {
line-join:round;
line-color: mix(@motorway, #800, 75);
#road { line-cap: round; }
#tunnel { line-dasharray:3,2; }
[zoom>=13] { line-width:1; }
[zoom>=14] { line-width:3; }
[zoom>=15] { line-width:5; }
[zoom>=16] { line-width:6.5; }
}
[class='main'] {
line-join:round;
line-color: mix(@main, #800, 75);
#road { line-cap: round; }
#tunnel { line-dasharray:3,2; }
[zoom>=6] { line-width:0.2; }
[zoom>=7] { line-width:0.4; }
[zoom>=8] { line-width:1.5; }
[zoom>=10] { line-width:2.4; }
[zoom>=13] { line-width:2.5; }
[zoom>=14] { line-width:4; }
[zoom>=15] { line-width:5; }
[zoom>=16] { line-width:8; }
}
[class='street'][zoom>=12],[class='street_limited'][zoom>=12] {
line-join:round;
#road { line-cap: round; }
#tunnel { line-dasharray:3,2; }
line-color: @land * 0.8;
[zoom>=12] { line-width:0.5; }
[zoom>=14] { line-width:1; }
[zoom>=15] { line-width:4; }
[zoom>=16] { line-width:6.5; }
}
[class='service'][zoom>=15] {
line-join:round;
#road { line-cap: round; }
#tunnel { line-dasharray:3,2; }
line-color: @land * 0.9;
[zoom>=15] { line-width:1; }
[zoom>=16] { line-width:4; }
}
[class='path'][zoom>=15] {
line-color: #cba;
line-dasharray: 2,1;
[zoom>=16] { line-width: 1.2; }
[zoom>=17] { line-width: 1.5; }
}
}
// fill/inlines
::fill[zoom>=6]['mapnik::geometry_type'=2] {
[class='motorway'][zoom>=8] {
line-join:round;
#road, #bridge { line-cap:round; }
line-color:@motorway;
#tunnel { line-color:lighten(@motorway,4); }
[zoom>=8] { line-width:0.5; }
[zoom>=10] { line-width:1; }
[zoom>=13] { line-width:2; }
[zoom>=14] { line-width:3.5; }
[zoom>=15] { line-width:5; }
[zoom>=16] { line-width:7; }
}
[class='motorway_link'][zoom>=14] {
line-join:round;
#road, #bridge { line-cap: round; }
line-color:@motorway;
#tunnel { line-color:lighten(@motorway,4); }
[zoom>=14] { line-width:1.5; }
[zoom>=15] { line-width:3; }
[zoom>=16] { line-width:4.5; }
}
[class='main'][zoom>=8] {
line-join:round;
#road, #bridge { line-cap: round; }
line-color:@main;
#tunnel { line-color:lighten(@main,4); }
[zoom>=8] { line-width:0.5; }
[zoom>=10] { line-width:1; }
[zoom>=13] { line-width:1.5; }
[zoom>=14] { line-width:2.5; }
[zoom>=15] { line-width:3.5; }
[zoom>=16] { line-width:6; }
}
[class='street'][zoom>=15], {
line-join:round;
#road, #bridge { line-cap: round; }
[zoom>=15] { line-width:2.5; line-color:#fff; }
[zoom>=16] { line-width:4; }
}
[class='street_limited'][zoom>=15], {
line-join:round;
#road, #bridge { line-cap: round; }
[zoom>=15] { line-width:2.5; line-color:#eee; }
[zoom>=16] { line-width:4; }
}
[class='service'][zoom>=16], {
line-join:round;
#road, #bridge { line-cap: round; }
[zoom>=16] { line-width:2; line-color:#fff; }
}
[class='major_rail'] {
line-width: 0.4;
line-color: #bbb;
[zoom>=16] {
line-width: 0.75;
// Hatching
h/line-width: 3;
h/line-color: #bbb;
h/line-dasharray: 1,31;
}
}
}
}