-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlabel.mss
More file actions
309 lines (292 loc) · 8.51 KB
/
label.mss
File metadata and controls
309 lines (292 loc) · 8.51 KB
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
// =====================================================================
// 2__ PLACE NAMES
// =====================================================================
// Staedte mit 10k bis 100k Ein
/*
#place_label[type='town'][zoom>=8][zoom<=17][localrank<=2] {
text-name: @name;
text-face-name: @sans;
text-placement: point;
text-fill: @town_text;
text-halo-fill: @town_halo;
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-wrap-width: 75;
text-wrap-before: true;
text-line-spacing: -4;
text-size: 11;
[zoom>=8] { text-size: 12; }
[zoom>=10] { text-size: 13; text-halo-radius: 2; }
[zoom>=11] { text-size: 14; }
[zoom>=12] { text-size: 15; text-wrap-width: 80; }
[zoom>=13] { text-size: 16; text-wrap-width: 120; }
[zoom>=14] { text-size: 18; text-wrap-width: 160; }
[zoom>=15] { text-size: 20; text-wrap-width: 200; }
[zoom>=16] { text-size: 22; text-wrap-width: 240; }
}
// Doerfer mit unter 10k Einwohnern
#place_label[type='village'][zoom>=10][zoom<=14][localrank<=2],
#place_label[type='village'][zoom>=15][zoom<=17] {
text-name: @name;
text-face-name: @sans;
text-placement: point;
text-fill: @town_text;
text-size: 11;
text-halo-fill: @town_halo;
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-wrap-width: 60;
text-wrap-before: true;
text-line-spacing: -4;
[zoom>=12] { text-size: 12; }
[zoom>=13] { text-wrap-width: 80; }
[zoom>=14] { text-size: 14; text-wrap-width: 100; }
[zoom>=15] { text-size: 16; text-wrap-width: 120; }
[zoom>=16] { text-size: 18; text-wrap-width: 160; }
[zoom=17] { text-size: 20; text-wrap-width: 200; }
}
*/
// =====================================================================
// 4__ WATER LABELS
// =====================================================================
#water_label {
[zoom<=15][area>200000],
[zoom=16][area>10000],
[zoom=17][area>10000],
[zoom>=18][area>0]{
text-name: @name;
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-size: 11;
text-wrap-width: 50;
text-wrap-before: true;
text-halo-fill: #fff;
text-line-spacing: -2;
text-face-name: @sans_italic;
text-fill: darken(@water, 30);
}
[zoom>=14][area>3200000],
[zoom>=15][area>800000],
[zoom>=16][area>200000],
[zoom>=17][area>50000],
[zoom>=18][area>10000] {
text-size: 12;
text-wrap-width: 75;
}
[zoom>=15][area>3200000],
[zoom>=16][area>800000],
[zoom>=17][area>200000],
[zoom>=18][area>50000] {
text-size: 14;
text-wrap-width: 100;
text-halo-radius: 2;
}
[zoom>=16][area>3200000],
[zoom>=17][area>800000],
[zoom>=18][area>200000] {
text-size: 16;
text-wrap-width: 125;
}
[zoom>=17][area>3200000],
[zoom>=18][area>800000] {
text-size: 18;
text-wrap-width: 150;
}
}
// =====================================================================
// 5__ ROAD LABELS
// =====================================================================
// regular labels
#road_label['mapnik::geometry_type'=2] {
// Longer roads get a label earlier as they are likely to be more
// important. This especially helps label density in rural/remote areas.
// This z14 filter is *not* redundant to logic in SQL queries. Because z14
// includes all data for z14+ via overzooming, the streets included in a
// z14 vector tile include more features than ideal for optimal performance.
[class='motorway'][zoom>=12],
[class='primary'][zoom>=12],
[class='trunk'][zoom>=12],
[class='tertiary'][zoom>=15],
[class='secondary'][zoom>=15],
[class='street'][zoom>=15],
[class='street_limited'] {
text-avoid-edges: true;
text-name: @name;
text-character-spacing: 0.25;
text-placement: line;
text-face-name: @sans;
text-fill: #666;
text-size: 9.5;
text-halo-fill: @road_halo;
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-repeat-distance: 500000;
//text-margin: 10;
text-placement-type: simple;
[class='motorway'],[class='trunk'],
[class='primary'],[class='secondary'] {
text-transform: uppercase;
text-fill: #444;
text-min-path-length: 100;
text-spacing: 80000;
text-margin: 5;
text-allow-overlap: false;
text-repeat-distance: 1000;
[zoom>=14] { text-size: 10; }
[zoom>=16] { text-size: 10; text-face-name: @sans_bold; }
[zoom>=17] { text-size: 11; }
[zoom>=18] { text-size: 13; }
}
[name="Schleißheimer Straße"] {
text-min-path-length: 274;
}
[name="Ingolstädter Straße"] {
text-min-path-length: 274;
}
[name="Isarring"],[name="Lindwurmstraße"],[name="Denninger Straße"] {
text-min-path-length: 300;
}
[name="Landsberger Straße"],[name="Bodenseestraße"],
[name="Werinherstraße"], [name="Cosimastraße"] {
text-min-path-length: 275;
}
[name="Denninger Straße"], [name="Heidemannstraße"] {
text-min-path-length: 285;
}
[name="Einsteinstraße"],[name="Zschokkestraße"],
[name="Innsbrucker Ring"],[name="Westendstraße"],
[name="Rosenheimer Straße"],[name="Candidstraße"],
[name="Chiemgaustraße"], [name="Ständlerstraße"],
[name="Frankfurter Ring"], [name="Englschalkinger Straße"],
[name="Fasangartenstraße"], [name="Arnulfstraße"],
[name="Ackermannstraße"], [name="Truderinger Straße"] {
text-min-path-length: 250;
}
[name="Wittelsbacherstraße"],[name="Garmischer Straße"],
[name="Ottobrunner Straße"] {
text-min-path-length: 230;
}
[name="Neuherbergstraße"],[name="Dülferstraße"] {
text-min-path-length: 190;
}
[name="Triebstraße"], [name="Effnerstraße"] {
text-min-path-length: 140;
}
[name=~".*rücke"] {
text-min-path-length: 10;
}
}
}
// less prominent labels for all other types, by length
#road_label['mapnik::geometry_type'=2]
[class!='motorway']
[class!='primary']
[class!='secondary']
[class!='construction']
[class!='tertiary']
[class!='street']
[class!='path']
[class!='street_limited'] {
[len>10000][zoom>=12],
[len>5000][zoom>=13],
[len>2500][zoom>=14],
[len>1200][zoom>=15],
[len>0][zoom>=16] {
text-avoid-edges: true;
text-name: @name;
text-character-spacing: 0.25;
text-placement: line;
text-face-name: @sans;
text-size: 10;
text-fill: #666;
text-halo-fill: @road_halo;
text-halo-radius: 1;
text-halo-rasterizer: fast;
[zoom>=17] { text-size: 10; }
[zoom>=18] { text-size: 11; }
text-repeat-distance: 5000;
text-margin: 5;
}
}
// =====================================================================
// POI LABELS
// =====================================================================
#poi_label[type='Grave Yard'],
#poi_label[type='Cemetery'],
#poi_label[type='Hospital'],
#poi_label[type='Park'],
#poi_label[type='Zoo'],
#poi_label[type='Museum']{
[zoom>=14][scalerank<3][name!='Freizeitpark Eduard-Schmid-Straße']{
text-name: @name;
text-face-name: @sans;
text-fill: #464646;
text-halo-fill: fadeout(#fff,75);
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-line-spacing: -4;
text-wrap-width: 80;
text-wrap-before: true;
text-allow-overlap: false;
[scalerank=1] {
[zoom>=15] { text-size: 13; text-wrap-width: 100; }
[zoom>=16] { text-size: 14; text-wrap-width: 120; }
[zoom>=17] { text-size: 15; text-wrap-width: 130; }
}
[scalerank=2] {
[zoom>=16] { text-size: 11; text-wrap-width: 100;}
[zoom>=17] { text-size: 12; text-wrap-width: 120; }
}
}
}
#waterway_label[class='river'][zoom>=13],
#waterway_label[class='canal'][zoom>=15],
#waterway_label[class='stream'][zoom>=15],
#waterway_label[class='stream_intermittent'][zoom>=15] {
[name!='Kleine Isar'][name!='Isar']{
text-name: @name;
text-face-name: @sans_italic;
text-repeat-distance: 5000000;
text-avoid-edges: true;
text-placement: line;
text-spacing: 30000;
text-min-path-length: 200;
text-fill: darken(@water, 30);
text-halo-fill: fadeout(#fff,80%);
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-allow-overlap: false;
text-size: 10;
text-character-spacing: 1;
[class='river'][zoom=14],
[class='canal'][zoom=16],
[class='stream'][zoom>=15],
[class='stream_intermittent'][zoom>=15] {
text-size: 10;
}
[class='river'][zoom=15],
[class='canal'][zoom>=17] {
text-size: 11;
text-spacing: 400;
}
[class='river'][zoom>=16],
[class='canal'][zoom>=18] {
text-size: 14;
text-spacing: 400;
}
}
}
/*
#road_label[class='motorway'][reflen>=1][shield="de-motorway"] {
shield-name: '[ref]';
shield-face-name: @sans_bold;
shield-fill: #ffffff;
shield-min-distance: 60;
shield-file: url('img/autobahn_smallerer.png');
shield-unlock-image: true;
shield-size: 14;
shield-avoid-edges: true;
shield-spacing: 10000;
shield-min-distance: 10000;
shield-character-spacing: 1.6;
}*/