forked from gravitystorm/openstreetmap-carto
-
Notifications
You must be signed in to change notification settings - Fork 16
/
sports.mss
279 lines (266 loc) · 10.8 KB
/
sports.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
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
#golf [zoom>=16] {
[geo='1_polygon'],[geo='2_line'] {
[golf = 'rough'],[golf = 'driving_range'] {
polygon-fill: #adcc8f;
polygon-opacity: 1;
polygon-smooth: 0.8;
}
[golf = 'fairway'] {
polygon-fill: #adcc8f;
polygon-opacity: 1;
polygon-smooth: 0.8;
}
[golf = 'water_hazard'], [golf = 'lateral_water_hazard'] {
polygon-fill: #b5d0d0;
polygon-smooth: 0.8;
}
[golf = 'green'],[golf='tee'] {
polygon-fill: #bfe573;
polygon-opacity: 1;
polygon-smooth: 0.8;
}
[golf = 'bunker']{
polygon-fill: #ffdf88;
polygon-opacity: 1;
polygon-smooth: 0.8;
}
}
[geo='2_line'] {
[golf = 'hole'] {
line-color: black;
line-width: 0.5;
[name!=''] {
text-placement: line;
text-name: "[name]";
text-face-name: @book-fonts;
text-halo-radius: 1;
text-halo-fill: fadeout(white, 30%);
}
}
[golf = 'out_of_bounds'] {
line-color: white;
line-width: 2;
line-cap: round;
line-dasharray: 1,8;
}
}
[geo='3_point'] {
[golf = 'hole'],
[golf='pin'] {
point-file: url('symbols/fr/golf.svg');
point-transform: "scale(0.4)";
[ref!=''] {
text-fill: #444;
text-name: "[ref]";
text-face-name: @book-fonts;
text-dy: -10;
text-halo-radius: 1;
text-halo-fill: fadeout(white, 30%);
}
}
[golf='tee'] {
marker-fill: grey;
marker-width: 3;
marker-height: 3;
[ref!=''] {
text-name: "[ref]";
text-face-name: @book-fonts;
text-dy: 6;
text-halo-radius: 1;
text-halo-fill: fadeout(white, 30%);
}
}
}
}
@sport-surface-grass: #54a854;
@sport-surface-clay: #cc7e66;
#sports [zoom>=14] {
[surface='clay']::fill { polygon-fill: @sport-surface-clay; }
[surface='grass']::fill { polygon-fill: @sport-surface-grass; }
[access='private'][zoom>=17]::private {
line-width: 4;
line-color: #efa9a9;
line-dasharray: 6,8;
line-opacity: 0.5;
line-join: round;
line-cap: round;
}
[angle_diff>85][angle_diff<95] {
[sport='tennis'][zoom>=16] {
[way_area<2500][d13>37][d13<80] { /* area size / diagonal check */
[d12>38][d12<70][d23>20][d23<40] { /* 1>2 = length / 2>3 = width */
point-file: url('symbols/fr/sports-tennis.svg');
[zoom>=16] { point-transform: "rotate([angle]) scale(0.075)"; }
[zoom>=17] { point-transform: "rotate([angle]) scale(0.15)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(0.3)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(0.6)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(1.2)"; }
point-ignore-placement: true;
}
[d23>38][d23<70][d12>20][d12<40] { /* 1>2 = width / 2>3 = length -> rotate by 90° */
point-file: url('symbols/fr/sports-tennis.svg');
[zoom>=16] { point-transform: "rotate([angle]+90) scale(0.075)"; }
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.15)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(0.3)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(0.6)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(1.2)"; }
point-ignore-placement: true;
}
}
}
[sport='soccer'] {
[d12>130][d12<200][d23>68][d23<160][d13>150][d13<250] { /* 1>2 = length / 2>3 = width */
point-file: url('symbols/fr/sports-soccer.svg');
point-ignore-placement: true;
[way_area<12000] {
[zoom>=14] { point-transform: "rotate([angle]) scale(0.028125)"; }
[zoom>=15] { point-transform: "rotate([angle]) scale(0.05625)"; }
[zoom>=16] { point-transform: "rotate([angle]) scale(0.1125)"; }
[zoom>=17] { point-transform: "rotate([angle]) scale(0.225)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(0.45)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(0.9)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(1.8)"; }
}
[way_area>=12000][way_area<17000] {
[zoom>=14] { point-transform: "rotate([angle]) scale(0.0375)"; }
[zoom>=15] { point-transform: "rotate([angle]) scale(0.075)"; }
[zoom>=16] { point-transform: "rotate([angle]) scale(0.15)"; }
[zoom>=17] { point-transform: "rotate([angle]) scale(0.3)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(0.6)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(1.2)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(2.4)"; }
}
[way_area>=17000] {
[zoom>=14] { point-transform: "rotate([angle]) scale(0.0435)"; }
[zoom>=15] { point-transform: "rotate([angle]) scale(0.0875)"; }
[zoom>=16] { point-transform: "rotate([angle]) scale(0.175)"; }
[zoom>=17] { point-transform: "rotate([angle]) scale(0.35)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(0.7)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(1.4)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(2.8)"; }
}
}
[d23>130][d23<200][d12>68][d12<160][d13>150][d13<250] { /* 1>2 = length / 2>3 = width */
point-file: url('symbols/fr/sports-soccer.svg');
point-ignore-placement: true;
[way_area<12000] {
[zoom>=14] { point-transform: "rotate([angle]+90) scale(0.028125)"; }
[zoom>=15] { point-transform: "rotate([angle]+90) scale(0.05625)"; }
[zoom>=16] { point-transform: "rotate([angle]+90) scale(0.1125)"; }
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.225)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(0.45)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(0.9)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(1.8)"; }
}
[way_area>=12000][way_area<17000] {
[zoom>=14] { point-transform: "rotate([angle]+90) scale(0.0375)"; }
[zoom>=15] { point-transform: "rotate([angle]+90) scale(0.075)"; }
[zoom>=16] { point-transform: "rotate([angle]+90) scale(0.15)"; }
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.3)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(0.6)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(1.2)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(2.4)"; }
}
[way_area>=17000] {
[zoom>=14] { point-transform: "rotate([angle]+90) scale(0.0435)"; }
[zoom>=15] { point-transform: "rotate([angle]+90) scale(0.0875)"; }
[zoom>=16] { point-transform: "rotate([angle]+90) scale(0.175)"; }
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.35)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(0.7)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(1.4)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(2.8)"; }
}
}
}
[sport='basketball'][zoom>=17] {
[way_area<1000][d13>30][d13<50] {
[d12>30][d12<40][d23>15][d23<25] { /* 12-longueur - 23-largeur */
point-file: url('symbols/fr/sports-basketball.svg');
point-ignore-placement: true;
[zoom>=17] { point-transform: "rotate([angle]) scale(0.075)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(0.15)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(0.3)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(0.6)"; }
}
[d23>30][d23<40][d12>15][d12<25] { /* 12-largeur - 23-longueur */
point-file: url('symbols/fr/sports-basketball.svg');
point-ignore-placement: true;
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.075)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(0.15)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(0.3)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(0.6)"; }
}
}
}
[sport='rugby'] {
[way_area>15000][way_area<25000][d13>150][d13<250] {
[d23>75][d23<150][d12>150][d12<250] { /* 12-largeur - 23-longueur */
point-file: url('symbols/fr/sports-rugby.svg');
point-ignore-placement: true;
[zoom>=14] { point-transform: "rotate([angle]) scale(0.0625)"; }
[zoom>=15] { point-transform: "rotate([angle]) scale(0.125)"; }
[zoom>=16] { point-transform: "rotate([angle]) scale(0.25)"; }
[zoom>=17] { point-transform: "rotate([angle]) scale(0.5)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(1)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(2)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(4)"; }
}
[d12>75][d12<150][d23>150][d23<250] { /* 12-longueur - 23-largeur */
point-file: url('symbols/fr/sports-rugby.svg');
point-ignore-placement: true;
[zoom>=14] { point-transform: "rotate([angle]+90) scale(0.0625)"; }
[zoom>=15] { point-transform: "rotate([angle]+90) scale(0.125)"; }
[zoom>=16] { point-transform: "rotate([angle]+90) scale(0.25)"; }
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.5)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(1)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(2)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(4)"; }
}
}
}
[sport='american_football'] {
[way_area>8000][way_area<20000][d13>120][d13<250] {
[d23>50][d23<100][d12>120][d12<200] { /* 12-largeur - 23-longueur */
point-file: url('symbols/fr/sports-foot-us.svg');
point-ignore-placement: true;
[zoom>=14] { point-transform: "rotate([angle]) scale(0.0375)"; }
[zoom>=15] { point-transform: "rotate([angle]) scale(0.075)"; }
[zoom>=16] { point-transform: "rotate([angle]) scale(0.15)"; }
[zoom>=17] { point-transform: "rotate([angle]) scale(0.3)"; }
[zoom>=18] { point-transform: "rotate([angle]) scale(0.6)"; }
[zoom>=19] { point-transform: "rotate([angle]) scale(1.2)"; }
[zoom>=20] { point-transform: "rotate([angle]) scale(2.4)"; }
}
[d12>50][d12<100][d23>120][d23<200] { /* 12-longueur - 23-largeur */
point-file: url('symbols/fr/sports-foot-us.svg');
point-ignore-placement: true;
[zoom>=14] { point-transform: "rotate([angle]+90) scale(0.0375)"; }
[zoom>=15] { point-transform: "rotate([angle]+90) scale(0.075)"; }
[zoom>=16] { point-transform: "rotate([angle]+90) scale(0.15)"; }
[zoom>=17] { point-transform: "rotate([angle]+90) scale(0.3)"; }
[zoom>=18] { point-transform: "rotate([angle]+90) scale(0.6)"; }
[zoom>=19] { point-transform: "rotate([angle]+90) scale(1.2)"; }
[zoom>=20] { point-transform: "rotate([angle]+90) scale(2.4)"; }
}
}
}
}
}
#ski [zoom >= 14] {
[ski_type='downhill'] {
line-width: 2;
line-clip: false;
line-smooth: 0.5;
[zoom >= 16] {line-width: 4; }
[zoom >= 18] {line-width: 8; }
[ski_difficulty = 'novice'] { line-color: green; }
[ski_difficulty = 'easy'] { line-color: blue; }
[ski_difficulty = 'intermediate'] { line-color: red; }
[ski_difficulty = 'advanced'] { line-color: black; }
line-color: grey;
text-name: "[name]";
text-placement: line;
text-face-name: @book-fonts;
text-halo-radius: 2;
}
}