1 /* LABELS.MSS CONTENTS:
12 /* Font sets are defined in palette.mss */
14 /* Mapnik does not yet support character-spacing adjustments for
15 labels placed along a line. We can fake this using the replace()
16 function in the text-name parameter by replacing each character
17 with itself followed by one or more spaces. */
19 /* ================================================================== */
21 /* ================================================================== */
23 /* ---- Countries --------------------------------------------------- */
25 #low_place[type='country'][zoom>=3][zoom<=7] {
27 text-face-name: @bold;
28 text-placement: point;
29 text-fill: @country_text;
30 text-halo-fill: @country_halo;
47 text-character-spacing: 0;
53 text-character-spacing: 1;
57 /* ---- States ------------------------------------------------------ */
59 #low_place[type='state'][zoom>=5][zoom<=10] {
61 text-face-name: @bold;
62 text-placement: point;
63 text-fill: @state_text;
64 text-halo-fill: @state_halo;
67 text-size:9 + @text_adjust;
71 text-size:10 + @text_adjust;
75 text-size:11 + @text_adjust;
82 text-size:11 + @text_adjust;
87 text-size:12 + @text_adjust;
88 text-character-spacing: 1;
93 text-size:14 + @text_adjust;
94 text-character-spacing: 2;
98 /* ---- Cities and Towns ----------------------------------------------- */
100 #low_place[is_capital='country'][zoom>=4][zoom<=10],
101 #low_place[type='city'][zoom>=7][zoom<=10],
102 #low_place[type='town'][zoom>=9][zoom<=10] {
103 shield-file: url('icons/place/town.png');
105 shield-file: url('icons/place/city.png');
107 [is_capital='country'] {
108 shield-file: url('icons/place/country_capital.png');
110 shield-name:'[name]';
112 shield-face-name: @medium;
113 shield-halo-radius: 1;
114 shield-wrap-width: 50;
115 shield-fill: @town_text;
116 shield-halo-fill: @town_halo;
117 shield-placement-type: simple;
118 shield-placements: 'NE,SW,NW,SE,E,W';
121 shield-unlock-image: true;
122 shield-min-distance: 10;
124 shield-fill: @city_text;
125 shield-halo-fill: @city_halo;
128 [is_capital='country'] {
129 shield-face-name: @bold;
130 shield-fill: @capital_text;
131 shield-halo-fill: @capital_halo;
133 shield-line-spacing: -2;
137 shield-halo-radius: 2;
139 [type='city'] { shield-size: 11;}
140 [is_capital='country'] { shield-size: 11;}
144 #place[type='city'][zoom>=11][zoom<=15],
145 #place[type='town'][zoom>=11][zoom<=17] {
148 text-face-name: @medium;
151 text-fill: @town_text;
152 text-halo-fill: @town_halo;
153 text-character-spacing: -1;
155 text-fill: @city_text;
156 text-halo-fill: @city_halo;
159 [is_capital='country'] {
160 text-face-name: @bold;
161 text-fill: @capital_text;
162 text-halo-fill: @capital_halo;
163 text-line-spacing: -2;
164 text-transform: uppercase;
169 [is_capital='country'] { text-size: 13;}
172 text-transform: uppercase;
173 text-character-spacing: 0;
175 [is_capital='country'] { text-size: 14;}
179 text-character-spacing: 1;
181 [is_capital='country'] { text-size: 15;}
185 text-character-spacing: 2;
187 [is_capital='country'] { text-size: 16;}
191 text-line-spacing: 5;
195 text-line-spacing: 6;
201 /* ---- Other small places ------------------------------------------ */
203 #place::small[type='village'][zoom>=11][zoom<=20],
204 #place::small[type='suburb'][zoom>=13][zoom<=20],
205 #place::small[type='hamlet'][zoom>=13][zoom<=20],
206 #place::small[type='neighbourhood'][zoom>=13][zoom<=20] {
208 text-face-name:@medium;
209 text-placement:point;
210 text-fill:@other_text;
212 text-halo-fill:@other_halo;
215 text-min-distance: 100;
216 text-avoid-edges: true;
217 text-label-position-tolerance: 10;
219 text-min-distance: 50;
223 text-character-spacing: 0;
225 text-line-spacing: 1;
229 text-transform: uppercase;
230 text-character-spacing: 0;
232 text-line-spacing: 1;
233 text-min-distance: 30;
237 text-character-spacing: 1;
238 text-wrap-width: 120;
239 text-line-spacing: 2;
240 text-min-distance: 10;
244 text-character-spacing: 2;
245 text-wrap-width: 160;
246 text-line-spacing: 4;
250 text-character-spacing: 3;
251 text-line-spacing: 6;
255 #place::small[type='locality'][zoom>=15] {
257 text-face-name:@medium;
258 text-placement:point;
259 text-fill:@locality_text;
261 text-halo-fill:@locality_halo;
267 text-line-spacing: 1;
271 text-wrap-width: 120;
272 text-line-spacing: 2;
276 text-character-spacing: 0;
277 text-line-spacing: 4;
282 // =====================================================================
284 // =====================================================================
287 // Bring in labels gradually as one zooms in, bases on polygon area
288 [zoom>=12][area>102400000],
289 [zoom>=13][area>25600000],
290 [zoom>=14][area>1600000],
291 [zoom>=15][area>320000],
292 [zoom>=16][area>80000],
293 [zoom>=17][area>20000],
294 [zoom>=18][area>5000],
295 [zoom>=19][area>=0] {
297 text-halo-radius: 1.5;
298 text-face-name: @medium;
302 text-halo-fill: #fff;
303 // Specific style overrides for different types of areas:
304 [type='park'][zoom>=10] {
305 text-face-name: @regular;
307 text-halo-fill: #FFFFFF;
309 [type='golf_course'][zoom>=10] {
310 text-fill: @sports * 0.6;
311 text-halo-fill: lighten(@sports, 10);
313 [type='cemetery'][zoom>=10] {
314 text-fill: @cemetery * 0.6;
315 text-halo-fill: lighten(@cemetery, 10);
317 [type='hospital'][zoom>=10] {
318 text-fill: @hospital * 0.6;
319 text-halo-fill: lighten(@hospital, 10);
321 [type='college'][zoom>=10],
322 [type='school'][zoom>=10],
323 [type='university'][zoom>=10] {
324 text-fill: @school * 0.6;
325 text-halo-fill: lighten(@school, 10);
327 [type='water'][zoom>=10] {
328 text-fill: @water * 0.6;
329 text-halo-fill: lighten(@water, 10);
332 [zoom=15][area>1600000],
333 [zoom=16][area>20000],
334 [zoom=17][area>20000],
335 [zoom=18][area>5000] {
336 text-face-name: @regular;
340 text-character-spacing: 0;
343 [zoom=16][area>1600000],
344 [zoom=17][area>80000],
345 [zoom=18][area>20000] {
347 text-character-spacing: 1;
348 text-wrap-width: 120;
350 [zoom>=17][area>1600000],
351 [zoom>=18][area>80000] {
353 text-character-spacing: 2;
354 text-wrap-width: 180;
359 /* ================================================================== */
361 /* ================================================================== */
363 #waterway_label[type='river'][zoom>=13],
364 #waterway_label[type='canal'][zoom>=15],
365 #waterway_label[type='stream'][zoom>=17] {
367 text-face-name: @medium;
368 text-fill: darken(@water,20%);
369 text-halo-fill: @other_halo;
371 text-placement: line;
372 text-min-distance: 400;
375 [type='river'][zoom=14],
376 [type='canal'][zoom=16],
377 [type='stream'][zoom=18] {
378 text-name: "[name].replace('([\S\ ])','$1 ')";
380 [type='river'][zoom=15],
381 [type='canal'][zoom=17] {
383 text-name: "[name].replace('([\S\ ])','$1 ')";
385 [type='river'][zoom>=16],
386 [type='canal'][zoom>=18] {
388 text-name: "[name].replace('([\S\ ])','$1 ')";
393 /* ================================================================== */
395 /* ================================================================== */
397 #motorway_label[type='motorway'][zoom>9],
398 #motorway_label[type='trunk'][zoom>9] {
400 text-face-name: @bold;
401 text-placement: line;
402 text-fill: @road_text;
403 text-halo-fill: @road_halo;
405 text-min-distance: 60;
407 text-avoid-edges: true;
408 text-character-spacing: -0.1;
409 [zoom=11] { text-min-distance: 70; }
410 [zoom=12] { text-min-distance: 80; }
411 [zoom=13] { text-min-distance: 100; }
414 #mainroad_label[type='primary'][zoom>12],
415 #mainroad_label[type='secondary'][zoom>13],
416 #mainroad_label[type='tertiary'][zoom>13] {
418 text-face-name: @bold;
419 text-placement: line;
420 text-fill: @road_text;
421 text-halo-fill: @road_halo;
423 text-min-distance: 60;
425 text-avoid-edges: true;
426 text-character-spacing: -0.1;
429 #minorroad_label[zoom>14] {
431 text-face-name: @bold;
432 text-placement: line;
433 text-fill: @road_text;
434 text-halo-fill: @road_halo;
436 text-min-distance: 60;
438 text-avoid-edges: true;
439 // text-character-spacing: -0.5;
442 /* ================================================================== */
444 /* ================================================================== */
446 #motorway_label[oneway!='no'][zoom>=16],
447 #mainroad_label[oneway!='no'][zoom>=16],
448 #minorroad_label[oneway!='no'][zoom>=16] {
449 marker-placement:line;
450 marker-max-error: 0.5;
452 marker-file: url('icons/oneway.svg');
453 [oneway='-1'] { marker-file: url('icons/oneway-reverse.svg'); }
454 [zoom=16] { marker-transform: "scale(0.5)"; }
455 [zoom=17] { marker-transform: "scale(0.75)"; }
459 /* ****************************************************************** */
461 /* ================================================================== */
463 /* ================================================================== */
465 #admin-label-1-4[zoom>=10],
466 #admin-label-5-10[zoom>=13] {
467 text-name: "' '+[name]+' '";
468 text-fill: @admin_2_text;
470 text-placement: line;
472 text-face-name: @regular;
474 text-halo-fill: @place_halo;
475 text-min-padding: 50;
476 text-min-distance: 50;
478 text-max-char-angle-delta: 10;
482 /* ================================================================== */
484 /* ================================================================== */
487 #housenumber[zoom>=17]{
488 text-name: "[housenumber]";
489 text-placement: interior;
490 text-face-name: @medium;
491 text-fill: @housenumber_text;
492 text-halo-fill: @road_halo;
495 [zoom=17][mod5='no'] {
503 /* ================================================================== */
505 /* ================================================================== */
507 #natural_point_label[type='bay'][zoom>=10] {
509 text-face-name: @medium;
510 text-fill: darken(@water,30%);
511 text-halo-fill: lighten(@water,10%);
516 #natural_point_label[type='volcano'][zoom>=13],
517 #natural_point_label[type='peak'][zoom>=13] {
518 shield-file: url('icons/natural/peak-6.png');
519 shield-name: '[name]';
520 shield-face-name: @regular;
523 shield-min-distance: 50;
526 shield-halo-fill: @other_halo;
527 shield-halo-radius: 1;
528 shield-placement-type: simple;
529 shield-placements: 'S,N,E,W';
530 shield-unlock-image: true;
532 shield-name: '[name] + " (" + [ele] + ")"';