This repository has been archived by the owner on May 7, 2024. It is now read-only.
forked from mapbox/mapbox-studio-outdoors.tm2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpoi.mss
162 lines (153 loc) · 4.31 KB
/
poi.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
151
152
153
154
155
156
157
158
159
160
161
162
// =====================================================================
// POINTS OF INTEREST ICONS & LABELS
// =====================================================================
// Airports and rail stations are styled separately from other POIs
// because we use different fields to set their icon images.
#poi_label[type!='Aerodrome'][type!='Rail Station'][type!='hole'][zoom>=7] {
::icon {
[zoom<14][localrank<=1],
[zoom>=14][scalerank=1][localrank<=1],
[zoom>=15][scalerank<=2][localrank<=1],
[zoom>=16][scalerank<=3][localrank<=1],
[zoom>=17][localrank<=4],
[zoom>=18][localrank<=16],
[zoom>=19] {
[maki!=null] {
marker-file: url("img/maki/[maki]-12.svg");
}
[maki=null] {
// small dot for POIs with no Maki icon defined
marker-width: 4;
marker-fill: rgba(0,0,0,0);
marker-line-width: 1.2;
marker-line-color: #666;
}
}
}
[zoom<14][localrank<=1],
[zoom>=14][scalerank=1][localrank<=1],
[zoom>=15][scalerank<=2][localrank<=1],
[zoom>=16][scalerank<=3][localrank<=1],
[zoom>=17][localrank<=4],
[zoom>=18][localrank<=16],
[zoom>=19] {
text-name: @name;
text-face-name: @sans;
text-fill: #555;
text-halo-fill: @land;
text-halo-radius: 1;
text-halo-rasterizer: fast;
text-dy: 12;
text-line-spacing: -4;
text-wrap-width: 80;
text-wrap-before: true;
[scalerank=1] {
[zoom>=15] { text-size: 11; text-wrap-width: 100; }
[zoom>=16] { text-size: 12; text-wrap-width: 120; }
[zoom>=17] { text-size: 14; text-wrap-width: 130; }
}
[scalerank=2] {
[zoom>=16] { text-size: 11; text-wrap-width: 100; }
[zoom>=17] { text-size: 12; text-wrap-width: 120; }
}
[scalerank>=3] {
[zoom>=17] { text-size: 11; text-wrap-width: 100; }
[zoom>=19] { text-size: 12; text-wrap-width: 120; }
}
}
}
// Rail Stations _______________________________________________________
#poi_label[type='Rail Station'][network!=null][scalerank=1][zoom>=14],
#poi_label[type='Rail Station'][network!=null][scalerank=2][zoom>=15],
#poi_label[type='Rail Station'][network!=null][scalerank=3][zoom>=16] {
marker-file: url("img/rail/[network]-12.svg");
marker-height: 12;
marker-allow-overlap: false;
[zoom=16] {
marker-file: url("img/rail/[network]-18.svg");
marker-height: 18;
}
[zoom>16] {
marker-file: url("img/rail/[network]-12.svg");
marker-height:24;
}
[zoom>15] {
text-name: @name;
text-face-name: @sans;
text-fill: #888;
text-halo-fill: #fff;
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
text-size: 11;
text-wrap-width: 80;
text-placement-type: simple;
text-dx: 11; text-dy: 11;
text-placements: "S,N,E,W";
[zoom>=17] {
text-size: 12;
text-halo-radius: 2;
text-dx: 15; text-dy: 15;
}
}
}
// Airports ____________________________________________________________
#poi_label[type='Aerodrome'][zoom>=10] {
marker-file: url("img/maki/[maki]-12.svg");
text-name: "''";
text-size: 10;
text-fill: #888;
text-halo-fill: #fff;
text-halo-radius: 1;
text-halo-rasterizer: fast;
text-face-name: @sans;
text-line-spacing: -2;
text-dy: 8;
[zoom>=11][zoom<=13][scalerank=1],
[zoom>=12][zoom<=13][scalerank=2] {
text-name: [ref];
}
[zoom>=14] {
text-name: @name;
text-wrap-before: true;
}
[zoom>=11][scalerank=1],
[zoom>=12][scalerank=2],
[zoom>=14] {
marker-file: url("img/maki/[maki]-18.svg");
text-size: 10;
text-dy: 12;
text-wrap-width: 80;
}
[zoom>=13][scalerank=1],
[zoom>=14][scalerank=2],
[zoom>=15] {
marker-file: url("img/maki/[maki]-24.svg");
text-size: 12;
text-dy: 15;
text-wrap-width: 100;
}
[zoom>=14][scalerank=1],
[zoom>=15][scalerank=2],
[zoom>=16] {
marker-file: url("img/maki/[maki]-24.svg");
text-size: 14;
text-dy: 19;
text-wrap-width: 120;
}
}
// Golf holes __________________________________________________________
#poi_label[type='hole'][zoom>=16] {
text-avoid-edges: false;
text-name: @name;
text-character-spacing: 0.25;
text-placement: point;
text-face-name: @sans;
text-fill: darken(#cdb,50);
text-size: 10;
text-halo-fill: @road_halo;
text-halo-radius: 1.5;
text-halo-rasterizer: fast;
[zoom>=17] { text-size: 12; }
[zoom>=18] { text-size: 14; }
}
/**/