style/roadref.mss

changeset 0
b0eb3af2f9ee
equal deleted inserted replaced
-1:000000000000 0:b0eb3af2f9ee
1 // Shield’s line wrap is based on OpenStreetMap data and not on line-wrap-width,
2 // but lines are typically rather short, so we use narrow line spacing.
3 @shield-size: 10;
4 @shield-line-spacing: -2; // -1.50; // -0.15 em
5 @shield-size-z16: 11;
6 @shield-line-spacing-z16: -2.25; // -1.65; // -0.15 em
7 @shield-size-z18: 12;
8 @shield-line-spacing-z18: -2.5; // -1.80; // -0.15 em
9 @shield-spacing: 760;
10 @shield-repeat-distance: 400;
11 @shield-margin: 40;
12 @shield-font: "Liikenne Regular";
13 @shield-clip: false;
14
15 #roads-text-ref
16 {
17 [highway = 'trunk'][zoom >= 13],
18 [highway = 'primary'][zoom >= 13],
19 [highway = 'secondary'][zoom >= 13],
20 [highway = 'tertiary'][zoom >= 13],
21 [ref_class_1 = 'valtatie'][zoom >= 8],
22 [ref_class_1 = 'eurooppatie'][zoom >= 12],
23 [ref_class_1 = 'kantatie'][zoom >= 10],
24 [ref_class_1 = 'seututie'][zoom >= 12]
25 {
26 [ref_1 != null][ref_class_1 != null][ref_class_1 != 'unknown']
27 {
28 shield-face-name: @shield-font;
29 shield-file: url("symbols/shields/[ref_class_1]_[ref_length_1]x1.svg");
30 [ref_class_1 = 'valtatie'],
31 [ref_class_1 = 'yhdystie'],
32 [ref_class_1 = 'eurooppatie']
33 {
34 shield-fill: white;
35 }
36 [ref_class_1 = 'kantatie'],
37 [ref_class_1 = 'seututie']
38 {
39 shield-fill: black;
40 }
41 shield-name: "[ref_1]";
42 shield-size: 12;
43 shield-placement: line;
44 shield-spacing: @shield-spacing;
45 shield-repeat-distance: @shield-repeat-distance;
46 shield-margin: @shield-margin;
47 shield-clip: @shield-clip;
48 }
49 }
50 }
51
52 #roads-text-ref2
53 {
54 [highway = 'trunk'][zoom >= 13],
55 [highway = 'primary'][zoom >= 13],
56 [highway = 'secondary'][zoom >= 13],
57 [highway = 'tertiary'][zoom >= 13],
58 [ref_class_2 = 'valtatie'][zoom >= 12],
59 [ref_class_2 = 'eurooppatie'][zoom >= 12],
60 [ref_class_2 = 'kantatie'][zoom >= 12],
61 [ref_class_2 = 'seututie'][zoom >= 12]
62 {
63 [ref_2 != null][ref_class_2 != null][ref_class_2 != 'unknown']
64 {
65 shield-face-name: @shield-font;
66 shield-file: url("symbols/shields/[ref_class_2]_[ref_length_2]x1.svg");
67 [ref_class_2 = 'valtatie'],
68 [ref_class_2 = 'yhdystie'],
69 [ref_class_2 = 'eurooppatie']
70 {
71 shield-fill: white;
72 }
73 [ref_class_2 = 'kantatie'],
74 [ref_class_2 = 'seututie']
75 {
76 shield-fill: black;
77 }
78 shield-name: "[ref_2]";
79 shield-size: 12;
80 shield-placement: line;
81 shield-spacing: @shield-spacing;
82 shield-repeat-distance: @shield-repeat-distance;
83 shield-margin: @shield-margin;
84 shield-clip: @shield-clip;
85 }
86 }
87 }
88
89 #roads-text-ref3
90 {
91 [highway = 'trunk'][zoom >= 13],
92 [highway = 'primary'][zoom >= 13],
93 [highway = 'secondary'][zoom >= 13],
94 [highway = 'tertiary'][zoom >= 13],
95 [ref_class_3 = 'valtatie'][zoom >= 12],
96 [ref_class_3 = 'eurooppatie'][zoom >= 12],
97 [ref_class_3 = 'kantatie'][zoom >= 12],
98 [ref_class_3 = 'seututie'][zoom >= 12]
99 {
100 [ref_3 != null][ref_class_3 != null][ref_class_3 != 'unknown']
101 {
102 shield-face-name: @shield-font;
103 shield-file: url("symbols/shields/[ref_class_3]_[ref_length_3]x1.svg");
104 [ref_class_3 = 'valtatie'],
105 [ref_class_3 = 'yhdystie'],
106 [ref_class_3 = 'eurooppatie']
107 {
108 shield-fill: white;
109 }
110 [ref_class_3 = 'kantatie'],
111 [ref_class_3 = 'seututie']
112 {
113 shield-fill: black;
114 }
115 shield-name: "[ref_3]";
116 shield-size: 12;
117 shield-placement: line;
118 shield-spacing: @shield-spacing;
119 shield-repeat-distance: @shield-repeat-distance;
120 shield-margin: @shield-margin;
121 shield-clip: @shield-clip;
122 }
123 }
124 }
125 #roads-text-ref4
126 {
127 [highway = 'trunk'][zoom >= 13],
128 [highway = 'primary'][zoom >= 13],
129 [highway = 'secondary'][zoom >= 13],
130 [highway = 'tertiary'][zoom >= 13],
131 [ref_class_4 = 'valtatie'][zoom >= 10],
132 [ref_class_4 = 'eurooppatie'][zoom >= 11],
133 [ref_class_4 = 'kantatie'][zoom >= 11],
134 [ref_class_4 = 'seututie'][zoom >= 12]
135 {
136 [ref_4 != null][ref_class_4 != null][ref_class_4 != 'unknown']
137 {
138 shield-face-name: @shield-font;
139 shield-file: url("symbols/shields/[ref_class_4]_[ref_length_4]x1.svg");
140 [ref_class_4 = 'valtatie'],
141 [ref_class_4 = 'yhdystie'],
142 [ref_class_4 = 'eurooppatie']
143 {
144 shield-fill: white;
145 }
146 [ref_class_4 = 'kantatie'],
147 [ref_class_4 = 'seututie']
148 {
149 shield-fill: black;
150 }
151 shield-name: "[ref_4]";
152 shield-size: 12;
153 shield-placement: line;
154 shield-spacing: @shield-spacing;
155 shield-repeat-distance: @shield-repeat-distance;
156 shield-margin: @shield-margin;
157 shield-clip: @shield-clip;
158 }
159 }
160 }
161 #roads-text-ref5
162 {
163 [highway = 'trunk'][zoom >= 13],
164 [highway = 'primary'][zoom >= 13],
165 [highway = 'secondary'][zoom >= 13],
166 [highway = 'tertiary'][zoom >= 13],
167 [ref_class_5 = 'valtatie'][zoom >= 12],
168 [ref_class_5 = 'eurooppatie'][zoom >= 12],
169 [ref_class_5 = 'kantatie'][zoom >= 12],
170 [ref_class_5 = 'seututie'][zoom >= 12]
171 {
172 [ref_5 != null][ref_class_5 != null][ref_class_5 != 'unknown']
173 {
174 shield-face-name: @shield-font;
175 shield-file: url("symbols/shields/[ref_class_5]_[ref_length_5]x1.svg");
176 [ref_class_5 = 'valtatie'],
177 [ref_class_5 = 'yhdystie'],
178 [ref_class_5 = 'eurooppatie']
179 {
180 shield-fill: white;
181 }
182 [ref_class_5 = 'kantatie'],
183 [ref_class_5 = 'seututie']
184 {
185 shield-fill: black;
186 }
187 shield-name: "[ref_5]";
188 shield-size: 12;
189 shield-placement: line;
190 shield-spacing: @shield-spacing;
191 shield-repeat-distance: @shield-repeat-distance;
192 shield-margin: @shield-margin;
193 shield-clip: @shield-clip;
194 }
195 }
196 }
197 #roads-text-ref6
198 {
199 [highway = 'trunk'][zoom >= 13],
200 [highway = 'primary'][zoom >= 13],
201 [highway = 'secondary'][zoom >= 13],
202 [highway = 'tertiary'][zoom >= 13],
203 [ref_class_6 = 'valtatie'][zoom >= 10],
204 [ref_class_6 = 'eurooppatie'][zoom >= 12],
205 [ref_class_6 = 'kantatie'][zoom >= 12],
206 [ref_class_6 = 'seututie'][zoom >= 12]
207 {
208 [ref_6 != null][ref_class_6 != null][ref_class_6 != 'unknown']
209 {
210 shield-face-name: @shield-font;
211 shield-file: url("symbols/shields/[ref_class_6]_[ref_length_6]x1.svg");
212 [ref_class_6 = 'valtatie'],
213 [ref_class_6 = 'yhdystie'],
214 [ref_class_6 = 'eurooppatie']
215 {
216 shield-fill: white;
217 }
218 [ref_class_6 = 'kantatie'],
219 [ref_class_6 = 'seututie']
220 {
221 shield-fill: black;
222 }
223 shield-name: "[ref_6]";
224 shield-size: 12;
225 shield-placement: line;
226 shield-spacing: @shield-spacing;
227 shield-repeat-distance: @shield-repeat-distance;
228 shield-margin: @shield-margin;
229 shield-clip: @shield-clip;
230 }
231 }
232 }

mercurial