-
Notifications
You must be signed in to change notification settings - Fork 0
/
labels.mss
100 lines (97 loc) · 2.63 KB
/
labels.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
/* ************************* */
/* PLACE */
/* ************************* */
#place[type='city'],
#place[type='town'],
#place[type='village'][zoom>=9] {
text-name:'[name].replace("Saint-", "St-").replace("Sainte-", "Ste-")';
text-face-name: @xlight;
text-placement:point;
text-fill: @village_text;
text-size: 11;
text-halo-fill: @village_halo;
text-halo-radius: 2;
text-wrap-width: 30;
text-label-position-tolerance: 20;
text-character-spacing: 0.1;
text-wrap-width: 30;
text-wrap-character: '-';
text-repeat-wrap-character: true; // mapnik 3.x only
text-line-spacing: -2;
[zoom=12] {
text-size: 12;
}
[type='town'] {
text-fill: @town_text;
text-halo-fill: @town_halo;
text-face-name: @medium;
}
[type='city'] {
text-fill: @city_text;
text-halo-fill: @city_halo;
text-face-name: @medium;
text-transform: uppercase;
}
[zoom<12] {
text-min-distance: 30;
text-min-padding: 1;
}
[zoom>=13] {
text-size: 12;
}
[zoom>=14] {
text-size: 13;
}
}
/* ************************* */
/* ROADS */
/* ************************* */
#road_label::shield[type='secondary'][zoom>=13][reflen>=1][reflen<=6],
#road_label::shield[type='primary'][zoom>=12][reflen>=1][reflen<=6],
#road_label::shield[type='trunk'][zoom>=9][reflen>=1][reflen<=6],
#road_label::shield[type='motorway'][zoom>=9][reflen>=1][reflen<=6] {
shield-name: "[ref].replace('·', '\n')";
shield-size: 9;
shield-line-spacing: -4;
shield-file: url('shield/road-[reflen].svg');
shield-face-name: @xlight;
shield-fill: #333;
shield-spacing: 200;
shield-min-distance: 20;
shield-min-padding: 1;
[zoom>=12] {
shield-min-distance: 50;
}
[zoom>=14] {
shield-min-distance: 100;
shield-transform: scale(1.25,1.25);
shield-size: 11;
}
}
#road_label[type='living_street'][zoom>=14],
#road_label[type='residential'][zoom>=14],
#road_label[type='unclassified'][zoom>=14],
#road_label[type='service'][zoom>=14],
#road_label[type='secondary'][zoom>=14],
#road_label[type='tertiary'][zoom>=14],
#road_label[type='primary'][zoom>=14],
#road_label[type='trunk'][zoom>=14],
#road_label[type='motorway'][zoom>=13] {
text-name: '[name].replace("^Chemin", "Ch.").replace("^Avenue", "Av.").replace("^Rue", "R.").replace("^Route", "Rte").replace("^Boulevard", "Bd")';
text-face-name: @xlight;
text-placement: line;
text-size: 10;
text-fill: @road_text;
text-halo-fill: @road_halo;
text-halo-radius: 2;
text-min-distance: 60;
text-size: 11;
text-avoid-edges: true;
text-character-spacing: 0;
[zoom=16] {
text-size: 11;
}
[zoom>=17] {
text-size: 12;
}
}