@tileflow/core 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -9
- package/dist/index.d.ts +70 -9
- package/dist/index.js +3265 -219
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,2659 @@
|
|
|
1
|
-
//
|
|
1
|
+
// ../../apps/web/public/openmaptiles-osm-bright-style/style.json
|
|
2
|
+
var style_default = {
|
|
3
|
+
version: 8,
|
|
4
|
+
name: "Bright",
|
|
5
|
+
metadata: {
|
|
6
|
+
"mapbox:autocomposite": false,
|
|
7
|
+
"mapbox:groups": {
|
|
8
|
+
"1444849242106.713": { collapsed: false, name: "Places" },
|
|
9
|
+
"1444849334699.1902": { collapsed: true, name: "Bridges" },
|
|
10
|
+
"1444849345966.4436": { collapsed: false, name: "Roads" },
|
|
11
|
+
"1444849354174.1904": { collapsed: true, name: "Tunnels" },
|
|
12
|
+
"1444849364238.8171": { collapsed: false, name: "Buildings" },
|
|
13
|
+
"1444849382550.77": { collapsed: false, name: "Water" },
|
|
14
|
+
"1444849388993.3071": { collapsed: false, name: "Land" }
|
|
15
|
+
},
|
|
16
|
+
"mapbox:type": "template",
|
|
17
|
+
"openmaptiles:mapbox:owner": "openmaptiles",
|
|
18
|
+
"openmaptiles:mapbox:source:url": "mapbox://openmaptiles.4qljc88t",
|
|
19
|
+
"openmaptiles:version": "3.x"
|
|
20
|
+
},
|
|
21
|
+
center: [0, 0],
|
|
22
|
+
zoom: 1,
|
|
23
|
+
bearing: 0,
|
|
24
|
+
pitch: 0,
|
|
25
|
+
sources: {
|
|
26
|
+
openmaptiles: {
|
|
27
|
+
type: "vector",
|
|
28
|
+
url: "https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key={key}"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
sprite: "https://openmaptiles.github.io/osm-bright-gl-style/sprite",
|
|
32
|
+
glyphs: "https://api.maptiler.com/fonts/{fontstack}/{range}.pbf?key={key}",
|
|
33
|
+
layers: [
|
|
34
|
+
{
|
|
35
|
+
id: "background",
|
|
36
|
+
type: "background",
|
|
37
|
+
paint: { "background-color": "#f8f4f0" }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "landcover-glacier",
|
|
41
|
+
type: "fill",
|
|
42
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
43
|
+
source: "openmaptiles",
|
|
44
|
+
"source-layer": "landcover",
|
|
45
|
+
filter: ["==", "subclass", "glacier"],
|
|
46
|
+
layout: { visibility: "visible" },
|
|
47
|
+
paint: {
|
|
48
|
+
"fill-color": "#fff",
|
|
49
|
+
"fill-opacity": { base: 1, stops: [[0, 0.9], [10, 0.3]] }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "landuse-residential",
|
|
54
|
+
type: "fill",
|
|
55
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
56
|
+
source: "openmaptiles",
|
|
57
|
+
"source-layer": "landuse",
|
|
58
|
+
filter: [
|
|
59
|
+
"all",
|
|
60
|
+
["in", "class", "residential", "suburb", "neighbourhood"]
|
|
61
|
+
],
|
|
62
|
+
layout: { visibility: "visible" },
|
|
63
|
+
paint: {
|
|
64
|
+
"fill-color": {
|
|
65
|
+
base: 1,
|
|
66
|
+
stops: [
|
|
67
|
+
[12, "hsla(30, 19%, 90%, 0.4)"],
|
|
68
|
+
[16, "hsla(30, 19%, 90%, 0.2)"]
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "landuse-commercial",
|
|
75
|
+
type: "fill",
|
|
76
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
77
|
+
source: "openmaptiles",
|
|
78
|
+
"source-layer": "landuse",
|
|
79
|
+
filter: [
|
|
80
|
+
"all",
|
|
81
|
+
["==", "$type", "Polygon"],
|
|
82
|
+
["==", "class", "commercial"]
|
|
83
|
+
],
|
|
84
|
+
layout: { visibility: "visible" },
|
|
85
|
+
paint: { "fill-color": "hsla(0, 60%, 87%, 0.23)" }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "landuse-industrial",
|
|
89
|
+
type: "fill",
|
|
90
|
+
source: "openmaptiles",
|
|
91
|
+
"source-layer": "landuse",
|
|
92
|
+
filter: [
|
|
93
|
+
"all",
|
|
94
|
+
["==", "$type", "Polygon"],
|
|
95
|
+
["in", "class", "industrial", "garages", "dam"]
|
|
96
|
+
],
|
|
97
|
+
layout: { visibility: "visible" },
|
|
98
|
+
paint: { "fill-color": "hsla(49, 100%, 88%, 0.34)" }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "landuse-cemetery",
|
|
102
|
+
type: "fill",
|
|
103
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
104
|
+
source: "openmaptiles",
|
|
105
|
+
"source-layer": "landuse",
|
|
106
|
+
filter: ["==", "class", "cemetery"],
|
|
107
|
+
paint: { "fill-color": "#e0e4dd" }
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "landuse-hospital",
|
|
111
|
+
type: "fill",
|
|
112
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
113
|
+
source: "openmaptiles",
|
|
114
|
+
"source-layer": "landuse",
|
|
115
|
+
filter: ["==", "class", "hospital"],
|
|
116
|
+
paint: { "fill-color": "#fde" }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "landuse-school",
|
|
120
|
+
type: "fill",
|
|
121
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
122
|
+
source: "openmaptiles",
|
|
123
|
+
"source-layer": "landuse",
|
|
124
|
+
filter: ["==", "class", "school"],
|
|
125
|
+
paint: { "fill-color": "#f0e8f8" }
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "landuse-railway",
|
|
129
|
+
type: "fill",
|
|
130
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
131
|
+
source: "openmaptiles",
|
|
132
|
+
"source-layer": "landuse",
|
|
133
|
+
filter: ["==", "class", "railway"],
|
|
134
|
+
layout: { visibility: "visible" },
|
|
135
|
+
paint: { "fill-color": "hsla(30, 19%, 90%, 0.4)" }
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "landcover-wood",
|
|
139
|
+
type: "fill",
|
|
140
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
141
|
+
source: "openmaptiles",
|
|
142
|
+
"source-layer": "landcover",
|
|
143
|
+
filter: ["==", "class", "wood"],
|
|
144
|
+
paint: {
|
|
145
|
+
"fill-antialias": { base: 1, stops: [[0, false], [9, true]] },
|
|
146
|
+
"fill-color": "#6a4",
|
|
147
|
+
"fill-opacity": 0.1,
|
|
148
|
+
"fill-outline-color": "hsla(0, 0%, 0%, 0.03)"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: "landcover-grass",
|
|
153
|
+
type: "fill",
|
|
154
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
155
|
+
source: "openmaptiles",
|
|
156
|
+
"source-layer": "landcover",
|
|
157
|
+
filter: ["==", "class", "grass"],
|
|
158
|
+
paint: { "fill-color": "#d8e8c8", "fill-opacity": 1 }
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "landcover-grass-park",
|
|
162
|
+
type: "fill",
|
|
163
|
+
metadata: { "mapbox:group": "1444849388993.3071" },
|
|
164
|
+
source: "openmaptiles",
|
|
165
|
+
"source-layer": "park",
|
|
166
|
+
filter: ["==", "class", "public_park"],
|
|
167
|
+
paint: { "fill-color": "#d8e8c8", "fill-opacity": 0.8 }
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "waterway_tunnel",
|
|
171
|
+
type: "line",
|
|
172
|
+
source: "openmaptiles",
|
|
173
|
+
"source-layer": "waterway",
|
|
174
|
+
minzoom: 14,
|
|
175
|
+
filter: [
|
|
176
|
+
"all",
|
|
177
|
+
["in", "class", "river", "stream", "canal"],
|
|
178
|
+
["==", "brunnel", "tunnel"]
|
|
179
|
+
],
|
|
180
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
181
|
+
paint: {
|
|
182
|
+
"line-color": "#a0c8f0",
|
|
183
|
+
"line-dasharray": [2, 4],
|
|
184
|
+
"line-width": { base: 1.3, stops: [[13, 0.5], [20, 6]] }
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "waterway-other",
|
|
189
|
+
type: "line",
|
|
190
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
191
|
+
source: "openmaptiles",
|
|
192
|
+
"source-layer": "waterway",
|
|
193
|
+
filter: [
|
|
194
|
+
"all",
|
|
195
|
+
["!in", "class", "canal", "river", "stream"],
|
|
196
|
+
["==", "intermittent", 0]
|
|
197
|
+
],
|
|
198
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
199
|
+
paint: {
|
|
200
|
+
"line-color": "#a0c8f0",
|
|
201
|
+
"line-width": { base: 1.3, stops: [[13, 0.5], [20, 2]] }
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "waterway-other-intermittent",
|
|
206
|
+
type: "line",
|
|
207
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
208
|
+
source: "openmaptiles",
|
|
209
|
+
"source-layer": "waterway",
|
|
210
|
+
filter: [
|
|
211
|
+
"all",
|
|
212
|
+
["!in", "class", "canal", "river", "stream"],
|
|
213
|
+
["==", "intermittent", 1]
|
|
214
|
+
],
|
|
215
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
216
|
+
paint: {
|
|
217
|
+
"line-color": "#a0c8f0",
|
|
218
|
+
"line-dasharray": [4, 3],
|
|
219
|
+
"line-width": { base: 1.3, stops: [[13, 0.5], [20, 2]] }
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: "waterway-stream-canal",
|
|
224
|
+
type: "line",
|
|
225
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
226
|
+
source: "openmaptiles",
|
|
227
|
+
"source-layer": "waterway",
|
|
228
|
+
filter: [
|
|
229
|
+
"all",
|
|
230
|
+
["in", "class", "canal", "stream"],
|
|
231
|
+
["!=", "brunnel", "tunnel"],
|
|
232
|
+
["==", "intermittent", 0]
|
|
233
|
+
],
|
|
234
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
235
|
+
paint: {
|
|
236
|
+
"line-color": "#a0c8f0",
|
|
237
|
+
"line-width": { base: 1.3, stops: [[13, 0.5], [20, 6]] }
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: "waterway-stream-canal-intermittent",
|
|
242
|
+
type: "line",
|
|
243
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
244
|
+
source: "openmaptiles",
|
|
245
|
+
"source-layer": "waterway",
|
|
246
|
+
filter: [
|
|
247
|
+
"all",
|
|
248
|
+
["in", "class", "canal", "stream"],
|
|
249
|
+
["!=", "brunnel", "tunnel"],
|
|
250
|
+
["==", "intermittent", 1]
|
|
251
|
+
],
|
|
252
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
253
|
+
paint: {
|
|
254
|
+
"line-color": "#a0c8f0",
|
|
255
|
+
"line-dasharray": [4, 3],
|
|
256
|
+
"line-width": { base: 1.3, stops: [[13, 0.5], [20, 6]] }
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: "waterway-river",
|
|
261
|
+
type: "line",
|
|
262
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
263
|
+
source: "openmaptiles",
|
|
264
|
+
"source-layer": "waterway",
|
|
265
|
+
filter: [
|
|
266
|
+
"all",
|
|
267
|
+
["==", "class", "river"],
|
|
268
|
+
["!=", "brunnel", "tunnel"],
|
|
269
|
+
["==", "intermittent", 0]
|
|
270
|
+
],
|
|
271
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
272
|
+
paint: {
|
|
273
|
+
"line-color": "#a0c8f0",
|
|
274
|
+
"line-width": { base: 1.2, stops: [[10, 0.8], [20, 6]] }
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
id: "waterway-river-intermittent",
|
|
279
|
+
type: "line",
|
|
280
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
281
|
+
source: "openmaptiles",
|
|
282
|
+
"source-layer": "waterway",
|
|
283
|
+
filter: [
|
|
284
|
+
"all",
|
|
285
|
+
["==", "class", "river"],
|
|
286
|
+
["!=", "brunnel", "tunnel"],
|
|
287
|
+
["==", "intermittent", 1]
|
|
288
|
+
],
|
|
289
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
290
|
+
paint: {
|
|
291
|
+
"line-color": "#a0c8f0",
|
|
292
|
+
"line-dasharray": [3, 2.5],
|
|
293
|
+
"line-width": { base: 1.2, stops: [[10, 0.8], [20, 6]] }
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: "water-offset",
|
|
298
|
+
type: "fill",
|
|
299
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
300
|
+
source: "openmaptiles",
|
|
301
|
+
"source-layer": "water",
|
|
302
|
+
maxzoom: 8,
|
|
303
|
+
filter: ["==", "$type", "Polygon"],
|
|
304
|
+
layout: { visibility: "visible" },
|
|
305
|
+
paint: {
|
|
306
|
+
"fill-color": "#a0c8f0",
|
|
307
|
+
"fill-opacity": 1,
|
|
308
|
+
"fill-translate": { base: 1, stops: [[6, [2, 0]], [8, [0, 0]]] }
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: "water",
|
|
313
|
+
type: "fill",
|
|
314
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
315
|
+
source: "openmaptiles",
|
|
316
|
+
"source-layer": "water",
|
|
317
|
+
filter: ["all", ["!=", "intermittent", 1], ["!=", "brunnel", "tunnel"]],
|
|
318
|
+
layout: { visibility: "visible" },
|
|
319
|
+
paint: { "fill-color": "hsl(210, 67%, 85%)" }
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: "water-intermittent",
|
|
323
|
+
type: "fill",
|
|
324
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
325
|
+
source: "openmaptiles",
|
|
326
|
+
"source-layer": "water",
|
|
327
|
+
filter: ["all", ["==", "intermittent", 1]],
|
|
328
|
+
layout: { visibility: "visible" },
|
|
329
|
+
paint: { "fill-color": "hsl(210, 67%, 85%)", "fill-opacity": 0.7 }
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: "water-pattern",
|
|
333
|
+
type: "fill",
|
|
334
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
335
|
+
source: "openmaptiles",
|
|
336
|
+
"source-layer": "water",
|
|
337
|
+
filter: ["all"],
|
|
338
|
+
layout: { visibility: "visible" },
|
|
339
|
+
paint: { "fill-pattern": "wave", "fill-translate": [0, 2.5] }
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
id: "landcover-ice-shelf",
|
|
343
|
+
type: "fill",
|
|
344
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
345
|
+
source: "openmaptiles",
|
|
346
|
+
"source-layer": "landcover",
|
|
347
|
+
filter: ["==", "subclass", "ice_shelf"],
|
|
348
|
+
layout: { visibility: "visible" },
|
|
349
|
+
paint: {
|
|
350
|
+
"fill-color": "#fff",
|
|
351
|
+
"fill-opacity": { base: 1, stops: [[0, 0.9], [10, 0.3]] }
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
id: "landcover-sand",
|
|
356
|
+
type: "fill",
|
|
357
|
+
metadata: { "mapbox:group": "1444849382550.77" },
|
|
358
|
+
source: "openmaptiles",
|
|
359
|
+
"source-layer": "landcover",
|
|
360
|
+
filter: ["==", "class", "sand"],
|
|
361
|
+
layout: { visibility: "visible" },
|
|
362
|
+
paint: { "fill-color": "rgba(245, 238, 188, 1)", "fill-opacity": 1 }
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
id: "building",
|
|
366
|
+
type: "fill",
|
|
367
|
+
metadata: { "mapbox:group": "1444849364238.8171" },
|
|
368
|
+
source: "openmaptiles",
|
|
369
|
+
"source-layer": "building",
|
|
370
|
+
paint: {
|
|
371
|
+
"fill-antialias": true,
|
|
372
|
+
"fill-color": { base: 1, stops: [[15.5, "#f2eae2"], [16, "#dfdbd7"]] }
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
id: "building-top",
|
|
377
|
+
type: "fill",
|
|
378
|
+
metadata: { "mapbox:group": "1444849364238.8171" },
|
|
379
|
+
source: "openmaptiles",
|
|
380
|
+
"source-layer": "building",
|
|
381
|
+
layout: { visibility: "visible" },
|
|
382
|
+
paint: {
|
|
383
|
+
"fill-color": "#f2eae2",
|
|
384
|
+
"fill-opacity": { base: 1, stops: [[13, 0], [16, 1]] },
|
|
385
|
+
"fill-outline-color": "#dfdbd7",
|
|
386
|
+
"fill-translate": { base: 1, stops: [[14, [0, 0]], [16, [-2, -2]]] }
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
id: "tunnel-service-track-casing",
|
|
391
|
+
type: "line",
|
|
392
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
393
|
+
source: "openmaptiles",
|
|
394
|
+
"source-layer": "transportation",
|
|
395
|
+
filter: [
|
|
396
|
+
"all",
|
|
397
|
+
["==", "brunnel", "tunnel"],
|
|
398
|
+
["in", "class", "service", "track"]
|
|
399
|
+
],
|
|
400
|
+
layout: { "line-join": "round" },
|
|
401
|
+
paint: {
|
|
402
|
+
"line-color": "#cfcdca",
|
|
403
|
+
"line-dasharray": [0.5, 0.25],
|
|
404
|
+
"line-width": { base: 1.2, stops: [[15, 1], [16, 4], [20, 11]] }
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
id: "tunnel-motorway-link-casing",
|
|
409
|
+
type: "line",
|
|
410
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
411
|
+
source: "openmaptiles",
|
|
412
|
+
"source-layer": "transportation",
|
|
413
|
+
filter: [
|
|
414
|
+
"all",
|
|
415
|
+
["==", "brunnel", "tunnel"],
|
|
416
|
+
["==", "class", "motorway"],
|
|
417
|
+
["==", "ramp", 1]
|
|
418
|
+
],
|
|
419
|
+
layout: { "line-join": "round", visibility: "visible" },
|
|
420
|
+
paint: {
|
|
421
|
+
"line-color": "rgba(200, 147, 102, 1)",
|
|
422
|
+
"line-dasharray": [0.5, 0.25],
|
|
423
|
+
"line-width": {
|
|
424
|
+
base: 1.2,
|
|
425
|
+
stops: [[12, 1], [13, 3], [14, 4], [20, 15]]
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
id: "tunnel-minor-casing",
|
|
431
|
+
type: "line",
|
|
432
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
433
|
+
source: "openmaptiles",
|
|
434
|
+
"source-layer": "transportation",
|
|
435
|
+
filter: ["all", ["==", "brunnel", "tunnel"], ["==", "class", "minor"]],
|
|
436
|
+
layout: { "line-join": "round" },
|
|
437
|
+
paint: {
|
|
438
|
+
"line-color": "#cfcdca",
|
|
439
|
+
"line-opacity": { stops: [[12, 0], [12.5, 1]] },
|
|
440
|
+
"line-width": {
|
|
441
|
+
base: 1.2,
|
|
442
|
+
stops: [[12, 0.5], [13, 1], [14, 4], [20, 15]]
|
|
443
|
+
},
|
|
444
|
+
"line-dasharray": [0.5, 0.25]
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
id: "tunnel-link-casing",
|
|
449
|
+
type: "line",
|
|
450
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
451
|
+
source: "openmaptiles",
|
|
452
|
+
"source-layer": "transportation",
|
|
453
|
+
filter: [
|
|
454
|
+
"all",
|
|
455
|
+
["==", "brunnel", "tunnel"],
|
|
456
|
+
["in", "class", "trunk", "primary", "secondary", "tertiary"],
|
|
457
|
+
["==", "ramp", 1]
|
|
458
|
+
],
|
|
459
|
+
layout: { "line-join": "round" },
|
|
460
|
+
paint: {
|
|
461
|
+
"line-color": "#e9ac77",
|
|
462
|
+
"line-opacity": 1,
|
|
463
|
+
"line-width": {
|
|
464
|
+
base: 1.2,
|
|
465
|
+
stops: [[12, 1], [13, 3], [14, 4], [20, 15]]
|
|
466
|
+
},
|
|
467
|
+
"line-dasharray": [0.5, 0.25]
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
id: "tunnel-secondary-tertiary-casing",
|
|
472
|
+
type: "line",
|
|
473
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
474
|
+
source: "openmaptiles",
|
|
475
|
+
"source-layer": "transportation",
|
|
476
|
+
filter: [
|
|
477
|
+
"all",
|
|
478
|
+
["==", "brunnel", "tunnel"],
|
|
479
|
+
["in", "class", "secondary", "tertiary"],
|
|
480
|
+
["!=", "ramp", 1]
|
|
481
|
+
],
|
|
482
|
+
layout: { "line-join": "round" },
|
|
483
|
+
paint: {
|
|
484
|
+
"line-color": "#e9ac77",
|
|
485
|
+
"line-opacity": 1,
|
|
486
|
+
"line-width": { base: 1.2, stops: [[8, 1.5], [20, 17]] },
|
|
487
|
+
"line-dasharray": [0.5, 0.25]
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
id: "tunnel-trunk-primary-casing",
|
|
492
|
+
type: "line",
|
|
493
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
494
|
+
source: "openmaptiles",
|
|
495
|
+
"source-layer": "transportation",
|
|
496
|
+
filter: [
|
|
497
|
+
"all",
|
|
498
|
+
["==", "brunnel", "tunnel"],
|
|
499
|
+
["in", "class", "primary", "trunk"],
|
|
500
|
+
["!=", "ramp", 1]
|
|
501
|
+
],
|
|
502
|
+
layout: { "line-join": "round" },
|
|
503
|
+
paint: {
|
|
504
|
+
"line-color": "#e9ac77",
|
|
505
|
+
"line-width": {
|
|
506
|
+
base: 1.2,
|
|
507
|
+
stops: [[5, 0.4], [6, 0.6], [7, 1.5], [20, 22]]
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
id: "tunnel-motorway-casing",
|
|
513
|
+
type: "line",
|
|
514
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
515
|
+
source: "openmaptiles",
|
|
516
|
+
"source-layer": "transportation",
|
|
517
|
+
filter: [
|
|
518
|
+
"all",
|
|
519
|
+
["==", "brunnel", "tunnel"],
|
|
520
|
+
["==", "class", "motorway"],
|
|
521
|
+
["!=", "ramp", 1]
|
|
522
|
+
],
|
|
523
|
+
layout: { "line-join": "round", visibility: "visible" },
|
|
524
|
+
paint: {
|
|
525
|
+
"line-color": "#e9ac77",
|
|
526
|
+
"line-dasharray": [0.5, 0.25],
|
|
527
|
+
"line-width": {
|
|
528
|
+
base: 1.2,
|
|
529
|
+
stops: [[5, 0.4], [6, 0.6], [7, 1.5], [20, 22]]
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
id: "tunnel-path-steps-casing",
|
|
535
|
+
type: "line",
|
|
536
|
+
source: "openmaptiles",
|
|
537
|
+
"source-layer": "transportation",
|
|
538
|
+
filter: [
|
|
539
|
+
"all",
|
|
540
|
+
["==", "$type", "LineString"],
|
|
541
|
+
["==", "brunnel", "tunnel"],
|
|
542
|
+
["==", "class", "path"],
|
|
543
|
+
["==", "subclass", "steps"]
|
|
544
|
+
],
|
|
545
|
+
layout: { "line-cap": "butt", "line-join": "round" },
|
|
546
|
+
paint: {
|
|
547
|
+
"line-color": "#cfcdca",
|
|
548
|
+
"line-opacity": { stops: [[12, 0], [12.5, 1]] },
|
|
549
|
+
"line-width": {
|
|
550
|
+
base: 1.2,
|
|
551
|
+
stops: [[12, 0.5], [13, 1], [14, 2], [20, 9.25]]
|
|
552
|
+
},
|
|
553
|
+
"line-dasharray": [0.5, 0.25]
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
id: "tunnel-path-steps",
|
|
558
|
+
type: "line",
|
|
559
|
+
source: "openmaptiles",
|
|
560
|
+
"source-layer": "transportation",
|
|
561
|
+
filter: [
|
|
562
|
+
"all",
|
|
563
|
+
["==", "$type", "LineString"],
|
|
564
|
+
["==", "brunnel", "tunnel"],
|
|
565
|
+
["==", "class", "path"],
|
|
566
|
+
["==", "subclass", "steps"]
|
|
567
|
+
],
|
|
568
|
+
layout: { "line-join": "bevel", "line-cap": "butt" },
|
|
569
|
+
paint: {
|
|
570
|
+
"line-color": "#fff",
|
|
571
|
+
"line-opacity": 1,
|
|
572
|
+
"line-width": {
|
|
573
|
+
base: 1.2,
|
|
574
|
+
stops: [[13.5, 0], [14, 1.25], [20, 5.75]]
|
|
575
|
+
},
|
|
576
|
+
"line-dasharray": [0.5, 0.25]
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
id: "tunnel-path",
|
|
581
|
+
type: "line",
|
|
582
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
583
|
+
source: "openmaptiles",
|
|
584
|
+
"source-layer": "transportation",
|
|
585
|
+
filter: [
|
|
586
|
+
"all",
|
|
587
|
+
["==", "$type", "LineString"],
|
|
588
|
+
["==", "brunnel", "tunnel"],
|
|
589
|
+
["==", "class", "path"],
|
|
590
|
+
["!=", "subclass", "steps"]
|
|
591
|
+
],
|
|
592
|
+
paint: {
|
|
593
|
+
"line-color": "#cba",
|
|
594
|
+
"line-dasharray": [1.5, 0.75],
|
|
595
|
+
"line-width": { base: 1.2, stops: [[15, 1.2], [20, 4]] }
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
id: "tunnel-motorway-link",
|
|
600
|
+
type: "line",
|
|
601
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
602
|
+
source: "openmaptiles",
|
|
603
|
+
"source-layer": "transportation",
|
|
604
|
+
filter: [
|
|
605
|
+
"all",
|
|
606
|
+
["==", "brunnel", "tunnel"],
|
|
607
|
+
["==", "class", "motorway"],
|
|
608
|
+
["==", "ramp", 1]
|
|
609
|
+
],
|
|
610
|
+
layout: { "line-join": "round", visibility: "visible" },
|
|
611
|
+
paint: {
|
|
612
|
+
"line-color": "rgba(244, 209, 158, 1)",
|
|
613
|
+
"line-width": {
|
|
614
|
+
base: 1.2,
|
|
615
|
+
stops: [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]]
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
id: "tunnel-service-track",
|
|
621
|
+
type: "line",
|
|
622
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
623
|
+
source: "openmaptiles",
|
|
624
|
+
"source-layer": "transportation",
|
|
625
|
+
filter: [
|
|
626
|
+
"all",
|
|
627
|
+
["==", "brunnel", "tunnel"],
|
|
628
|
+
["in", "class", "service", "track"]
|
|
629
|
+
],
|
|
630
|
+
layout: { "line-join": "round" },
|
|
631
|
+
paint: {
|
|
632
|
+
"line-color": "#fff",
|
|
633
|
+
"line-width": { base: 1.2, stops: [[15.5, 0], [16, 2], [20, 7.5]] }
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
id: "tunnel-link",
|
|
638
|
+
type: "line",
|
|
639
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
640
|
+
source: "openmaptiles",
|
|
641
|
+
"source-layer": "transportation",
|
|
642
|
+
filter: [
|
|
643
|
+
"all",
|
|
644
|
+
["==", "brunnel", "tunnel"],
|
|
645
|
+
["in", "class", "trunk", "primary", "secondary", "tertiary"],
|
|
646
|
+
["==", "ramp", 1]
|
|
647
|
+
],
|
|
648
|
+
layout: { "line-join": "round" },
|
|
649
|
+
paint: {
|
|
650
|
+
"line-color": "#fff4c6",
|
|
651
|
+
"line-width": {
|
|
652
|
+
base: 1.2,
|
|
653
|
+
stops: [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]]
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
id: "tunnel-minor",
|
|
659
|
+
type: "line",
|
|
660
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
661
|
+
source: "openmaptiles",
|
|
662
|
+
"source-layer": "transportation",
|
|
663
|
+
filter: ["all", ["==", "brunnel", "tunnel"], ["==", "class", "minor"]],
|
|
664
|
+
layout: { "line-join": "round" },
|
|
665
|
+
paint: {
|
|
666
|
+
"line-color": "#fff",
|
|
667
|
+
"line-opacity": 1,
|
|
668
|
+
"line-width": { base: 1.2, stops: [[13.5, 0], [14, 2.5], [20, 11.5]] }
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
id: "tunnel-secondary-tertiary",
|
|
673
|
+
type: "line",
|
|
674
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
675
|
+
source: "openmaptiles",
|
|
676
|
+
"source-layer": "transportation",
|
|
677
|
+
filter: [
|
|
678
|
+
"all",
|
|
679
|
+
["==", "brunnel", "tunnel"],
|
|
680
|
+
["in", "class", "secondary", "tertiary"],
|
|
681
|
+
["!=", "ramp", 1]
|
|
682
|
+
],
|
|
683
|
+
layout: { "line-join": "round" },
|
|
684
|
+
paint: {
|
|
685
|
+
"line-color": "#fff4c6",
|
|
686
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 10]] }
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
id: "tunnel-trunk-primary",
|
|
691
|
+
type: "line",
|
|
692
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
693
|
+
source: "openmaptiles",
|
|
694
|
+
"source-layer": "transportation",
|
|
695
|
+
filter: [
|
|
696
|
+
"all",
|
|
697
|
+
["==", "brunnel", "tunnel"],
|
|
698
|
+
["in", "class", "primary", "trunk"],
|
|
699
|
+
["!=", "ramp", 1]
|
|
700
|
+
],
|
|
701
|
+
layout: { "line-join": "round" },
|
|
702
|
+
paint: {
|
|
703
|
+
"line-color": "#fff4c6",
|
|
704
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 18]] }
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
id: "tunnel-motorway",
|
|
709
|
+
type: "line",
|
|
710
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
711
|
+
source: "openmaptiles",
|
|
712
|
+
"source-layer": "transportation",
|
|
713
|
+
filter: [
|
|
714
|
+
"all",
|
|
715
|
+
["==", "brunnel", "tunnel"],
|
|
716
|
+
["==", "class", "motorway"],
|
|
717
|
+
["!=", "ramp", 1]
|
|
718
|
+
],
|
|
719
|
+
layout: { "line-join": "round", visibility: "visible" },
|
|
720
|
+
paint: {
|
|
721
|
+
"line-color": "#ffdaa6",
|
|
722
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 18]] }
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
id: "tunnel-railway",
|
|
727
|
+
type: "line",
|
|
728
|
+
metadata: { "mapbox:group": "1444849354174.1904" },
|
|
729
|
+
source: "openmaptiles",
|
|
730
|
+
"source-layer": "transportation",
|
|
731
|
+
filter: ["all", ["==", "brunnel", "tunnel"], ["==", "class", "rail"]],
|
|
732
|
+
paint: {
|
|
733
|
+
"line-color": "#bbb",
|
|
734
|
+
"line-dasharray": [2, 2],
|
|
735
|
+
"line-width": { base: 1.4, stops: [[14, 0.4], [15, 0.75], [20, 2]] }
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
id: "ferry",
|
|
740
|
+
type: "line",
|
|
741
|
+
source: "openmaptiles",
|
|
742
|
+
"source-layer": "transportation",
|
|
743
|
+
filter: ["all", ["in", "class", "ferry"]],
|
|
744
|
+
layout: { "line-join": "round", visibility: "visible" },
|
|
745
|
+
paint: {
|
|
746
|
+
"line-color": "rgba(108, 159, 182, 1)",
|
|
747
|
+
"line-dasharray": [2, 2],
|
|
748
|
+
"line-width": 1.1
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
id: "aeroway-taxiway-casing",
|
|
753
|
+
type: "line",
|
|
754
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
755
|
+
source: "openmaptiles",
|
|
756
|
+
"source-layer": "aeroway",
|
|
757
|
+
minzoom: 12,
|
|
758
|
+
filter: ["all", ["in", "class", "taxiway"]],
|
|
759
|
+
layout: {
|
|
760
|
+
"line-cap": "round",
|
|
761
|
+
"line-join": "round",
|
|
762
|
+
visibility: "visible"
|
|
763
|
+
},
|
|
764
|
+
paint: {
|
|
765
|
+
"line-color": "rgba(153, 153, 153, 1)",
|
|
766
|
+
"line-opacity": 1,
|
|
767
|
+
"line-width": { base: 1.5, stops: [[11, 2], [17, 12]] }
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
id: "aeroway-runway-casing",
|
|
772
|
+
type: "line",
|
|
773
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
774
|
+
source: "openmaptiles",
|
|
775
|
+
"source-layer": "aeroway",
|
|
776
|
+
minzoom: 12,
|
|
777
|
+
filter: ["all", ["in", "class", "runway"]],
|
|
778
|
+
layout: {
|
|
779
|
+
"line-cap": "round",
|
|
780
|
+
"line-join": "round",
|
|
781
|
+
visibility: "visible"
|
|
782
|
+
},
|
|
783
|
+
paint: {
|
|
784
|
+
"line-color": "rgba(153, 153, 153, 1)",
|
|
785
|
+
"line-opacity": 1,
|
|
786
|
+
"line-width": { base: 1.5, stops: [[11, 5], [17, 55]] }
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
id: "aeroway-area",
|
|
791
|
+
type: "fill",
|
|
792
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
793
|
+
source: "openmaptiles",
|
|
794
|
+
"source-layer": "aeroway",
|
|
795
|
+
minzoom: 4,
|
|
796
|
+
filter: [
|
|
797
|
+
"all",
|
|
798
|
+
["==", "$type", "Polygon"],
|
|
799
|
+
["in", "class", "runway", "taxiway"]
|
|
800
|
+
],
|
|
801
|
+
layout: { visibility: "visible" },
|
|
802
|
+
paint: {
|
|
803
|
+
"fill-color": "rgba(255, 255, 255, 1)",
|
|
804
|
+
"fill-opacity": { base: 1, stops: [[13, 0], [14, 1]] }
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
id: "aeroway-taxiway",
|
|
809
|
+
type: "line",
|
|
810
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
811
|
+
source: "openmaptiles",
|
|
812
|
+
"source-layer": "aeroway",
|
|
813
|
+
minzoom: 4,
|
|
814
|
+
filter: [
|
|
815
|
+
"all",
|
|
816
|
+
["in", "class", "taxiway"],
|
|
817
|
+
["==", "$type", "LineString"]
|
|
818
|
+
],
|
|
819
|
+
layout: {
|
|
820
|
+
"line-cap": "round",
|
|
821
|
+
"line-join": "round",
|
|
822
|
+
visibility: "visible"
|
|
823
|
+
},
|
|
824
|
+
paint: {
|
|
825
|
+
"line-color": "rgba(255, 255, 255, 1)",
|
|
826
|
+
"line-opacity": { base: 1, stops: [[11, 0], [12, 1]] },
|
|
827
|
+
"line-width": { base: 1.5, stops: [[11, 1], [17, 10]] }
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
id: "aeroway-runway",
|
|
832
|
+
type: "line",
|
|
833
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
834
|
+
source: "openmaptiles",
|
|
835
|
+
"source-layer": "aeroway",
|
|
836
|
+
minzoom: 4,
|
|
837
|
+
filter: [
|
|
838
|
+
"all",
|
|
839
|
+
["in", "class", "runway"],
|
|
840
|
+
["==", "$type", "LineString"]
|
|
841
|
+
],
|
|
842
|
+
layout: {
|
|
843
|
+
"line-cap": "round",
|
|
844
|
+
"line-join": "round",
|
|
845
|
+
visibility: "visible"
|
|
846
|
+
},
|
|
847
|
+
paint: {
|
|
848
|
+
"line-color": "rgba(255, 255, 255, 1)",
|
|
849
|
+
"line-opacity": { base: 1, stops: [[11, 0], [12, 1]] },
|
|
850
|
+
"line-width": { base: 1.5, stops: [[11, 4], [17, 50]] }
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
id: "road_area_pier",
|
|
855
|
+
type: "fill",
|
|
856
|
+
metadata: {},
|
|
857
|
+
source: "openmaptiles",
|
|
858
|
+
"source-layer": "transportation",
|
|
859
|
+
filter: ["all", ["==", "$type", "Polygon"], ["==", "class", "pier"]],
|
|
860
|
+
layout: { visibility: "visible" },
|
|
861
|
+
paint: { "fill-antialias": true, "fill-color": "#f8f4f0" }
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
id: "road_pier",
|
|
865
|
+
type: "line",
|
|
866
|
+
metadata: {},
|
|
867
|
+
source: "openmaptiles",
|
|
868
|
+
"source-layer": "transportation",
|
|
869
|
+
filter: ["all", ["==", "$type", "LineString"], ["in", "class", "pier"]],
|
|
870
|
+
layout: { "line-cap": "round", "line-join": "round" },
|
|
871
|
+
paint: {
|
|
872
|
+
"line-color": "#f8f4f0",
|
|
873
|
+
"line-width": { base: 1.2, stops: [[15, 1], [17, 4]] }
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
id: "highway-area",
|
|
878
|
+
type: "fill",
|
|
879
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
880
|
+
source: "openmaptiles",
|
|
881
|
+
"source-layer": "transportation",
|
|
882
|
+
filter: ["all", ["==", "$type", "Polygon"], ["!in", "class", "pier"]],
|
|
883
|
+
layout: { visibility: "visible" },
|
|
884
|
+
paint: {
|
|
885
|
+
"fill-antialias": false,
|
|
886
|
+
"fill-color": "hsla(0, 0%, 89%, 0.56)",
|
|
887
|
+
"fill-opacity": 0.9,
|
|
888
|
+
"fill-outline-color": "#cfcdca"
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
id: "highway-path-steps-casing",
|
|
893
|
+
type: "line",
|
|
894
|
+
source: "openmaptiles",
|
|
895
|
+
"source-layer": "transportation",
|
|
896
|
+
filter: [
|
|
897
|
+
"all",
|
|
898
|
+
["==", "$type", "LineString"],
|
|
899
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
900
|
+
["==", "class", "path"],
|
|
901
|
+
["in", "subclass", "steps"]
|
|
902
|
+
],
|
|
903
|
+
layout: { "line-cap": "butt", "line-join": "round" },
|
|
904
|
+
paint: {
|
|
905
|
+
"line-color": "#cfcdca",
|
|
906
|
+
"line-opacity": { stops: [[12, 0], [12.5, 1]] },
|
|
907
|
+
"line-width": {
|
|
908
|
+
base: 1.2,
|
|
909
|
+
stops: [[12, 0.5], [13, 1], [14, 2], [20, 9.25]]
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
id: "highway-motorway-link-casing",
|
|
915
|
+
type: "line",
|
|
916
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
917
|
+
source: "openmaptiles",
|
|
918
|
+
"source-layer": "transportation",
|
|
919
|
+
minzoom: 12,
|
|
920
|
+
filter: [
|
|
921
|
+
"all",
|
|
922
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
923
|
+
["==", "class", "motorway"],
|
|
924
|
+
["==", "ramp", 1]
|
|
925
|
+
],
|
|
926
|
+
layout: { "line-cap": "round", "line-join": "round" },
|
|
927
|
+
paint: {
|
|
928
|
+
"line-color": "#e9ac77",
|
|
929
|
+
"line-opacity": 1,
|
|
930
|
+
"line-width": {
|
|
931
|
+
base: 1.2,
|
|
932
|
+
stops: [[12, 1], [13, 3], [14, 4], [20, 15]]
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
id: "highway-link-casing",
|
|
938
|
+
type: "line",
|
|
939
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
940
|
+
source: "openmaptiles",
|
|
941
|
+
"source-layer": "transportation",
|
|
942
|
+
minzoom: 13,
|
|
943
|
+
filter: [
|
|
944
|
+
"all",
|
|
945
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
946
|
+
["in", "class", "trunk", "primary", "secondary", "tertiary"],
|
|
947
|
+
["==", "ramp", 1]
|
|
948
|
+
],
|
|
949
|
+
layout: {
|
|
950
|
+
"line-cap": "round",
|
|
951
|
+
"line-join": "round",
|
|
952
|
+
visibility: "visible"
|
|
953
|
+
},
|
|
954
|
+
paint: {
|
|
955
|
+
"line-color": "#e9ac77",
|
|
956
|
+
"line-opacity": 1,
|
|
957
|
+
"line-width": {
|
|
958
|
+
base: 1.2,
|
|
959
|
+
stops: [[12, 1], [13, 3], [14, 4], [20, 15]]
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
id: "highway-minor-casing",
|
|
965
|
+
type: "line",
|
|
966
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
967
|
+
source: "openmaptiles",
|
|
968
|
+
"source-layer": "transportation",
|
|
969
|
+
filter: [
|
|
970
|
+
"all",
|
|
971
|
+
["==", "$type", "LineString"],
|
|
972
|
+
["!=", "brunnel", "tunnel"],
|
|
973
|
+
["in", "class", "minor", "service", "track"]
|
|
974
|
+
],
|
|
975
|
+
layout: { "line-cap": "round", "line-join": "round" },
|
|
976
|
+
paint: {
|
|
977
|
+
"line-color": "#cfcdca",
|
|
978
|
+
"line-opacity": { stops: [[12, 0], [12.5, 1]] },
|
|
979
|
+
"line-width": {
|
|
980
|
+
base: 1.2,
|
|
981
|
+
stops: [[12, 0.5], [13, 1], [14, 4], [20, 15]]
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
id: "highway-secondary-tertiary-casing",
|
|
987
|
+
type: "line",
|
|
988
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
989
|
+
source: "openmaptiles",
|
|
990
|
+
"source-layer": "transportation",
|
|
991
|
+
filter: [
|
|
992
|
+
"all",
|
|
993
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
994
|
+
["in", "class", "secondary", "tertiary"],
|
|
995
|
+
["!=", "ramp", 1]
|
|
996
|
+
],
|
|
997
|
+
layout: {
|
|
998
|
+
"line-cap": "butt",
|
|
999
|
+
"line-join": "round",
|
|
1000
|
+
visibility: "visible"
|
|
1001
|
+
},
|
|
1002
|
+
paint: {
|
|
1003
|
+
"line-color": "#e9ac77",
|
|
1004
|
+
"line-opacity": 1,
|
|
1005
|
+
"line-width": { base: 1.2, stops: [[8, 1.5], [20, 17]] }
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
id: "highway-primary-casing",
|
|
1010
|
+
type: "line",
|
|
1011
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1012
|
+
source: "openmaptiles",
|
|
1013
|
+
"source-layer": "transportation",
|
|
1014
|
+
minzoom: 5,
|
|
1015
|
+
filter: [
|
|
1016
|
+
"all",
|
|
1017
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1018
|
+
["in", "class", "primary"],
|
|
1019
|
+
["!=", "ramp", 1]
|
|
1020
|
+
],
|
|
1021
|
+
layout: {
|
|
1022
|
+
"line-cap": "butt",
|
|
1023
|
+
"line-join": "round",
|
|
1024
|
+
visibility: "visible"
|
|
1025
|
+
},
|
|
1026
|
+
paint: {
|
|
1027
|
+
"line-color": "#e9ac77",
|
|
1028
|
+
"line-opacity": { stops: [[7, 0], [8, 1]] },
|
|
1029
|
+
"line-width": {
|
|
1030
|
+
base: 1.2,
|
|
1031
|
+
stops: [[7, 0], [8, 0.6], [9, 1.5], [20, 22]]
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
id: "highway-trunk-casing",
|
|
1037
|
+
type: "line",
|
|
1038
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1039
|
+
source: "openmaptiles",
|
|
1040
|
+
"source-layer": "transportation",
|
|
1041
|
+
minzoom: 5,
|
|
1042
|
+
filter: [
|
|
1043
|
+
"all",
|
|
1044
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1045
|
+
["in", "class", "trunk"],
|
|
1046
|
+
["!=", "ramp", 1]
|
|
1047
|
+
],
|
|
1048
|
+
layout: {
|
|
1049
|
+
"line-cap": "butt",
|
|
1050
|
+
"line-join": "round",
|
|
1051
|
+
visibility: "visible"
|
|
1052
|
+
},
|
|
1053
|
+
paint: {
|
|
1054
|
+
"line-color": "#e9ac77",
|
|
1055
|
+
"line-opacity": { stops: [[5, 0], [6, 1]] },
|
|
1056
|
+
"line-width": {
|
|
1057
|
+
base: 1.2,
|
|
1058
|
+
stops: [[5, 0], [6, 0.6], [7, 1.5], [20, 22]]
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
id: "highway-motorway-casing",
|
|
1064
|
+
type: "line",
|
|
1065
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1066
|
+
source: "openmaptiles",
|
|
1067
|
+
"source-layer": "transportation",
|
|
1068
|
+
minzoom: 4,
|
|
1069
|
+
filter: [
|
|
1070
|
+
"all",
|
|
1071
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1072
|
+
["==", "class", "motorway"],
|
|
1073
|
+
["!=", "ramp", 1]
|
|
1074
|
+
],
|
|
1075
|
+
layout: {
|
|
1076
|
+
"line-cap": "butt",
|
|
1077
|
+
"line-join": "round",
|
|
1078
|
+
visibility: "visible"
|
|
1079
|
+
},
|
|
1080
|
+
paint: {
|
|
1081
|
+
"line-color": "#e9ac77",
|
|
1082
|
+
"line-opacity": { stops: [[4, 0], [5, 1]] },
|
|
1083
|
+
"line-width": {
|
|
1084
|
+
base: 1.2,
|
|
1085
|
+
stops: [[4, 0], [5, 0.4], [6, 0.6], [7, 1.5], [20, 22]]
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
id: "highway-path",
|
|
1091
|
+
type: "line",
|
|
1092
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1093
|
+
source: "openmaptiles",
|
|
1094
|
+
"source-layer": "transportation",
|
|
1095
|
+
filter: [
|
|
1096
|
+
"all",
|
|
1097
|
+
["==", "$type", "LineString"],
|
|
1098
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1099
|
+
["==", "class", "path"],
|
|
1100
|
+
["!=", "subclass", "steps"]
|
|
1101
|
+
],
|
|
1102
|
+
paint: {
|
|
1103
|
+
"line-color": "#cba",
|
|
1104
|
+
"line-dasharray": [1.5, 0.75],
|
|
1105
|
+
"line-width": { base: 1.2, stops: [[15, 1.2], [20, 4]] }
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
id: "highway-path-steps",
|
|
1110
|
+
type: "line",
|
|
1111
|
+
source: "openmaptiles",
|
|
1112
|
+
"source-layer": "transportation",
|
|
1113
|
+
filter: [
|
|
1114
|
+
"all",
|
|
1115
|
+
["==", "$type", "LineString"],
|
|
1116
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1117
|
+
["==", "class", "path"],
|
|
1118
|
+
["==", "subclass", "steps"]
|
|
1119
|
+
],
|
|
1120
|
+
layout: { "line-join": "bevel", "line-cap": "butt" },
|
|
1121
|
+
paint: {
|
|
1122
|
+
"line-color": "#fff",
|
|
1123
|
+
"line-opacity": 1,
|
|
1124
|
+
"line-width": {
|
|
1125
|
+
base: 1.2,
|
|
1126
|
+
stops: [[13.5, 0], [14, 1.25], [20, 5.75]]
|
|
1127
|
+
},
|
|
1128
|
+
"line-dasharray": [0.5, 0.25]
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
id: "highway-motorway-link",
|
|
1133
|
+
type: "line",
|
|
1134
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1135
|
+
source: "openmaptiles",
|
|
1136
|
+
"source-layer": "transportation",
|
|
1137
|
+
minzoom: 12,
|
|
1138
|
+
filter: [
|
|
1139
|
+
"all",
|
|
1140
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1141
|
+
["==", "class", "motorway"],
|
|
1142
|
+
["==", "ramp", 1]
|
|
1143
|
+
],
|
|
1144
|
+
layout: { "line-cap": "round", "line-join": "round" },
|
|
1145
|
+
paint: {
|
|
1146
|
+
"line-color": "#fc8",
|
|
1147
|
+
"line-width": {
|
|
1148
|
+
base: 1.2,
|
|
1149
|
+
stops: [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]]
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
id: "highway-link",
|
|
1155
|
+
type: "line",
|
|
1156
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1157
|
+
source: "openmaptiles",
|
|
1158
|
+
"source-layer": "transportation",
|
|
1159
|
+
minzoom: 13,
|
|
1160
|
+
filter: [
|
|
1161
|
+
"all",
|
|
1162
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1163
|
+
["in", "class", "trunk", "primary", "secondary", "tertiary"],
|
|
1164
|
+
["==", "ramp", 1]
|
|
1165
|
+
],
|
|
1166
|
+
layout: {
|
|
1167
|
+
"line-cap": "round",
|
|
1168
|
+
"line-join": "round",
|
|
1169
|
+
visibility: "visible"
|
|
1170
|
+
},
|
|
1171
|
+
paint: {
|
|
1172
|
+
"line-color": "#fea",
|
|
1173
|
+
"line-width": {
|
|
1174
|
+
base: 1.2,
|
|
1175
|
+
stops: [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]]
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
id: "highway-minor",
|
|
1181
|
+
type: "line",
|
|
1182
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1183
|
+
source: "openmaptiles",
|
|
1184
|
+
"source-layer": "transportation",
|
|
1185
|
+
filter: [
|
|
1186
|
+
"all",
|
|
1187
|
+
["==", "$type", "LineString"],
|
|
1188
|
+
["!=", "brunnel", "tunnel"],
|
|
1189
|
+
["in", "class", "minor", "service", "track"]
|
|
1190
|
+
],
|
|
1191
|
+
layout: { "line-cap": "round", "line-join": "round" },
|
|
1192
|
+
paint: {
|
|
1193
|
+
"line-color": "#fff",
|
|
1194
|
+
"line-opacity": 1,
|
|
1195
|
+
"line-width": { base: 1.2, stops: [[13.5, 0], [14, 2.5], [20, 11.5]] }
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
id: "highway-secondary-tertiary",
|
|
1200
|
+
type: "line",
|
|
1201
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1202
|
+
source: "openmaptiles",
|
|
1203
|
+
"source-layer": "transportation",
|
|
1204
|
+
filter: [
|
|
1205
|
+
"all",
|
|
1206
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1207
|
+
["in", "class", "secondary", "tertiary"],
|
|
1208
|
+
["!=", "ramp", 1]
|
|
1209
|
+
],
|
|
1210
|
+
layout: {
|
|
1211
|
+
"line-cap": "round",
|
|
1212
|
+
"line-join": "round",
|
|
1213
|
+
visibility: "visible"
|
|
1214
|
+
},
|
|
1215
|
+
paint: {
|
|
1216
|
+
"line-color": "#fea",
|
|
1217
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [8, 0.5], [20, 13]] }
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
id: "highway-primary",
|
|
1222
|
+
type: "line",
|
|
1223
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1224
|
+
source: "openmaptiles",
|
|
1225
|
+
"source-layer": "transportation",
|
|
1226
|
+
filter: [
|
|
1227
|
+
"all",
|
|
1228
|
+
["==", "$type", "LineString"],
|
|
1229
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1230
|
+
["in", "class", "primary"],
|
|
1231
|
+
["!=", "ramp", 1]
|
|
1232
|
+
],
|
|
1233
|
+
layout: {
|
|
1234
|
+
"line-cap": "round",
|
|
1235
|
+
"line-join": "round",
|
|
1236
|
+
visibility: "visible"
|
|
1237
|
+
},
|
|
1238
|
+
paint: {
|
|
1239
|
+
"line-color": "#fea",
|
|
1240
|
+
"line-width": { base: 1.2, stops: [[8.5, 0], [9, 0.5], [20, 18]] }
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
id: "highway-trunk",
|
|
1245
|
+
type: "line",
|
|
1246
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1247
|
+
source: "openmaptiles",
|
|
1248
|
+
"source-layer": "transportation",
|
|
1249
|
+
filter: [
|
|
1250
|
+
"all",
|
|
1251
|
+
["==", "$type", "LineString"],
|
|
1252
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1253
|
+
["in", "class", "trunk"],
|
|
1254
|
+
["!=", "ramp", 1]
|
|
1255
|
+
],
|
|
1256
|
+
layout: {
|
|
1257
|
+
"line-cap": "round",
|
|
1258
|
+
"line-join": "round",
|
|
1259
|
+
visibility: "visible"
|
|
1260
|
+
},
|
|
1261
|
+
paint: {
|
|
1262
|
+
"line-color": "#fea",
|
|
1263
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 18]] }
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
id: "highway-motorway",
|
|
1268
|
+
type: "line",
|
|
1269
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1270
|
+
source: "openmaptiles",
|
|
1271
|
+
"source-layer": "transportation",
|
|
1272
|
+
minzoom: 5,
|
|
1273
|
+
filter: [
|
|
1274
|
+
"all",
|
|
1275
|
+
["==", "$type", "LineString"],
|
|
1276
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1277
|
+
["==", "class", "motorway"],
|
|
1278
|
+
["!=", "ramp", 1]
|
|
1279
|
+
],
|
|
1280
|
+
layout: {
|
|
1281
|
+
"line-cap": "round",
|
|
1282
|
+
"line-join": "round",
|
|
1283
|
+
visibility: "visible"
|
|
1284
|
+
},
|
|
1285
|
+
paint: {
|
|
1286
|
+
"line-color": "#fc8",
|
|
1287
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 18]] }
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
id: "railway-transit",
|
|
1292
|
+
type: "line",
|
|
1293
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1294
|
+
source: "openmaptiles",
|
|
1295
|
+
"source-layer": "transportation",
|
|
1296
|
+
filter: [
|
|
1297
|
+
"all",
|
|
1298
|
+
["==", "$type", "LineString"],
|
|
1299
|
+
["==", "class", "transit"],
|
|
1300
|
+
["!in", "brunnel", "tunnel"]
|
|
1301
|
+
],
|
|
1302
|
+
layout: { visibility: "visible" },
|
|
1303
|
+
paint: {
|
|
1304
|
+
"line-color": "hsla(0, 0%, 73%, 0.77)",
|
|
1305
|
+
"line-width": { base: 1.4, stops: [[14, 0.4], [20, 1]] }
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
id: "railway-transit-hatching",
|
|
1310
|
+
type: "line",
|
|
1311
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1312
|
+
source: "openmaptiles",
|
|
1313
|
+
"source-layer": "transportation",
|
|
1314
|
+
filter: [
|
|
1315
|
+
"all",
|
|
1316
|
+
["==", "$type", "LineString"],
|
|
1317
|
+
["==", "class", "transit"],
|
|
1318
|
+
["!in", "brunnel", "tunnel"]
|
|
1319
|
+
],
|
|
1320
|
+
layout: { visibility: "visible" },
|
|
1321
|
+
paint: {
|
|
1322
|
+
"line-color": "hsla(0, 0%, 73%, 0.68)",
|
|
1323
|
+
"line-dasharray": [0.2, 8],
|
|
1324
|
+
"line-width": { base: 1.4, stops: [[14.5, 0], [15, 2], [20, 6]] }
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
id: "railway-service",
|
|
1329
|
+
type: "line",
|
|
1330
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1331
|
+
source: "openmaptiles",
|
|
1332
|
+
"source-layer": "transportation",
|
|
1333
|
+
filter: [
|
|
1334
|
+
"all",
|
|
1335
|
+
["==", "$type", "LineString"],
|
|
1336
|
+
["==", "class", "rail"],
|
|
1337
|
+
["has", "service"]
|
|
1338
|
+
],
|
|
1339
|
+
paint: {
|
|
1340
|
+
"line-color": "hsla(0, 0%, 73%, 0.77)",
|
|
1341
|
+
"line-width": { base: 1.4, stops: [[14, 0.4], [20, 1]] }
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
id: "railway-service-hatching",
|
|
1346
|
+
type: "line",
|
|
1347
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1348
|
+
source: "openmaptiles",
|
|
1349
|
+
"source-layer": "transportation",
|
|
1350
|
+
filter: [
|
|
1351
|
+
"all",
|
|
1352
|
+
["==", "$type", "LineString"],
|
|
1353
|
+
["==", "class", "rail"],
|
|
1354
|
+
["has", "service"]
|
|
1355
|
+
],
|
|
1356
|
+
layout: { visibility: "visible" },
|
|
1357
|
+
paint: {
|
|
1358
|
+
"line-color": "hsla(0, 0%, 73%, 0.68)",
|
|
1359
|
+
"line-dasharray": [0.2, 8],
|
|
1360
|
+
"line-width": { base: 1.4, stops: [[14.5, 0], [15, 2], [20, 6]] }
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
id: "railway",
|
|
1365
|
+
type: "line",
|
|
1366
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1367
|
+
source: "openmaptiles",
|
|
1368
|
+
"source-layer": "transportation",
|
|
1369
|
+
filter: [
|
|
1370
|
+
"all",
|
|
1371
|
+
["==", "$type", "LineString"],
|
|
1372
|
+
["!has", "service"],
|
|
1373
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1374
|
+
["==", "class", "rail"]
|
|
1375
|
+
],
|
|
1376
|
+
paint: {
|
|
1377
|
+
"line-color": "#bbb",
|
|
1378
|
+
"line-width": { base: 1.4, stops: [[14, 0.4], [15, 0.75], [20, 2]] }
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
id: "railway-hatching",
|
|
1383
|
+
type: "line",
|
|
1384
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1385
|
+
source: "openmaptiles",
|
|
1386
|
+
"source-layer": "transportation",
|
|
1387
|
+
filter: [
|
|
1388
|
+
"all",
|
|
1389
|
+
["==", "$type", "LineString"],
|
|
1390
|
+
["!has", "service"],
|
|
1391
|
+
["!in", "brunnel", "bridge", "tunnel"],
|
|
1392
|
+
["==", "class", "rail"]
|
|
1393
|
+
],
|
|
1394
|
+
paint: {
|
|
1395
|
+
"line-color": "#bbb",
|
|
1396
|
+
"line-dasharray": [0.2, 8],
|
|
1397
|
+
"line-width": { base: 1.4, stops: [[14.5, 0], [15, 3], [20, 8]] }
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
id: "bridge-motorway-link-casing",
|
|
1402
|
+
type: "line",
|
|
1403
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1404
|
+
source: "openmaptiles",
|
|
1405
|
+
"source-layer": "transportation",
|
|
1406
|
+
filter: [
|
|
1407
|
+
"all",
|
|
1408
|
+
["==", "brunnel", "bridge"],
|
|
1409
|
+
["==", "class", "motorway"],
|
|
1410
|
+
["==", "ramp", 1]
|
|
1411
|
+
],
|
|
1412
|
+
layout: { "line-join": "round" },
|
|
1413
|
+
paint: {
|
|
1414
|
+
"line-color": "#e9ac77",
|
|
1415
|
+
"line-opacity": 1,
|
|
1416
|
+
"line-width": {
|
|
1417
|
+
base: 1.2,
|
|
1418
|
+
stops: [[12, 1], [13, 3], [14, 4], [20, 19]]
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
id: "bridge-link-casing",
|
|
1424
|
+
type: "line",
|
|
1425
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1426
|
+
source: "openmaptiles",
|
|
1427
|
+
"source-layer": "transportation",
|
|
1428
|
+
filter: [
|
|
1429
|
+
"all",
|
|
1430
|
+
["==", "brunnel", "bridge"],
|
|
1431
|
+
["in", "class", "trunk", "primary", "secondary", "tertiary"],
|
|
1432
|
+
["==", "ramp", 1]
|
|
1433
|
+
],
|
|
1434
|
+
layout: { "line-join": "round" },
|
|
1435
|
+
paint: {
|
|
1436
|
+
"line-color": "#e9ac77",
|
|
1437
|
+
"line-opacity": 1,
|
|
1438
|
+
"line-width": {
|
|
1439
|
+
base: 1.2,
|
|
1440
|
+
stops: [[12, 1], [13, 3], [14, 4], [20, 19]]
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
id: "bridge-secondary-tertiary-casing",
|
|
1446
|
+
type: "line",
|
|
1447
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1448
|
+
source: "openmaptiles",
|
|
1449
|
+
"source-layer": "transportation",
|
|
1450
|
+
filter: [
|
|
1451
|
+
"all",
|
|
1452
|
+
["==", "brunnel", "bridge"],
|
|
1453
|
+
["in", "class", "secondary", "tertiary"],
|
|
1454
|
+
["!=", "ramp", 1]
|
|
1455
|
+
],
|
|
1456
|
+
layout: { "line-join": "round" },
|
|
1457
|
+
paint: {
|
|
1458
|
+
"line-color": "#e9ac77",
|
|
1459
|
+
"line-opacity": 1,
|
|
1460
|
+
"line-width": {
|
|
1461
|
+
base: 1.2,
|
|
1462
|
+
stops: [[5, 0.4], [7, 0.6], [8, 1.5], [20, 21]]
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
id: "bridge-trunk-primary-casing",
|
|
1468
|
+
type: "line",
|
|
1469
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1470
|
+
source: "openmaptiles",
|
|
1471
|
+
"source-layer": "transportation",
|
|
1472
|
+
filter: [
|
|
1473
|
+
"all",
|
|
1474
|
+
["==", "brunnel", "bridge"],
|
|
1475
|
+
["in", "class", "primary", "trunk"],
|
|
1476
|
+
["!=", "ramp", 1]
|
|
1477
|
+
],
|
|
1478
|
+
layout: { "line-join": "round" },
|
|
1479
|
+
paint: {
|
|
1480
|
+
"line-color": "hsl(28, 76%, 67%)",
|
|
1481
|
+
"line-width": {
|
|
1482
|
+
base: 1.2,
|
|
1483
|
+
stops: [[5, 0.4], [6, 0.6], [7, 1.5], [20, 26]]
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
id: "bridge-motorway-casing",
|
|
1489
|
+
type: "line",
|
|
1490
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1491
|
+
source: "openmaptiles",
|
|
1492
|
+
"source-layer": "transportation",
|
|
1493
|
+
filter: [
|
|
1494
|
+
"all",
|
|
1495
|
+
["==", "brunnel", "bridge"],
|
|
1496
|
+
["==", "class", "motorway"],
|
|
1497
|
+
["!=", "ramp", 1]
|
|
1498
|
+
],
|
|
1499
|
+
layout: { "line-join": "round" },
|
|
1500
|
+
paint: {
|
|
1501
|
+
"line-color": "#e9ac77",
|
|
1502
|
+
"line-width": {
|
|
1503
|
+
base: 1.2,
|
|
1504
|
+
stops: [[5, 0.4], [6, 0.6], [7, 1.5], [20, 26]]
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
id: "bridge-minor-casing",
|
|
1510
|
+
type: "line",
|
|
1511
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1512
|
+
source: "openmaptiles",
|
|
1513
|
+
"source-layer": "transportation",
|
|
1514
|
+
filter: [
|
|
1515
|
+
"all",
|
|
1516
|
+
["==", "$type", "LineString"],
|
|
1517
|
+
["==", "brunnel", "bridge"],
|
|
1518
|
+
["in", "class", "minor", "service", "track"]
|
|
1519
|
+
],
|
|
1520
|
+
layout: { "line-cap": "butt", "line-join": "round" },
|
|
1521
|
+
paint: {
|
|
1522
|
+
"line-color": "#cfcdca",
|
|
1523
|
+
"line-opacity": { stops: [[12, 0], [12.5, 1]] },
|
|
1524
|
+
"line-width": {
|
|
1525
|
+
base: 1.2,
|
|
1526
|
+
stops: [[12, 0.5], [13, 1], [14, 6], [20, 24]]
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
id: "bridge-path-casing",
|
|
1532
|
+
type: "line",
|
|
1533
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1534
|
+
source: "openmaptiles",
|
|
1535
|
+
"source-layer": "transportation",
|
|
1536
|
+
filter: [
|
|
1537
|
+
"all",
|
|
1538
|
+
["==", "$type", "LineString"],
|
|
1539
|
+
["==", "brunnel", "bridge"],
|
|
1540
|
+
["==", "class", "path"]
|
|
1541
|
+
],
|
|
1542
|
+
paint: {
|
|
1543
|
+
"line-color": "#cfcdca",
|
|
1544
|
+
"line-width": { base: 1.2, stops: [[15, 1.2], [20, 18]] }
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
id: "bridge-path-steps",
|
|
1549
|
+
type: "line",
|
|
1550
|
+
source: "openmaptiles",
|
|
1551
|
+
"source-layer": "transportation",
|
|
1552
|
+
filter: [
|
|
1553
|
+
"all",
|
|
1554
|
+
["==", "$type", "LineString"],
|
|
1555
|
+
["==", "brunnel", "bridge"],
|
|
1556
|
+
["==", "class", "path"],
|
|
1557
|
+
["==", "subclass", "steps"]
|
|
1558
|
+
],
|
|
1559
|
+
layout: { "line-join": "round", "line-cap": "butt" },
|
|
1560
|
+
paint: {
|
|
1561
|
+
"line-color": "#fff",
|
|
1562
|
+
"line-opacity": 1,
|
|
1563
|
+
"line-width": {
|
|
1564
|
+
base: 1.2,
|
|
1565
|
+
stops: [[13.5, 0], [14, 1.25], [20, 5.75]]
|
|
1566
|
+
},
|
|
1567
|
+
"line-dasharray": [0.5, 0.25]
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
id: "bridge-path",
|
|
1572
|
+
type: "line",
|
|
1573
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1574
|
+
source: "openmaptiles",
|
|
1575
|
+
"source-layer": "transportation",
|
|
1576
|
+
filter: [
|
|
1577
|
+
"all",
|
|
1578
|
+
["==", "$type", "LineString"],
|
|
1579
|
+
["==", "brunnel", "bridge"],
|
|
1580
|
+
["==", "class", "path"],
|
|
1581
|
+
["!=", "subclass", "steps"]
|
|
1582
|
+
],
|
|
1583
|
+
paint: {
|
|
1584
|
+
"line-color": "#cba",
|
|
1585
|
+
"line-dasharray": [1.5, 0.75],
|
|
1586
|
+
"line-width": { base: 1.2, stops: [[15, 1.2], [20, 4]] }
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
id: "bridge-motorway-link",
|
|
1591
|
+
type: "line",
|
|
1592
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1593
|
+
source: "openmaptiles",
|
|
1594
|
+
"source-layer": "transportation",
|
|
1595
|
+
filter: [
|
|
1596
|
+
"all",
|
|
1597
|
+
["==", "brunnel", "bridge"],
|
|
1598
|
+
["==", "class", "motorway"],
|
|
1599
|
+
["==", "ramp", 1]
|
|
1600
|
+
],
|
|
1601
|
+
layout: { "line-join": "round" },
|
|
1602
|
+
paint: {
|
|
1603
|
+
"line-color": "#fc8",
|
|
1604
|
+
"line-width": {
|
|
1605
|
+
base: 1.2,
|
|
1606
|
+
stops: [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]]
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
id: "bridge-link",
|
|
1612
|
+
type: "line",
|
|
1613
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1614
|
+
source: "openmaptiles",
|
|
1615
|
+
"source-layer": "transportation",
|
|
1616
|
+
filter: [
|
|
1617
|
+
"all",
|
|
1618
|
+
["==", "brunnel", "bridge"],
|
|
1619
|
+
["in", "class", "trunk", "primary", "secondary", "tertiary"],
|
|
1620
|
+
["==", "ramp", 1]
|
|
1621
|
+
],
|
|
1622
|
+
layout: { "line-join": "round" },
|
|
1623
|
+
paint: {
|
|
1624
|
+
"line-color": "#fea",
|
|
1625
|
+
"line-width": {
|
|
1626
|
+
base: 1.2,
|
|
1627
|
+
stops: [[12.5, 0], [13, 1.5], [14, 2.5], [20, 11.5]]
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
id: "bridge-minor",
|
|
1633
|
+
type: "line",
|
|
1634
|
+
metadata: { "mapbox:group": "1444849345966.4436" },
|
|
1635
|
+
source: "openmaptiles",
|
|
1636
|
+
"source-layer": "transportation",
|
|
1637
|
+
filter: [
|
|
1638
|
+
"all",
|
|
1639
|
+
["==", "$type", "LineString"],
|
|
1640
|
+
["==", "brunnel", "bridge"],
|
|
1641
|
+
["in", "class", "minor", "service", "track"]
|
|
1642
|
+
],
|
|
1643
|
+
layout: { "line-cap": "round", "line-join": "round" },
|
|
1644
|
+
paint: {
|
|
1645
|
+
"line-color": "#fff",
|
|
1646
|
+
"line-opacity": 1,
|
|
1647
|
+
"line-width": { base: 1.2, stops: [[13.5, 0], [14, 2.5], [20, 11.5]] }
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
id: "bridge-secondary-tertiary",
|
|
1652
|
+
type: "line",
|
|
1653
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1654
|
+
source: "openmaptiles",
|
|
1655
|
+
"source-layer": "transportation",
|
|
1656
|
+
filter: [
|
|
1657
|
+
"all",
|
|
1658
|
+
["==", "brunnel", "bridge"],
|
|
1659
|
+
["in", "class", "secondary", "tertiary"],
|
|
1660
|
+
["!=", "ramp", 1]
|
|
1661
|
+
],
|
|
1662
|
+
layout: { "line-join": "round" },
|
|
1663
|
+
paint: {
|
|
1664
|
+
"line-color": "#fea",
|
|
1665
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [8, 0.5], [20, 13]] }
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
id: "bridge-trunk-primary",
|
|
1670
|
+
type: "line",
|
|
1671
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1672
|
+
source: "openmaptiles",
|
|
1673
|
+
"source-layer": "transportation",
|
|
1674
|
+
filter: [
|
|
1675
|
+
"all",
|
|
1676
|
+
["==", "brunnel", "bridge"],
|
|
1677
|
+
["in", "class", "primary", "trunk"],
|
|
1678
|
+
["!=", "ramp", 1]
|
|
1679
|
+
],
|
|
1680
|
+
layout: { "line-join": "round" },
|
|
1681
|
+
paint: {
|
|
1682
|
+
"line-color": "#fea",
|
|
1683
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 18]] }
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
id: "bridge-motorway",
|
|
1688
|
+
type: "line",
|
|
1689
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1690
|
+
source: "openmaptiles",
|
|
1691
|
+
"source-layer": "transportation",
|
|
1692
|
+
filter: [
|
|
1693
|
+
"all",
|
|
1694
|
+
["==", "brunnel", "bridge"],
|
|
1695
|
+
["==", "class", "motorway"],
|
|
1696
|
+
["!=", "ramp", 1]
|
|
1697
|
+
],
|
|
1698
|
+
layout: { "line-join": "round" },
|
|
1699
|
+
paint: {
|
|
1700
|
+
"line-color": "#fc8",
|
|
1701
|
+
"line-width": { base: 1.2, stops: [[6.5, 0], [7, 0.5], [20, 18]] }
|
|
1702
|
+
}
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
id: "bridge-railway",
|
|
1706
|
+
type: "line",
|
|
1707
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1708
|
+
source: "openmaptiles",
|
|
1709
|
+
"source-layer": "transportation",
|
|
1710
|
+
filter: ["all", ["==", "brunnel", "bridge"], ["==", "class", "rail"]],
|
|
1711
|
+
paint: {
|
|
1712
|
+
"line-color": "#bbb",
|
|
1713
|
+
"line-width": { base: 1.4, stops: [[14, 0.4], [15, 0.75], [20, 2]] }
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
id: "bridge-railway-hatching",
|
|
1718
|
+
type: "line",
|
|
1719
|
+
metadata: { "mapbox:group": "1444849334699.1902" },
|
|
1720
|
+
source: "openmaptiles",
|
|
1721
|
+
"source-layer": "transportation",
|
|
1722
|
+
filter: ["all", ["==", "brunnel", "bridge"], ["==", "class", "rail"]],
|
|
1723
|
+
paint: {
|
|
1724
|
+
"line-color": "#bbb",
|
|
1725
|
+
"line-dasharray": [0.2, 8],
|
|
1726
|
+
"line-width": { base: 1.4, stops: [[14.5, 0], [15, 3], [20, 8]] }
|
|
1727
|
+
}
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
id: "cablecar",
|
|
1731
|
+
type: "line",
|
|
1732
|
+
source: "openmaptiles",
|
|
1733
|
+
"source-layer": "transportation",
|
|
1734
|
+
minzoom: 13,
|
|
1735
|
+
filter: ["==", "subclass", "cable_car"],
|
|
1736
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
1737
|
+
paint: {
|
|
1738
|
+
"line-color": "hsl(0, 0%, 70%)",
|
|
1739
|
+
"line-width": { base: 1, stops: [[11, 1], [19, 2.5]] }
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
id: "cablecar-dash",
|
|
1744
|
+
type: "line",
|
|
1745
|
+
source: "openmaptiles",
|
|
1746
|
+
"source-layer": "transportation",
|
|
1747
|
+
minzoom: 13,
|
|
1748
|
+
filter: ["==", "subclass", "cable_car"],
|
|
1749
|
+
layout: { "line-cap": "round", visibility: "visible" },
|
|
1750
|
+
paint: {
|
|
1751
|
+
"line-color": "hsl(0, 0%, 70%)",
|
|
1752
|
+
"line-dasharray": [2, 3],
|
|
1753
|
+
"line-width": { base: 1, stops: [[11, 3], [19, 5.5]] }
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
id: "boundary-land-level-4",
|
|
1758
|
+
type: "line",
|
|
1759
|
+
source: "openmaptiles",
|
|
1760
|
+
"source-layer": "boundary",
|
|
1761
|
+
minzoom: 2,
|
|
1762
|
+
filter: [
|
|
1763
|
+
"all",
|
|
1764
|
+
[">=", "admin_level", 3],
|
|
1765
|
+
["<=", "admin_level", 8],
|
|
1766
|
+
["!=", "maritime", 1]
|
|
1767
|
+
],
|
|
1768
|
+
layout: { "line-join": "round", visibility: "visible" },
|
|
1769
|
+
paint: {
|
|
1770
|
+
"line-color": "#9e9cab",
|
|
1771
|
+
"line-dasharray": [3, 1, 1, 1],
|
|
1772
|
+
"line-width": { base: 1.4, stops: [[4, 0.4], [5, 1], [12, 3]] }
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
id: "boundary-land-level-2",
|
|
1777
|
+
type: "line",
|
|
1778
|
+
source: "openmaptiles",
|
|
1779
|
+
"source-layer": "boundary",
|
|
1780
|
+
filter: [
|
|
1781
|
+
"all",
|
|
1782
|
+
["==", "admin_level", 2],
|
|
1783
|
+
["!=", "maritime", 1],
|
|
1784
|
+
["!=", "disputed", 1]
|
|
1785
|
+
],
|
|
1786
|
+
layout: {
|
|
1787
|
+
"line-cap": "round",
|
|
1788
|
+
"line-join": "round",
|
|
1789
|
+
visibility: "visible"
|
|
1790
|
+
},
|
|
1791
|
+
paint: {
|
|
1792
|
+
"line-color": "hsl(248, 7%, 66%)",
|
|
1793
|
+
"line-width": {
|
|
1794
|
+
base: 1,
|
|
1795
|
+
stops: [[0, 0.6], [4, 1.4], [5, 2], [12, 8]]
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
id: "boundary-land-disputed",
|
|
1801
|
+
type: "line",
|
|
1802
|
+
source: "openmaptiles",
|
|
1803
|
+
"source-layer": "boundary",
|
|
1804
|
+
filter: ["all", ["!=", "maritime", 1], ["==", "disputed", 1]],
|
|
1805
|
+
layout: {
|
|
1806
|
+
"line-cap": "round",
|
|
1807
|
+
"line-join": "round",
|
|
1808
|
+
visibility: "visible"
|
|
1809
|
+
},
|
|
1810
|
+
paint: {
|
|
1811
|
+
"line-color": "hsl(248, 7%, 70%)",
|
|
1812
|
+
"line-dasharray": [1, 3],
|
|
1813
|
+
"line-width": {
|
|
1814
|
+
base: 1,
|
|
1815
|
+
stops: [[0, 0.6], [4, 1.4], [5, 2], [12, 8]]
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
id: "boundary-water",
|
|
1821
|
+
type: "line",
|
|
1822
|
+
source: "openmaptiles",
|
|
1823
|
+
"source-layer": "boundary",
|
|
1824
|
+
minzoom: 4,
|
|
1825
|
+
filter: ["all", ["in", "admin_level", 2, 4], ["==", "maritime", 1]],
|
|
1826
|
+
layout: {
|
|
1827
|
+
"line-cap": "round",
|
|
1828
|
+
"line-join": "round",
|
|
1829
|
+
visibility: "visible"
|
|
1830
|
+
},
|
|
1831
|
+
paint: {
|
|
1832
|
+
"line-color": "rgba(154, 189, 214, 1)",
|
|
1833
|
+
"line-opacity": { stops: [[6, 0.6], [10, 1]] },
|
|
1834
|
+
"line-width": {
|
|
1835
|
+
base: 1,
|
|
1836
|
+
stops: [[0, 0.6], [4, 1.4], [5, 2], [12, 8]]
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
id: "waterway-name",
|
|
1842
|
+
type: "symbol",
|
|
1843
|
+
source: "openmaptiles",
|
|
1844
|
+
"source-layer": "waterway",
|
|
1845
|
+
minzoom: 13,
|
|
1846
|
+
filter: ["all", ["==", "$type", "LineString"], ["has", "name"]],
|
|
1847
|
+
layout: {
|
|
1848
|
+
"symbol-placement": "line",
|
|
1849
|
+
"symbol-spacing": 350,
|
|
1850
|
+
"text-field": "{name:latin} {name:nonlatin}",
|
|
1851
|
+
"text-font": ["Noto Sans Italic"],
|
|
1852
|
+
"text-letter-spacing": 0.2,
|
|
1853
|
+
"text-max-width": 5,
|
|
1854
|
+
"text-rotation-alignment": "map",
|
|
1855
|
+
"text-size": 14
|
|
1856
|
+
},
|
|
1857
|
+
paint: {
|
|
1858
|
+
"text-color": "#74aee9",
|
|
1859
|
+
"text-halo-color": "rgba(255,255,255,0.7)",
|
|
1860
|
+
"text-halo-width": 1.5
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
id: "water-name-lakeline",
|
|
1865
|
+
type: "symbol",
|
|
1866
|
+
source: "openmaptiles",
|
|
1867
|
+
"source-layer": "water_name",
|
|
1868
|
+
filter: ["==", "$type", "LineString"],
|
|
1869
|
+
layout: {
|
|
1870
|
+
"symbol-placement": "line",
|
|
1871
|
+
"symbol-spacing": 350,
|
|
1872
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
1873
|
+
"text-font": ["Noto Sans Italic"],
|
|
1874
|
+
"text-letter-spacing": 0.2,
|
|
1875
|
+
"text-max-width": 5,
|
|
1876
|
+
"text-rotation-alignment": "map",
|
|
1877
|
+
"text-size": 14
|
|
1878
|
+
},
|
|
1879
|
+
paint: {
|
|
1880
|
+
"text-color": "#74aee9",
|
|
1881
|
+
"text-halo-color": "rgba(255,255,255,0.7)",
|
|
1882
|
+
"text-halo-width": 1.5
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
id: "water-name-ocean",
|
|
1887
|
+
type: "symbol",
|
|
1888
|
+
source: "openmaptiles",
|
|
1889
|
+
"source-layer": "water_name",
|
|
1890
|
+
filter: ["all", ["==", "$type", "Point"], ["==", "class", "ocean"]],
|
|
1891
|
+
layout: {
|
|
1892
|
+
"symbol-placement": "point",
|
|
1893
|
+
"symbol-spacing": 350,
|
|
1894
|
+
"text-field": "{name:latin}",
|
|
1895
|
+
"text-font": ["Noto Sans Italic"],
|
|
1896
|
+
"text-letter-spacing": 0.2,
|
|
1897
|
+
"text-max-width": 5,
|
|
1898
|
+
"text-rotation-alignment": "map",
|
|
1899
|
+
"text-size": 14
|
|
1900
|
+
},
|
|
1901
|
+
paint: {
|
|
1902
|
+
"text-color": "#74aee9",
|
|
1903
|
+
"text-halo-color": "rgba(255,255,255,0.7)",
|
|
1904
|
+
"text-halo-width": 1.5
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
id: "water-name-other",
|
|
1909
|
+
type: "symbol",
|
|
1910
|
+
source: "openmaptiles",
|
|
1911
|
+
"source-layer": "water_name",
|
|
1912
|
+
filter: ["all", ["==", "$type", "Point"], ["!in", "class", "ocean"]],
|
|
1913
|
+
layout: {
|
|
1914
|
+
"symbol-placement": "point",
|
|
1915
|
+
"symbol-spacing": 350,
|
|
1916
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
1917
|
+
"text-font": ["Noto Sans Italic"],
|
|
1918
|
+
"text-letter-spacing": 0.2,
|
|
1919
|
+
"text-max-width": 5,
|
|
1920
|
+
"text-rotation-alignment": "map",
|
|
1921
|
+
"text-size": { stops: [[0, 10], [6, 14]] },
|
|
1922
|
+
visibility: "visible"
|
|
1923
|
+
},
|
|
1924
|
+
paint: {
|
|
1925
|
+
"text-color": "#74aee9",
|
|
1926
|
+
"text-halo-color": "rgba(255,255,255,0.7)",
|
|
1927
|
+
"text-halo-width": 1.5
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
id: "road_oneway",
|
|
1932
|
+
type: "symbol",
|
|
1933
|
+
source: "openmaptiles",
|
|
1934
|
+
"source-layer": "transportation",
|
|
1935
|
+
minzoom: 15,
|
|
1936
|
+
filter: [
|
|
1937
|
+
"all",
|
|
1938
|
+
["==", "oneway", 1],
|
|
1939
|
+
[
|
|
1940
|
+
"in",
|
|
1941
|
+
"class",
|
|
1942
|
+
"motorway",
|
|
1943
|
+
"trunk",
|
|
1944
|
+
"primary",
|
|
1945
|
+
"secondary",
|
|
1946
|
+
"tertiary",
|
|
1947
|
+
"minor",
|
|
1948
|
+
"service"
|
|
1949
|
+
]
|
|
1950
|
+
],
|
|
1951
|
+
layout: {
|
|
1952
|
+
"icon-image": "oneway",
|
|
1953
|
+
"icon-padding": 2,
|
|
1954
|
+
"icon-rotate": 90,
|
|
1955
|
+
"icon-rotation-alignment": "map",
|
|
1956
|
+
"icon-size": { stops: [[15, 0.5], [19, 1]] },
|
|
1957
|
+
"symbol-placement": "line",
|
|
1958
|
+
"symbol-spacing": 75
|
|
1959
|
+
},
|
|
1960
|
+
paint: { "icon-opacity": 0.5 }
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
id: "road_oneway_opposite",
|
|
1964
|
+
type: "symbol",
|
|
1965
|
+
source: "openmaptiles",
|
|
1966
|
+
"source-layer": "transportation",
|
|
1967
|
+
minzoom: 15,
|
|
1968
|
+
filter: [
|
|
1969
|
+
"all",
|
|
1970
|
+
["==", "oneway", -1],
|
|
1971
|
+
[
|
|
1972
|
+
"in",
|
|
1973
|
+
"class",
|
|
1974
|
+
"motorway",
|
|
1975
|
+
"trunk",
|
|
1976
|
+
"primary",
|
|
1977
|
+
"secondary",
|
|
1978
|
+
"tertiary",
|
|
1979
|
+
"minor",
|
|
1980
|
+
"service"
|
|
1981
|
+
]
|
|
1982
|
+
],
|
|
1983
|
+
layout: {
|
|
1984
|
+
"icon-image": "oneway",
|
|
1985
|
+
"icon-padding": 2,
|
|
1986
|
+
"icon-rotate": -90,
|
|
1987
|
+
"icon-rotation-alignment": "map",
|
|
1988
|
+
"icon-size": { stops: [[15, 0.5], [19, 1]] },
|
|
1989
|
+
"symbol-placement": "line",
|
|
1990
|
+
"symbol-spacing": 75
|
|
1991
|
+
},
|
|
1992
|
+
paint: { "icon-opacity": 0.5 }
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
id: "poi-level-3",
|
|
1996
|
+
type: "symbol",
|
|
1997
|
+
source: "openmaptiles",
|
|
1998
|
+
"source-layer": "poi",
|
|
1999
|
+
minzoom: 16,
|
|
2000
|
+
filter: [
|
|
2001
|
+
"all",
|
|
2002
|
+
["==", "$type", "Point"],
|
|
2003
|
+
[">=", "rank", 25],
|
|
2004
|
+
["any", ["!has", "level"], ["==", "level", 0]]
|
|
2005
|
+
],
|
|
2006
|
+
layout: {
|
|
2007
|
+
"icon-image": "{class}_11",
|
|
2008
|
+
"text-anchor": "top",
|
|
2009
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2010
|
+
"text-font": ["Noto Sans Regular"],
|
|
2011
|
+
"text-max-width": 9,
|
|
2012
|
+
"text-offset": [0, 0.6],
|
|
2013
|
+
"text-padding": 2,
|
|
2014
|
+
"text-size": 12,
|
|
2015
|
+
visibility: "visible"
|
|
2016
|
+
},
|
|
2017
|
+
paint: {
|
|
2018
|
+
"text-color": "#666",
|
|
2019
|
+
"text-halo-blur": 0.5,
|
|
2020
|
+
"text-halo-color": "#ffffff",
|
|
2021
|
+
"text-halo-width": 1
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
id: "poi-level-2",
|
|
2026
|
+
type: "symbol",
|
|
2027
|
+
source: "openmaptiles",
|
|
2028
|
+
"source-layer": "poi",
|
|
2029
|
+
minzoom: 15,
|
|
2030
|
+
filter: [
|
|
2031
|
+
"all",
|
|
2032
|
+
["==", "$type", "Point"],
|
|
2033
|
+
["<=", "rank", 24],
|
|
2034
|
+
[">=", "rank", 15],
|
|
2035
|
+
["any", ["!has", "level"], ["==", "level", 0]]
|
|
2036
|
+
],
|
|
2037
|
+
layout: {
|
|
2038
|
+
"icon-image": "{class}_11",
|
|
2039
|
+
"text-anchor": "top",
|
|
2040
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2041
|
+
"text-font": ["Noto Sans Regular"],
|
|
2042
|
+
"text-max-width": 9,
|
|
2043
|
+
"text-offset": [0, 0.6],
|
|
2044
|
+
"text-padding": 2,
|
|
2045
|
+
"text-size": 12,
|
|
2046
|
+
visibility: "visible"
|
|
2047
|
+
},
|
|
2048
|
+
paint: {
|
|
2049
|
+
"text-color": "#666",
|
|
2050
|
+
"text-halo-blur": 0.5,
|
|
2051
|
+
"text-halo-color": "#ffffff",
|
|
2052
|
+
"text-halo-width": 1
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
id: "poi-level-1",
|
|
2057
|
+
type: "symbol",
|
|
2058
|
+
source: "openmaptiles",
|
|
2059
|
+
"source-layer": "poi",
|
|
2060
|
+
minzoom: 14,
|
|
2061
|
+
filter: [
|
|
2062
|
+
"all",
|
|
2063
|
+
["==", "$type", "Point"],
|
|
2064
|
+
["<=", "rank", 14],
|
|
2065
|
+
["has", "name"],
|
|
2066
|
+
["any", ["!has", "level"], ["==", "level", 0]]
|
|
2067
|
+
],
|
|
2068
|
+
layout: {
|
|
2069
|
+
"icon-image": "{class}_11",
|
|
2070
|
+
"text-anchor": "top",
|
|
2071
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2072
|
+
"text-font": ["Noto Sans Regular"],
|
|
2073
|
+
"text-max-width": 9,
|
|
2074
|
+
"text-offset": [0, 0.6],
|
|
2075
|
+
"text-padding": 2,
|
|
2076
|
+
"text-size": 12,
|
|
2077
|
+
visibility: "visible"
|
|
2078
|
+
},
|
|
2079
|
+
paint: {
|
|
2080
|
+
"text-color": "#666",
|
|
2081
|
+
"text-halo-blur": 0.5,
|
|
2082
|
+
"text-halo-color": "#ffffff",
|
|
2083
|
+
"text-halo-width": 1
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
id: "poi-railway",
|
|
2088
|
+
type: "symbol",
|
|
2089
|
+
source: "openmaptiles",
|
|
2090
|
+
"source-layer": "poi",
|
|
2091
|
+
minzoom: 13,
|
|
2092
|
+
filter: [
|
|
2093
|
+
"all",
|
|
2094
|
+
["==", "$type", "Point"],
|
|
2095
|
+
["has", "name"],
|
|
2096
|
+
["==", "class", "railway"],
|
|
2097
|
+
["==", "subclass", "station"]
|
|
2098
|
+
],
|
|
2099
|
+
layout: {
|
|
2100
|
+
"icon-allow-overlap": false,
|
|
2101
|
+
"icon-ignore-placement": false,
|
|
2102
|
+
"icon-image": "{class}_11",
|
|
2103
|
+
"icon-optional": false,
|
|
2104
|
+
"text-allow-overlap": false,
|
|
2105
|
+
"text-anchor": "top",
|
|
2106
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2107
|
+
"text-font": ["Noto Sans Regular"],
|
|
2108
|
+
"text-ignore-placement": false,
|
|
2109
|
+
"text-max-width": 9,
|
|
2110
|
+
"text-offset": [0, 0.6],
|
|
2111
|
+
"text-optional": true,
|
|
2112
|
+
"text-padding": 2,
|
|
2113
|
+
"text-size": 12
|
|
2114
|
+
},
|
|
2115
|
+
paint: {
|
|
2116
|
+
"text-color": "#666",
|
|
2117
|
+
"text-halo-blur": 0.5,
|
|
2118
|
+
"text-halo-color": "#ffffff",
|
|
2119
|
+
"text-halo-width": 1
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
id: "highway-name-path",
|
|
2124
|
+
type: "symbol",
|
|
2125
|
+
source: "openmaptiles",
|
|
2126
|
+
"source-layer": "transportation_name",
|
|
2127
|
+
minzoom: 15.5,
|
|
2128
|
+
filter: ["==", "class", "path"],
|
|
2129
|
+
layout: {
|
|
2130
|
+
"symbol-placement": "line",
|
|
2131
|
+
"text-field": "{name:latin} {name:nonlatin}",
|
|
2132
|
+
"text-font": ["Noto Sans Regular"],
|
|
2133
|
+
"text-rotation-alignment": "map",
|
|
2134
|
+
"text-size": { base: 1, stops: [[13, 12], [14, 13]] }
|
|
2135
|
+
},
|
|
2136
|
+
paint: {
|
|
2137
|
+
"text-color": "hsl(30, 23%, 62%)",
|
|
2138
|
+
"text-halo-color": "#f8f4f0",
|
|
2139
|
+
"text-halo-width": 0.5
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
id: "highway-name-minor",
|
|
2144
|
+
type: "symbol",
|
|
2145
|
+
source: "openmaptiles",
|
|
2146
|
+
"source-layer": "transportation_name",
|
|
2147
|
+
minzoom: 15,
|
|
2148
|
+
filter: [
|
|
2149
|
+
"all",
|
|
2150
|
+
["==", "$type", "LineString"],
|
|
2151
|
+
["in", "class", "minor", "service", "track"]
|
|
2152
|
+
],
|
|
2153
|
+
layout: {
|
|
2154
|
+
"symbol-placement": "line",
|
|
2155
|
+
"text-field": "{name:latin} {name:nonlatin}",
|
|
2156
|
+
"text-font": ["Noto Sans Regular"],
|
|
2157
|
+
"text-rotation-alignment": "map",
|
|
2158
|
+
"text-size": { base: 1, stops: [[13, 12], [14, 13]] }
|
|
2159
|
+
},
|
|
2160
|
+
paint: {
|
|
2161
|
+
"text-color": "#765",
|
|
2162
|
+
"text-halo-blur": 0.5,
|
|
2163
|
+
"text-halo-width": 1
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
id: "highway-name-major",
|
|
2168
|
+
type: "symbol",
|
|
2169
|
+
source: "openmaptiles",
|
|
2170
|
+
"source-layer": "transportation_name",
|
|
2171
|
+
minzoom: 12.2,
|
|
2172
|
+
filter: ["in", "class", "primary", "secondary", "tertiary", "trunk"],
|
|
2173
|
+
layout: {
|
|
2174
|
+
"symbol-placement": "line",
|
|
2175
|
+
"text-field": "{name:latin} {name:nonlatin}",
|
|
2176
|
+
"text-font": ["Noto Sans Regular"],
|
|
2177
|
+
"text-rotation-alignment": "map",
|
|
2178
|
+
"text-size": { base: 1, stops: [[13, 12], [14, 13]] }
|
|
2179
|
+
},
|
|
2180
|
+
paint: {
|
|
2181
|
+
"text-color": "#765",
|
|
2182
|
+
"text-halo-blur": 0.5,
|
|
2183
|
+
"text-halo-width": 1
|
|
2184
|
+
}
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
id: "highway-shield",
|
|
2188
|
+
type: "symbol",
|
|
2189
|
+
source: "openmaptiles",
|
|
2190
|
+
"source-layer": "transportation_name",
|
|
2191
|
+
minzoom: 8,
|
|
2192
|
+
filter: [
|
|
2193
|
+
"all",
|
|
2194
|
+
["<=", "ref_length", 6],
|
|
2195
|
+
["==", "$type", "LineString"],
|
|
2196
|
+
["!in", "network", "us-interstate", "us-highway", "us-state"]
|
|
2197
|
+
],
|
|
2198
|
+
layout: {
|
|
2199
|
+
"icon-image": "road_{ref_length}",
|
|
2200
|
+
"icon-rotation-alignment": "viewport",
|
|
2201
|
+
"icon-size": 1,
|
|
2202
|
+
"symbol-placement": { base: 1, stops: [[10, "point"], [11, "line"]] },
|
|
2203
|
+
"symbol-spacing": 200,
|
|
2204
|
+
"text-field": "{ref}",
|
|
2205
|
+
"text-font": ["Noto Sans Regular"],
|
|
2206
|
+
"text-rotation-alignment": "viewport",
|
|
2207
|
+
"text-size": 10
|
|
2208
|
+
},
|
|
2209
|
+
paint: {}
|
|
2210
|
+
},
|
|
2211
|
+
{
|
|
2212
|
+
id: "highway-shield-us-interstate",
|
|
2213
|
+
type: "symbol",
|
|
2214
|
+
source: "openmaptiles",
|
|
2215
|
+
"source-layer": "transportation_name",
|
|
2216
|
+
minzoom: 7,
|
|
2217
|
+
filter: [
|
|
2218
|
+
"all",
|
|
2219
|
+
["<=", "ref_length", 6],
|
|
2220
|
+
["==", "$type", "LineString"],
|
|
2221
|
+
["in", "network", "us-interstate"]
|
|
2222
|
+
],
|
|
2223
|
+
layout: {
|
|
2224
|
+
"icon-image": "{network}_{ref_length}",
|
|
2225
|
+
"icon-rotation-alignment": "viewport",
|
|
2226
|
+
"icon-size": 1,
|
|
2227
|
+
"symbol-placement": {
|
|
2228
|
+
base: 1,
|
|
2229
|
+
stops: [[7, "point"], [7, "line"], [8, "line"]]
|
|
2230
|
+
},
|
|
2231
|
+
"symbol-spacing": 200,
|
|
2232
|
+
"text-field": "{ref}",
|
|
2233
|
+
"text-font": ["Noto Sans Regular"],
|
|
2234
|
+
"text-rotation-alignment": "viewport",
|
|
2235
|
+
"text-size": 10
|
|
2236
|
+
},
|
|
2237
|
+
paint: { "text-color": "rgba(0, 0, 0, 1)" }
|
|
2238
|
+
},
|
|
2239
|
+
{
|
|
2240
|
+
id: "highway-shield-us-other",
|
|
2241
|
+
type: "symbol",
|
|
2242
|
+
source: "openmaptiles",
|
|
2243
|
+
"source-layer": "transportation_name",
|
|
2244
|
+
minzoom: 9,
|
|
2245
|
+
filter: [
|
|
2246
|
+
"all",
|
|
2247
|
+
["<=", "ref_length", 6],
|
|
2248
|
+
["==", "$type", "LineString"],
|
|
2249
|
+
["in", "network", "us-highway", "us-state"]
|
|
2250
|
+
],
|
|
2251
|
+
layout: {
|
|
2252
|
+
"icon-image": "{network}_{ref_length}",
|
|
2253
|
+
"icon-rotation-alignment": "viewport",
|
|
2254
|
+
"icon-size": 1,
|
|
2255
|
+
"symbol-placement": { base: 1, stops: [[10, "point"], [11, "line"]] },
|
|
2256
|
+
"symbol-spacing": 200,
|
|
2257
|
+
"text-field": "{ref}",
|
|
2258
|
+
"text-font": ["Noto Sans Regular"],
|
|
2259
|
+
"text-rotation-alignment": "viewport",
|
|
2260
|
+
"text-size": 10
|
|
2261
|
+
},
|
|
2262
|
+
paint: { "text-color": "rgba(0, 0, 0, 1)" }
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
id: "airport-label-major",
|
|
2266
|
+
type: "symbol",
|
|
2267
|
+
source: "openmaptiles",
|
|
2268
|
+
"source-layer": "aerodrome_label",
|
|
2269
|
+
minzoom: 10,
|
|
2270
|
+
filter: ["all", ["has", "iata"]],
|
|
2271
|
+
layout: {
|
|
2272
|
+
"icon-image": "airport_11",
|
|
2273
|
+
"icon-size": 1,
|
|
2274
|
+
"text-anchor": "top",
|
|
2275
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2276
|
+
"text-font": ["Noto Sans Regular"],
|
|
2277
|
+
"text-max-width": 9,
|
|
2278
|
+
"text-offset": [0, 0.6],
|
|
2279
|
+
"text-optional": true,
|
|
2280
|
+
"text-padding": 2,
|
|
2281
|
+
"text-size": 12,
|
|
2282
|
+
visibility: "visible"
|
|
2283
|
+
},
|
|
2284
|
+
paint: {
|
|
2285
|
+
"text-color": "#666",
|
|
2286
|
+
"text-halo-blur": 0.5,
|
|
2287
|
+
"text-halo-color": "#ffffff",
|
|
2288
|
+
"text-halo-width": 1
|
|
2289
|
+
}
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
id: "place-other",
|
|
2293
|
+
type: "symbol",
|
|
2294
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2295
|
+
source: "openmaptiles",
|
|
2296
|
+
"source-layer": "place",
|
|
2297
|
+
filter: [
|
|
2298
|
+
"!in",
|
|
2299
|
+
"class",
|
|
2300
|
+
"city",
|
|
2301
|
+
"town",
|
|
2302
|
+
"village",
|
|
2303
|
+
"state",
|
|
2304
|
+
"country",
|
|
2305
|
+
"continent"
|
|
2306
|
+
],
|
|
2307
|
+
layout: {
|
|
2308
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2309
|
+
"text-font": ["Noto Sans Bold"],
|
|
2310
|
+
"text-letter-spacing": 0.1,
|
|
2311
|
+
"text-max-width": 9,
|
|
2312
|
+
"text-size": { base: 1.2, stops: [[12, 10], [15, 14]] },
|
|
2313
|
+
"text-transform": "uppercase",
|
|
2314
|
+
visibility: "visible"
|
|
2315
|
+
},
|
|
2316
|
+
paint: {
|
|
2317
|
+
"text-color": "#633",
|
|
2318
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2319
|
+
"text-halo-width": 1.2
|
|
2320
|
+
}
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
id: "place-village",
|
|
2324
|
+
type: "symbol",
|
|
2325
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2326
|
+
source: "openmaptiles",
|
|
2327
|
+
"source-layer": "place",
|
|
2328
|
+
filter: ["==", "class", "village"],
|
|
2329
|
+
layout: {
|
|
2330
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2331
|
+
"text-font": ["Noto Sans Regular"],
|
|
2332
|
+
"text-max-width": 8,
|
|
2333
|
+
"text-size": { base: 1.2, stops: [[10, 12], [15, 22]] },
|
|
2334
|
+
visibility: "visible"
|
|
2335
|
+
},
|
|
2336
|
+
paint: {
|
|
2337
|
+
"text-color": "#333",
|
|
2338
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2339
|
+
"text-halo-width": 1.2
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
id: "place-town",
|
|
2344
|
+
type: "symbol",
|
|
2345
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2346
|
+
source: "openmaptiles",
|
|
2347
|
+
"source-layer": "place",
|
|
2348
|
+
filter: ["==", "class", "town"],
|
|
2349
|
+
layout: {
|
|
2350
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2351
|
+
"text-font": ["Noto Sans Regular"],
|
|
2352
|
+
"text-max-width": 8,
|
|
2353
|
+
"text-size": { base: 1.2, stops: [[10, 14], [15, 24]] },
|
|
2354
|
+
visibility: "visible"
|
|
2355
|
+
},
|
|
2356
|
+
paint: {
|
|
2357
|
+
"text-color": "#333",
|
|
2358
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2359
|
+
"text-halo-width": 1.2
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
id: "place-city",
|
|
2364
|
+
type: "symbol",
|
|
2365
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2366
|
+
source: "openmaptiles",
|
|
2367
|
+
"source-layer": "place",
|
|
2368
|
+
filter: ["all", ["!=", "capital", 2], ["==", "class", "city"]],
|
|
2369
|
+
layout: {
|
|
2370
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2371
|
+
"text-font": ["Noto Sans Regular"],
|
|
2372
|
+
"text-max-width": 8,
|
|
2373
|
+
"text-size": { base: 1.2, stops: [[7, 14], [11, 24]] },
|
|
2374
|
+
visibility: "visible"
|
|
2375
|
+
},
|
|
2376
|
+
paint: {
|
|
2377
|
+
"text-color": "#333",
|
|
2378
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2379
|
+
"text-halo-width": 1.2
|
|
2380
|
+
}
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
id: "place-city-capital",
|
|
2384
|
+
type: "symbol",
|
|
2385
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2386
|
+
source: "openmaptiles",
|
|
2387
|
+
"source-layer": "place",
|
|
2388
|
+
filter: ["all", ["==", "capital", 2], ["==", "class", "city"]],
|
|
2389
|
+
layout: {
|
|
2390
|
+
"icon-image": "star_11",
|
|
2391
|
+
"icon-size": 0.8,
|
|
2392
|
+
"text-anchor": "left",
|
|
2393
|
+
"text-field": "{name:latin}\n{name:nonlatin}",
|
|
2394
|
+
"text-font": ["Noto Sans Regular"],
|
|
2395
|
+
"text-max-width": 8,
|
|
2396
|
+
"text-offset": [0.4, 0],
|
|
2397
|
+
"text-size": { base: 1.2, stops: [[7, 14], [11, 24]] },
|
|
2398
|
+
visibility: "visible"
|
|
2399
|
+
},
|
|
2400
|
+
paint: {
|
|
2401
|
+
"text-color": "#333",
|
|
2402
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2403
|
+
"text-halo-width": 1.2
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
id: "place-state",
|
|
2408
|
+
type: "symbol",
|
|
2409
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2410
|
+
source: "openmaptiles",
|
|
2411
|
+
"source-layer": "place",
|
|
2412
|
+
filter: ["in", "class", "state"],
|
|
2413
|
+
layout: {
|
|
2414
|
+
"text-field": "{name:latin}",
|
|
2415
|
+
"text-font": ["Noto Sans Bold"],
|
|
2416
|
+
"text-letter-spacing": 0.1,
|
|
2417
|
+
"text-max-width": 9,
|
|
2418
|
+
"text-size": { base: 1.2, stops: [[12, 10], [15, 14]] },
|
|
2419
|
+
"text-transform": "uppercase",
|
|
2420
|
+
visibility: "visible"
|
|
2421
|
+
},
|
|
2422
|
+
paint: {
|
|
2423
|
+
"text-color": "#633",
|
|
2424
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2425
|
+
"text-halo-width": 1.2
|
|
2426
|
+
}
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
id: "place-country-other",
|
|
2430
|
+
type: "symbol",
|
|
2431
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2432
|
+
source: "openmaptiles",
|
|
2433
|
+
"source-layer": "place",
|
|
2434
|
+
filter: [
|
|
2435
|
+
"all",
|
|
2436
|
+
["==", "class", "country"],
|
|
2437
|
+
[">=", "rank", 3],
|
|
2438
|
+
["!has", "iso_a2"]
|
|
2439
|
+
],
|
|
2440
|
+
layout: {
|
|
2441
|
+
"text-field": "{name:latin}",
|
|
2442
|
+
"text-font": ["Noto Sans Italic"],
|
|
2443
|
+
"text-max-width": 6.25,
|
|
2444
|
+
"text-size": { stops: [[3, 11], [7, 17]] },
|
|
2445
|
+
"text-transform": "uppercase",
|
|
2446
|
+
visibility: "visible"
|
|
2447
|
+
},
|
|
2448
|
+
paint: {
|
|
2449
|
+
"text-color": "#334",
|
|
2450
|
+
"text-halo-blur": 1,
|
|
2451
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2452
|
+
"text-halo-width": 2
|
|
2453
|
+
}
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
id: "place-country-3",
|
|
2457
|
+
type: "symbol",
|
|
2458
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2459
|
+
source: "openmaptiles",
|
|
2460
|
+
"source-layer": "place",
|
|
2461
|
+
filter: [
|
|
2462
|
+
"all",
|
|
2463
|
+
["==", "class", "country"],
|
|
2464
|
+
[">=", "rank", 3],
|
|
2465
|
+
["has", "iso_a2"]
|
|
2466
|
+
],
|
|
2467
|
+
layout: {
|
|
2468
|
+
"text-field": "{name:latin}",
|
|
2469
|
+
"text-font": ["Noto Sans Bold"],
|
|
2470
|
+
"text-max-width": 6.25,
|
|
2471
|
+
"text-size": { stops: [[3, 11], [7, 17]] },
|
|
2472
|
+
"text-transform": "uppercase",
|
|
2473
|
+
visibility: "visible"
|
|
2474
|
+
},
|
|
2475
|
+
paint: {
|
|
2476
|
+
"text-color": "#334",
|
|
2477
|
+
"text-halo-blur": 1,
|
|
2478
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2479
|
+
"text-halo-width": 2
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
id: "place-country-2",
|
|
2484
|
+
type: "symbol",
|
|
2485
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2486
|
+
source: "openmaptiles",
|
|
2487
|
+
"source-layer": "place",
|
|
2488
|
+
filter: [
|
|
2489
|
+
"all",
|
|
2490
|
+
["==", "class", "country"],
|
|
2491
|
+
["==", "rank", 2],
|
|
2492
|
+
["has", "iso_a2"]
|
|
2493
|
+
],
|
|
2494
|
+
layout: {
|
|
2495
|
+
"text-field": "{name:latin}",
|
|
2496
|
+
"text-font": ["Noto Sans Bold"],
|
|
2497
|
+
"text-max-width": 6.25,
|
|
2498
|
+
"text-size": { stops: [[2, 11], [5, 17]] },
|
|
2499
|
+
"text-transform": "uppercase",
|
|
2500
|
+
visibility: "visible"
|
|
2501
|
+
},
|
|
2502
|
+
paint: {
|
|
2503
|
+
"text-color": "#334",
|
|
2504
|
+
"text-halo-blur": 1,
|
|
2505
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2506
|
+
"text-halo-width": 2
|
|
2507
|
+
}
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
id: "place-country-1",
|
|
2511
|
+
type: "symbol",
|
|
2512
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2513
|
+
source: "openmaptiles",
|
|
2514
|
+
"source-layer": "place",
|
|
2515
|
+
filter: [
|
|
2516
|
+
"all",
|
|
2517
|
+
["==", "class", "country"],
|
|
2518
|
+
["==", "rank", 1],
|
|
2519
|
+
["has", "iso_a2"]
|
|
2520
|
+
],
|
|
2521
|
+
layout: {
|
|
2522
|
+
"text-field": "{name:latin}",
|
|
2523
|
+
"text-font": ["Noto Sans Bold"],
|
|
2524
|
+
"text-max-width": 6.25,
|
|
2525
|
+
"text-size": { stops: [[1, 11], [4, 17]] },
|
|
2526
|
+
"text-transform": "uppercase",
|
|
2527
|
+
visibility: "visible"
|
|
2528
|
+
},
|
|
2529
|
+
paint: {
|
|
2530
|
+
"text-color": "#334",
|
|
2531
|
+
"text-halo-blur": 1,
|
|
2532
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2533
|
+
"text-halo-width": 2
|
|
2534
|
+
}
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
id: "place-continent",
|
|
2538
|
+
type: "symbol",
|
|
2539
|
+
metadata: { "mapbox:group": "1444849242106.713" },
|
|
2540
|
+
source: "openmaptiles",
|
|
2541
|
+
"source-layer": "place",
|
|
2542
|
+
maxzoom: 1,
|
|
2543
|
+
filter: ["==", "class", "continent"],
|
|
2544
|
+
layout: {
|
|
2545
|
+
"text-field": "{name:latin}",
|
|
2546
|
+
"text-font": ["Noto Sans Bold"],
|
|
2547
|
+
"text-max-width": 6.25,
|
|
2548
|
+
"text-size": 14,
|
|
2549
|
+
"text-transform": "uppercase",
|
|
2550
|
+
visibility: "visible"
|
|
2551
|
+
},
|
|
2552
|
+
paint: {
|
|
2553
|
+
"text-color": "#334",
|
|
2554
|
+
"text-halo-blur": 1,
|
|
2555
|
+
"text-halo-color": "rgba(255,255,255,0.8)",
|
|
2556
|
+
"text-halo-width": 2
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
],
|
|
2560
|
+
id: "bright"
|
|
2561
|
+
};
|
|
2562
|
+
|
|
2563
|
+
// src/basemaps.ts
|
|
2564
|
+
function osm(options = {}) {
|
|
2565
|
+
return {
|
|
2566
|
+
type: "osm",
|
|
2567
|
+
...options
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
// src/schema.ts
|
|
2
2572
|
import { z } from "zod";
|
|
2573
|
+
var legacyThemeNames = /* @__PURE__ */ new Set(["standard", "light", "dark", "minimal", "osm-bright-2"]);
|
|
3
2574
|
var hexColorSchema = z.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, {
|
|
4
|
-
message: "Expected a hex color like #
|
|
2575
|
+
message: "Expected a hex color like #F6F7F3 or #F6F7F3FF"
|
|
2576
|
+
});
|
|
2577
|
+
var colorConfigSchema = z.object({
|
|
2578
|
+
canvas: hexColorSchema.optional(),
|
|
2579
|
+
land: hexColorSchema.optional(),
|
|
2580
|
+
background: hexColorSchema.optional(),
|
|
2581
|
+
water: hexColorSchema.optional(),
|
|
2582
|
+
nature: hexColorSchema.optional(),
|
|
2583
|
+
text: hexColorSchema.optional(),
|
|
2584
|
+
accent: hexColorSchema.optional(),
|
|
2585
|
+
park: hexColorSchema.optional(),
|
|
2586
|
+
road: hexColorSchema.optional(),
|
|
2587
|
+
roadCasing: hexColorSchema.optional(),
|
|
2588
|
+
building: hexColorSchema.optional()
|
|
2589
|
+
});
|
|
2590
|
+
var typographySchema = z.object({
|
|
2591
|
+
font: z.string().trim().min(1).optional(),
|
|
2592
|
+
weight: z.enum(["regular", "medium", "semibold", "bold"]).optional()
|
|
2593
|
+
});
|
|
2594
|
+
var themeConfigSchema = z.object({
|
|
2595
|
+
mode: z.enum(["light", "dark"]).optional(),
|
|
2596
|
+
colors: colorConfigSchema.optional(),
|
|
2597
|
+
typography: typographySchema.optional()
|
|
2598
|
+
});
|
|
2599
|
+
var sourceLayersSchema = z.object({
|
|
2600
|
+
landuse: z.string().optional(),
|
|
2601
|
+
park: z.string().optional(),
|
|
2602
|
+
water: z.string().optional(),
|
|
2603
|
+
road: z.string().optional(),
|
|
2604
|
+
building: z.string().optional(),
|
|
2605
|
+
boundary: z.string().optional(),
|
|
2606
|
+
place: z.string().optional(),
|
|
2607
|
+
poi: z.string().optional()
|
|
2608
|
+
});
|
|
2609
|
+
var basemapSchema = z.object({
|
|
2610
|
+
type: z.literal("osm"),
|
|
2611
|
+
attribution: z.string().optional(),
|
|
2612
|
+
glyphs: z.string().min(1).optional(),
|
|
2613
|
+
sourceId: z.string().min(1).optional(),
|
|
2614
|
+
sourceLayers: sourceLayersSchema.optional(),
|
|
2615
|
+
sprite: z.string().min(1).optional(),
|
|
2616
|
+
tileset: z.string().trim().min(1).optional(),
|
|
2617
|
+
url: z.url().optional()
|
|
2618
|
+
});
|
|
2619
|
+
var roadsModuleSchema = z.object({
|
|
2620
|
+
type: z.literal("roads"),
|
|
2621
|
+
density: z.enum(["clean", "balanced", "dense"]).optional(),
|
|
2622
|
+
preset: z.enum(["modern", "minimal"]).optional()
|
|
2623
|
+
});
|
|
2624
|
+
var moduleSchema = z.discriminatedUnion("type", [roadsModuleSchema]);
|
|
2625
|
+
var viewSchema = z.object({
|
|
2626
|
+
bearing: z.number().finite().min(-180).max(180).optional(),
|
|
2627
|
+
center: z.tuple([z.number().finite(), z.number().finite()]).refine(([lng, lat]) => lng >= -180 && lng <= 180 && lat >= -90 && lat <= 90, {
|
|
2628
|
+
message: "Expected center as [lng, lat] within world bounds"
|
|
2629
|
+
}).optional(),
|
|
2630
|
+
zoom: z.number().finite().min(0).max(24).optional()
|
|
5
2631
|
});
|
|
6
2632
|
var configSchema = z.object({
|
|
2633
|
+
basemap: basemapSchema.optional(),
|
|
7
2634
|
name: z.string().min(1).optional(),
|
|
8
2635
|
tileset: z.string().trim().min(1).optional(),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
water: hexColorSchema.optional(),
|
|
14
|
-
nature: hexColorSchema.optional(),
|
|
15
|
-
text: hexColorSchema.optional(),
|
|
16
|
-
accent: hexColorSchema.optional(),
|
|
17
|
-
park: hexColorSchema.optional(),
|
|
18
|
-
road: hexColorSchema.optional(),
|
|
19
|
-
building: hexColorSchema.optional()
|
|
20
|
-
}).optional(),
|
|
21
|
-
typography: z.object({
|
|
22
|
-
font: z.string().trim().min(1).optional(),
|
|
23
|
-
weight: z.enum(["regular", "medium", "semibold", "bold"]).optional()
|
|
24
|
-
}).optional(),
|
|
2636
|
+
theme: z.union([z.string().trim().min(1), themeConfigSchema]).optional(),
|
|
2637
|
+
modules: z.array(moduleSchema).optional(),
|
|
2638
|
+
colors: colorConfigSchema.optional(),
|
|
2639
|
+
typography: typographySchema.optional(),
|
|
25
2640
|
density: z.enum(["clean", "balanced", "dense"]).optional(),
|
|
26
2641
|
roads: z.enum(["hidden", "soft", "standard", "detailed"]).optional(),
|
|
27
2642
|
labels: z.enum(["none", "essential", "balanced", "full"]).optional(),
|
|
28
2643
|
poi: z.enum(["none", "minimal", "balanced", "full"]).optional(),
|
|
2644
|
+
buildings: z.enum(["hidden", "flat", "3d"]).optional(),
|
|
2645
|
+
terrain: z.union([
|
|
2646
|
+
z.enum(["none", "hillshade", "3d"]),
|
|
2647
|
+
z.object({
|
|
2648
|
+
attribution: z.string().optional(),
|
|
2649
|
+
encoding: z.enum(["mapbox", "terrarium"]).optional(),
|
|
2650
|
+
exaggeration: z.number().min(0).max(10).optional(),
|
|
2651
|
+
mode: z.enum(["none", "hillshade", "3d"]).optional(),
|
|
2652
|
+
sourceId: z.string().min(1).optional(),
|
|
2653
|
+
tileset: z.string().trim().min(1).optional(),
|
|
2654
|
+
url: z.url().optional()
|
|
2655
|
+
})
|
|
2656
|
+
]).optional(),
|
|
29
2657
|
glyphs: z.string().min(1).optional(),
|
|
30
2658
|
sprite: z.string().min(1).optional(),
|
|
31
2659
|
tiles: z.object({
|
|
@@ -33,40 +2661,88 @@ var configSchema = z.object({
|
|
|
33
2661
|
tileset: z.string().trim().min(1).optional(),
|
|
34
2662
|
url: z.url().optional(),
|
|
35
2663
|
attribution: z.string().optional(),
|
|
36
|
-
sourceLayers:
|
|
37
|
-
landuse: z.string().optional(),
|
|
38
|
-
park: z.string().optional(),
|
|
39
|
-
water: z.string().optional(),
|
|
40
|
-
road: z.string().optional(),
|
|
41
|
-
building: z.string().optional(),
|
|
42
|
-
boundary: z.string().optional(),
|
|
43
|
-
place: z.string().optional(),
|
|
44
|
-
poi: z.string().optional()
|
|
45
|
-
}).optional()
|
|
2664
|
+
sourceLayers: sourceLayersSchema.optional()
|
|
46
2665
|
}).optional(),
|
|
2666
|
+
view: viewSchema.optional(),
|
|
47
2667
|
allowedOrigins: z.array(z.string().trim().min(1).max(253)).max(20).optional()
|
|
48
2668
|
});
|
|
49
2669
|
var tilesetConfigSchema = z.object({
|
|
50
2670
|
id: z.string().trim().min(1).optional(),
|
|
51
2671
|
name: z.string().trim().min(1).optional(),
|
|
52
2672
|
attribution: z.string().optional(),
|
|
53
|
-
sourceLayers:
|
|
54
|
-
landuse: z.string().optional(),
|
|
55
|
-
park: z.string().optional(),
|
|
56
|
-
water: z.string().optional(),
|
|
57
|
-
road: z.string().optional(),
|
|
58
|
-
building: z.string().optional(),
|
|
59
|
-
boundary: z.string().optional(),
|
|
60
|
-
place: z.string().optional(),
|
|
61
|
-
poi: z.string().optional()
|
|
62
|
-
}).optional()
|
|
2673
|
+
sourceLayers: sourceLayersSchema.optional()
|
|
63
2674
|
});
|
|
64
2675
|
var projectConfigSchema = z.object({
|
|
2676
|
+
themes: z.record(z.string(), themeConfigSchema).optional(),
|
|
65
2677
|
tilesets: z.record(z.string(), tilesetConfigSchema).optional(),
|
|
66
2678
|
maps: z.record(z.string(), configSchema).refine((maps) => {
|
|
67
2679
|
return Object.keys(maps).length > 0;
|
|
68
2680
|
}, "Expected at least one map")
|
|
69
2681
|
});
|
|
2682
|
+
function validateConfig(input) {
|
|
2683
|
+
if (isProjectConfigLike(input)) {
|
|
2684
|
+
const parsed2 = projectConfigSchema.safeParse(input);
|
|
2685
|
+
if (parsed2.success) {
|
|
2686
|
+
const messages = validateProjectThemeReferences(parsed2.data);
|
|
2687
|
+
if (messages.length > 0) {
|
|
2688
|
+
return { valid: false, messages };
|
|
2689
|
+
}
|
|
2690
|
+
return { valid: true, messages: [] };
|
|
2691
|
+
}
|
|
2692
|
+
return {
|
|
2693
|
+
valid: false,
|
|
2694
|
+
messages: parsed2.error.issues.map((issue) => ({
|
|
2695
|
+
level: "error",
|
|
2696
|
+
path: issue.path.join(".") || "config",
|
|
2697
|
+
message: issue.message
|
|
2698
|
+
}))
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
const parsed = configSchema.safeParse(input);
|
|
2702
|
+
if (parsed.success) {
|
|
2703
|
+
const messages = validateMapThemeReference(parsed.data, void 0, "theme");
|
|
2704
|
+
if (messages.length > 0) {
|
|
2705
|
+
return { valid: false, messages };
|
|
2706
|
+
}
|
|
2707
|
+
return { valid: true, messages: [] };
|
|
2708
|
+
}
|
|
2709
|
+
return {
|
|
2710
|
+
valid: false,
|
|
2711
|
+
messages: parsed.error.issues.map((issue) => ({
|
|
2712
|
+
level: "error",
|
|
2713
|
+
path: issue.path.join(".") || "config",
|
|
2714
|
+
message: issue.message
|
|
2715
|
+
}))
|
|
2716
|
+
};
|
|
2717
|
+
}
|
|
2718
|
+
function isProjectConfigLike(input) {
|
|
2719
|
+
return Boolean(
|
|
2720
|
+
input && typeof input === "object" && "maps" in input && typeof input.maps === "object"
|
|
2721
|
+
);
|
|
2722
|
+
}
|
|
2723
|
+
function validateProjectThemeReferences(project) {
|
|
2724
|
+
const themeNames = new Set(Object.keys(project.themes ?? {}));
|
|
2725
|
+
return Object.entries(project.maps).flatMap(
|
|
2726
|
+
([mapName, mapConfig]) => validateMapThemeReference(mapConfig, themeNames, `maps.${mapName}.theme`)
|
|
2727
|
+
);
|
|
2728
|
+
}
|
|
2729
|
+
function validateMapThemeReference(config, themeNames, path) {
|
|
2730
|
+
if (typeof config.theme !== "string") {
|
|
2731
|
+
return [];
|
|
2732
|
+
}
|
|
2733
|
+
if (legacyThemeNames.has(config.theme) || themeNames?.has(config.theme)) {
|
|
2734
|
+
return [];
|
|
2735
|
+
}
|
|
2736
|
+
return [
|
|
2737
|
+
{
|
|
2738
|
+
level: "error",
|
|
2739
|
+
path,
|
|
2740
|
+
message: `Unknown Tileflow theme "${config.theme}"`
|
|
2741
|
+
}
|
|
2742
|
+
];
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
// src/compiler.ts
|
|
70
2746
|
var defaultSourceLayers = {
|
|
71
2747
|
landuse: "landuse",
|
|
72
2748
|
park: "park",
|
|
@@ -78,20 +2754,97 @@ var defaultSourceLayers = {
|
|
|
78
2754
|
poi: "poi"
|
|
79
2755
|
};
|
|
80
2756
|
var defaultColors = {
|
|
81
|
-
canvas: "#
|
|
82
|
-
land: "#
|
|
83
|
-
water: "#
|
|
84
|
-
nature: "#
|
|
85
|
-
road: "#
|
|
86
|
-
text: "#
|
|
87
|
-
accent: "#
|
|
2757
|
+
canvas: "#F6F7F3",
|
|
2758
|
+
land: "#F1F3ED",
|
|
2759
|
+
water: "#A9D3F5",
|
|
2760
|
+
nature: "#CDE8B5",
|
|
2761
|
+
road: "#FFFFFF",
|
|
2762
|
+
text: "#3C4043",
|
|
2763
|
+
accent: "#F4C95D"
|
|
88
2764
|
};
|
|
89
2765
|
var defaultConfig = {
|
|
90
|
-
density: "
|
|
91
|
-
roads: "
|
|
92
|
-
labels: "
|
|
2766
|
+
density: "balanced",
|
|
2767
|
+
roads: "standard",
|
|
2768
|
+
labels: "balanced",
|
|
93
2769
|
poi: "minimal"
|
|
94
2770
|
};
|
|
2771
|
+
var themePresets = {
|
|
2772
|
+
standard: {
|
|
2773
|
+
colors: defaultColors,
|
|
2774
|
+
density: "balanced",
|
|
2775
|
+
labels: "balanced",
|
|
2776
|
+
poi: "minimal",
|
|
2777
|
+
roads: "standard"
|
|
2778
|
+
},
|
|
2779
|
+
light: {
|
|
2780
|
+
colors: {
|
|
2781
|
+
canvas: "#F9FAF8",
|
|
2782
|
+
land: "#F6F7F3",
|
|
2783
|
+
water: "#C5E1F5",
|
|
2784
|
+
nature: "#DDEED2",
|
|
2785
|
+
road: "#FFFFFF",
|
|
2786
|
+
building: "#ECEAE4",
|
|
2787
|
+
text: "#5F6368",
|
|
2788
|
+
accent: "#C9D1D9"
|
|
2789
|
+
},
|
|
2790
|
+
density: "clean",
|
|
2791
|
+
labels: "essential",
|
|
2792
|
+
poi: "minimal",
|
|
2793
|
+
roads: "standard"
|
|
2794
|
+
},
|
|
2795
|
+
dark: {
|
|
2796
|
+
colors: {
|
|
2797
|
+
canvas: "#1C2228",
|
|
2798
|
+
land: "#232B32",
|
|
2799
|
+
water: "#18384D",
|
|
2800
|
+
nature: "#274230",
|
|
2801
|
+
road: "#39434D",
|
|
2802
|
+
building: "#2F363D",
|
|
2803
|
+
text: "#D7DEE6",
|
|
2804
|
+
accent: "#E4B857"
|
|
2805
|
+
},
|
|
2806
|
+
density: "balanced",
|
|
2807
|
+
labels: "balanced",
|
|
2808
|
+
poi: "minimal",
|
|
2809
|
+
roads: "standard"
|
|
2810
|
+
},
|
|
2811
|
+
minimal: {
|
|
2812
|
+
colors: {
|
|
2813
|
+
canvas: "#FAFAF8",
|
|
2814
|
+
land: "#F7F7F2",
|
|
2815
|
+
water: "#D6EAF6",
|
|
2816
|
+
nature: "#E5EEDB",
|
|
2817
|
+
road: "#FFFFFF",
|
|
2818
|
+
building: "#F0EEE8",
|
|
2819
|
+
text: "#697079",
|
|
2820
|
+
accent: "#B8C0CA"
|
|
2821
|
+
},
|
|
2822
|
+
density: "clean",
|
|
2823
|
+
labels: "essential",
|
|
2824
|
+
poi: "none",
|
|
2825
|
+
roads: "soft"
|
|
2826
|
+
},
|
|
2827
|
+
// "OSM Bright 2" — Google Maps-inspired palette. Warm-neutral land, soft
|
|
2828
|
+
// blue water, muted green parks, white roads on a light gray canvas, and a
|
|
2829
|
+
// warm yellow accent that drives the highway color once the class-based road
|
|
2830
|
+
// engine lands. Tuned to read as a familiar navigation basemap.
|
|
2831
|
+
"osm-bright-2": {
|
|
2832
|
+
colors: {
|
|
2833
|
+
canvas: "#EBE9E4",
|
|
2834
|
+
land: "#F5F4F1",
|
|
2835
|
+
water: "#AADAFF",
|
|
2836
|
+
nature: "#C7E6A8",
|
|
2837
|
+
road: "#FFFFFF",
|
|
2838
|
+
building: "#EFEDE7",
|
|
2839
|
+
text: "#5F6368",
|
|
2840
|
+
accent: "#F9C97C"
|
|
2841
|
+
},
|
|
2842
|
+
density: "balanced",
|
|
2843
|
+
labels: "balanced",
|
|
2844
|
+
poi: "balanced",
|
|
2845
|
+
roads: "detailed"
|
|
2846
|
+
}
|
|
2847
|
+
};
|
|
95
2848
|
var defaultTypography = {
|
|
96
2849
|
font: "Noto Sans",
|
|
97
2850
|
weight: "regular"
|
|
@@ -104,23 +2857,6 @@ var fontWeightLabels = {
|
|
|
104
2857
|
};
|
|
105
2858
|
var defaultTileBaseUrl = "https://api.tileflow.dev";
|
|
106
2859
|
var defaultTileset = "world";
|
|
107
|
-
function defineTileflow(config) {
|
|
108
|
-
return config;
|
|
109
|
-
}
|
|
110
|
-
function validateConfig(input) {
|
|
111
|
-
const parsed = isProjectConfigLike(input) ? projectConfigSchema.safeParse(input) : configSchema.safeParse(input);
|
|
112
|
-
if (parsed.success) {
|
|
113
|
-
return { valid: true, messages: [] };
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
valid: false,
|
|
117
|
-
messages: parsed.error.issues.map((issue) => ({
|
|
118
|
-
level: "error",
|
|
119
|
-
path: issue.path.join(".") || "config",
|
|
120
|
-
message: issue.message
|
|
121
|
-
}))
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
2860
|
function createStyle(input = {}, options = {}) {
|
|
125
2861
|
const parsed = configSchema.safeParse(input);
|
|
126
2862
|
if (!parsed.success) {
|
|
@@ -128,54 +2864,103 @@ function createStyle(input = {}, options = {}) {
|
|
|
128
2864
|
throw new Error(`Invalid Tileflow config. ${message}`);
|
|
129
2865
|
}
|
|
130
2866
|
const config = parsed.data;
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
2867
|
+
const basemap = config.basemap ?? osm();
|
|
2868
|
+
const theme = resolveTheme(config.theme, options.themes);
|
|
2869
|
+
const density = config.density ?? theme.preset.density ?? defaultConfig.density;
|
|
2870
|
+
const roadModule = config.modules?.find(
|
|
2871
|
+
(moduleConfig) => moduleConfig.type === "roads"
|
|
2872
|
+
);
|
|
2873
|
+
const roads2 = resolveRoads(config.roads, roadModule, theme.preset.roads ?? defaultConfig.roads);
|
|
2874
|
+
const labels = config.labels ?? theme.preset.labels ?? defaultConfig.labels;
|
|
2875
|
+
const poi = config.poi ?? theme.preset.poi ?? defaultConfig.poi;
|
|
2876
|
+
const buildings = config.buildings ?? "flat";
|
|
2877
|
+
const colors = resolveColors(config.colors, theme.colors);
|
|
2878
|
+
const sourceId = config.tiles?.sourceId ?? basemap.sourceId ?? "tileflow";
|
|
137
2879
|
const tileBaseUrl = normalizeBaseUrl(options.tileBaseUrl);
|
|
138
|
-
const tileset = options.tileset ?? config.tileset ?? config.tiles?.tileset ?? defaultTileset;
|
|
139
|
-
const tilesUrl = config.tiles?.url ?? `${tileBaseUrl}/tiles/${tileset}/tiles.json`;
|
|
140
|
-
const typography = resolveTypography(config.typography,
|
|
2880
|
+
const tileset = options.tileset ?? config.tileset ?? config.tiles?.tileset ?? basemap.tileset ?? defaultTileset;
|
|
2881
|
+
const tilesUrl = config.tiles?.url ?? basemap.url ?? `${tileBaseUrl}/tiles/${tileset}/tiles.json`;
|
|
2882
|
+
const typography = resolveTypography(config.typography, theme.typography);
|
|
2883
|
+
const terrain = resolveTerrain(config.terrain, tileBaseUrl);
|
|
2884
|
+
const glyphs = config.glyphs ?? basemap.glyphs ?? `${tileBaseUrl}/fonts/{fontstack}/{range}.pbf`;
|
|
2885
|
+
const sprite = config.sprite ?? basemap.sprite;
|
|
2886
|
+
const attribution = config.tiles?.attribution ?? basemap.attribution ?? "\xA9 OpenMapTiles \xA9 OpenStreetMap contributors";
|
|
2887
|
+
const metadata = {
|
|
2888
|
+
"tileflow:basemap": basemap.type,
|
|
2889
|
+
"tileflow:theme": theme.name,
|
|
2890
|
+
"tileflow:themeMode": theme.mode,
|
|
2891
|
+
"tileflow:density": density,
|
|
2892
|
+
"tileflow:roads": roads2,
|
|
2893
|
+
"tileflow:labels": labels,
|
|
2894
|
+
"tileflow:poi": poi,
|
|
2895
|
+
"tileflow:buildings": buildings,
|
|
2896
|
+
"tileflow:modules": config.modules?.map((moduleConfig) => moduleConfig.type) ?? [],
|
|
2897
|
+
"tileflow:terrain": terrain ? {
|
|
2898
|
+
encoding: terrain.source.encoding,
|
|
2899
|
+
mode: terrain.mode,
|
|
2900
|
+
sourceId: terrain.sourceId
|
|
2901
|
+
} : void 0,
|
|
2902
|
+
"tileflow:typography": typography,
|
|
2903
|
+
"tileflow:colors": colors,
|
|
2904
|
+
"tileflow:tileBaseUrl": tileBaseUrl,
|
|
2905
|
+
"tileflow:tileset": tileset,
|
|
2906
|
+
"tileflow:tiles": "tileflow",
|
|
2907
|
+
"tileflow:view": config.view
|
|
2908
|
+
};
|
|
2909
|
+
if (shouldUseOsmBrightTemplate(config, basemap, theme)) {
|
|
2910
|
+
return createOsmBrightStyle({
|
|
2911
|
+
attribution,
|
|
2912
|
+
colors,
|
|
2913
|
+
glyphs,
|
|
2914
|
+
metadata,
|
|
2915
|
+
name: config.name ?? "OSM Bright",
|
|
2916
|
+
sourceId,
|
|
2917
|
+
sprite,
|
|
2918
|
+
terrain,
|
|
2919
|
+
theme,
|
|
2920
|
+
tilesUrl,
|
|
2921
|
+
typography
|
|
2922
|
+
});
|
|
2923
|
+
}
|
|
141
2924
|
const sourceLayers = resolveSourceLayers(
|
|
142
2925
|
{
|
|
143
2926
|
...defaultSourceLayers,
|
|
2927
|
+
...basemap.sourceLayers,
|
|
144
2928
|
...config.tiles?.sourceLayers
|
|
145
2929
|
},
|
|
146
2930
|
void 0
|
|
147
2931
|
);
|
|
148
2932
|
const layers = openMapTilesLayers(sourceId, sourceLayers, colors, {
|
|
2933
|
+
buildings,
|
|
149
2934
|
density,
|
|
150
2935
|
labels,
|
|
151
2936
|
poi,
|
|
152
|
-
roads,
|
|
2937
|
+
roads: roads2,
|
|
153
2938
|
typography
|
|
154
2939
|
});
|
|
2940
|
+
const resolvedLayers = terrain ? withTerrainLayers(layers, terrain) : layers;
|
|
155
2941
|
const style = {
|
|
156
2942
|
version: 8,
|
|
157
2943
|
name: config.name ?? "Tileflow",
|
|
158
|
-
glyphs
|
|
159
|
-
...
|
|
2944
|
+
glyphs,
|
|
2945
|
+
...sprite ? { sprite } : {},
|
|
160
2946
|
sources: {
|
|
161
2947
|
[sourceId]: {
|
|
162
2948
|
type: "vector",
|
|
163
2949
|
url: tilesUrl,
|
|
164
|
-
attribution
|
|
165
|
-
}
|
|
2950
|
+
attribution
|
|
2951
|
+
},
|
|
2952
|
+
...terrain ? {
|
|
2953
|
+
[terrain.sourceId]: terrain.source
|
|
2954
|
+
} : {}
|
|
166
2955
|
},
|
|
167
|
-
layers,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"tileflow:tileBaseUrl": tileBaseUrl,
|
|
176
|
-
"tileflow:tileset": tileset,
|
|
177
|
-
"tileflow:tiles": "tileflow"
|
|
178
|
-
}
|
|
2956
|
+
layers: resolvedLayers,
|
|
2957
|
+
...terrain?.mode === "3d" ? {
|
|
2958
|
+
terrain: {
|
|
2959
|
+
exaggeration: terrain.exaggeration,
|
|
2960
|
+
source: terrain.sourceId
|
|
2961
|
+
}
|
|
2962
|
+
} : {},
|
|
2963
|
+
metadata
|
|
179
2964
|
};
|
|
180
2965
|
return style;
|
|
181
2966
|
}
|
|
@@ -184,25 +2969,31 @@ function createStyleFromProject(projectConfig, mapName, options = {}) {
|
|
|
184
2969
|
if (!config) {
|
|
185
2970
|
throw new Error(`Unknown Tileflow map: ${mapName}`);
|
|
186
2971
|
}
|
|
187
|
-
const tilesetName = options.tileset ?? config.tileset ?? config.tiles?.tileset;
|
|
2972
|
+
const tilesetName = options.tileset ?? config.tileset ?? config.tiles?.tileset ?? config.basemap?.tileset;
|
|
188
2973
|
const tilesetConfig = tilesetName ? projectConfig.tilesets?.[tilesetName] : void 0;
|
|
189
2974
|
const resolvedTileset = tilesetConfig?.id ?? tilesetName ?? defaultTileset;
|
|
2975
|
+
const baseBasemap = config.basemap ?? osm();
|
|
2976
|
+
const { sourceLayers: tileSourceLayers, ...tileOptions } = config.tiles ?? {};
|
|
2977
|
+
const resolvedTileSourceLayers = baseBasemap.sourceLayers || !tileSourceLayers ? void 0 : resolveSourceLayers(tileSourceLayers, tilesetConfig?.sourceLayers);
|
|
190
2978
|
return createStyle(
|
|
191
2979
|
{
|
|
192
2980
|
...config,
|
|
193
2981
|
tileset: resolvedTileset,
|
|
2982
|
+
basemap: {
|
|
2983
|
+
...baseBasemap,
|
|
2984
|
+
tileset: resolvedTileset,
|
|
2985
|
+
attribution: baseBasemap.attribution ?? tilesetConfig?.attribution,
|
|
2986
|
+
sourceLayers: resolveSourceLayers(baseBasemap.sourceLayers, tilesetConfig?.sourceLayers)
|
|
2987
|
+
},
|
|
194
2988
|
tiles: {
|
|
195
|
-
...
|
|
2989
|
+
...tileOptions,
|
|
196
2990
|
tileset: resolvedTileset,
|
|
197
|
-
|
|
198
|
-
sourceLayers: resolveSourceLayers(
|
|
199
|
-
config.tiles?.sourceLayers,
|
|
200
|
-
tilesetConfig?.sourceLayers
|
|
201
|
-
)
|
|
2991
|
+
...resolvedTileSourceLayers ? { sourceLayers: resolvedTileSourceLayers } : {}
|
|
202
2992
|
}
|
|
203
2993
|
},
|
|
204
2994
|
{
|
|
205
2995
|
...options,
|
|
2996
|
+
themes: projectConfig.themes,
|
|
206
2997
|
tileset: resolvedTileset
|
|
207
2998
|
}
|
|
208
2999
|
);
|
|
@@ -215,35 +3006,98 @@ function createManifest(projectConfig, options = {}) {
|
|
|
215
3006
|
version: 1,
|
|
216
3007
|
tileBaseUrl,
|
|
217
3008
|
styles: Object.fromEntries(
|
|
218
|
-
maps.map((mapName) => [
|
|
219
|
-
mapName,
|
|
220
|
-
`${styleBaseUrl}/styles/${mapName}.json`
|
|
221
|
-
])
|
|
3009
|
+
maps.map((mapName) => [mapName, `${styleBaseUrl}/styles/${mapName}.json`])
|
|
222
3010
|
),
|
|
223
3011
|
maps: Object.fromEntries(
|
|
224
|
-
maps.map((mapName) => [
|
|
225
|
-
mapName,
|
|
226
|
-
`${styleBaseUrl}/styles/${mapName}.json`
|
|
227
|
-
])
|
|
3012
|
+
maps.map((mapName) => [mapName, `${styleBaseUrl}/styles/${mapName}.json`])
|
|
228
3013
|
)
|
|
229
3014
|
};
|
|
230
3015
|
}
|
|
231
3016
|
function getDefaultColors() {
|
|
232
3017
|
return defaultColors;
|
|
233
3018
|
}
|
|
234
|
-
function
|
|
3019
|
+
function resolveTheme(theme, projectThemes) {
|
|
3020
|
+
if (!theme) {
|
|
3021
|
+
return resolveLegacyTheme("light");
|
|
3022
|
+
}
|
|
3023
|
+
if (typeof theme === "string") {
|
|
3024
|
+
const projectTheme = projectThemes?.[theme];
|
|
3025
|
+
if (projectTheme) {
|
|
3026
|
+
return resolveThemeConfig(theme, projectTheme);
|
|
3027
|
+
}
|
|
3028
|
+
if (isLegacyTheme(theme)) {
|
|
3029
|
+
return resolveLegacyTheme(theme);
|
|
3030
|
+
}
|
|
3031
|
+
throw new Error(`Unknown Tileflow theme: ${theme}`);
|
|
3032
|
+
}
|
|
3033
|
+
return resolveThemeConfig("inline", theme);
|
|
3034
|
+
}
|
|
3035
|
+
function resolveLegacyTheme(theme) {
|
|
3036
|
+
const preset = themePresets[theme];
|
|
3037
|
+
return {
|
|
3038
|
+
colors: preset.colors,
|
|
3039
|
+
custom: false,
|
|
3040
|
+
mode: theme === "dark" ? "dark" : "light",
|
|
3041
|
+
name: theme,
|
|
3042
|
+
preset,
|
|
3043
|
+
typography: defaultTypography
|
|
3044
|
+
};
|
|
3045
|
+
}
|
|
3046
|
+
function resolveThemeConfig(name, theme) {
|
|
3047
|
+
const colors = normalizeColorAliases(theme.colors);
|
|
3048
|
+
const preset = theme.mode === "dark" ? themePresets.dark : theme.mode === "light" ? themePresets.light : themePresets.standard;
|
|
3049
|
+
return {
|
|
3050
|
+
colors: {
|
|
3051
|
+
...preset.colors,
|
|
3052
|
+
...colors
|
|
3053
|
+
},
|
|
3054
|
+
custom: true,
|
|
3055
|
+
mode: theme.mode,
|
|
3056
|
+
name,
|
|
3057
|
+
preset,
|
|
3058
|
+
typography: resolveTypography(theme.typography, defaultTypography)
|
|
3059
|
+
};
|
|
3060
|
+
}
|
|
3061
|
+
function isLegacyTheme(value) {
|
|
3062
|
+
return value in themePresets;
|
|
3063
|
+
}
|
|
3064
|
+
function normalizeColorAliases(colors) {
|
|
3065
|
+
if (!colors) {
|
|
3066
|
+
return {};
|
|
3067
|
+
}
|
|
3068
|
+
return {
|
|
3069
|
+
...colors,
|
|
3070
|
+
canvas: colors.canvas ?? colors.background,
|
|
3071
|
+
nature: colors.nature ?? colors.park
|
|
3072
|
+
};
|
|
3073
|
+
}
|
|
3074
|
+
function resolveRoads(legacyRoads, moduleConfig, fallback) {
|
|
3075
|
+
if (!moduleConfig) {
|
|
3076
|
+
return legacyRoads ?? fallback;
|
|
3077
|
+
}
|
|
3078
|
+
if (moduleConfig.preset === "minimal" || moduleConfig.density === "clean") {
|
|
3079
|
+
return "soft";
|
|
3080
|
+
}
|
|
3081
|
+
if (moduleConfig.density === "dense") {
|
|
3082
|
+
return "detailed";
|
|
3083
|
+
}
|
|
3084
|
+
return "standard";
|
|
3085
|
+
}
|
|
3086
|
+
function resolveColors(overrides = {}, defaults = defaultColors) {
|
|
235
3087
|
const colors = {
|
|
236
|
-
...
|
|
237
|
-
canvas: overrides.canvas ?? overrides.background ?? defaultColors.canvas,
|
|
238
|
-
land: overrides.land ?? defaultColors.land,
|
|
239
|
-
water: overrides.water ?? defaultColors.water,
|
|
240
|
-
nature: overrides.nature ?? overrides.park ?? defaultColors.nature,
|
|
241
|
-
road: overrides.road ?? defaultColors.road,
|
|
242
|
-
text: overrides.text ?? defaultColors.text,
|
|
243
|
-
accent: overrides.accent ?? defaultColors.accent,
|
|
244
|
-
building: overrides.building
|
|
3088
|
+
...defaults,
|
|
3089
|
+
canvas: overrides.canvas ?? overrides.background ?? defaults.canvas ?? defaultColors.canvas,
|
|
3090
|
+
land: overrides.land ?? defaults.land ?? defaultColors.land,
|
|
3091
|
+
water: overrides.water ?? defaults.water ?? defaultColors.water,
|
|
3092
|
+
nature: overrides.nature ?? overrides.park ?? defaults.nature ?? defaults.park ?? defaultColors.nature,
|
|
3093
|
+
road: overrides.road ?? defaults.road ?? defaultColors.road,
|
|
3094
|
+
text: overrides.text ?? defaults.text ?? defaultColors.text,
|
|
3095
|
+
accent: overrides.accent ?? defaults.accent ?? defaultColors.accent,
|
|
3096
|
+
building: overrides.building ?? defaults.building,
|
|
3097
|
+
roadCasing: overrides.roadCasing ?? defaults.roadCasing
|
|
245
3098
|
};
|
|
246
|
-
const building = colors.building ?? mix(colors.land, colors.
|
|
3099
|
+
const building = colors.building ?? mix(colors.land, colors.text, 0.08);
|
|
3100
|
+
const roadCasing = colors.roadCasing ?? mix(colors.road, colors.text, 0.2);
|
|
247
3101
|
return {
|
|
248
3102
|
canvas: cssColor(colors.canvas),
|
|
249
3103
|
land: cssColor(colors.land),
|
|
@@ -253,13 +3107,38 @@ function resolveColors(overrides = {}) {
|
|
|
253
3107
|
text: cssColor(colors.text),
|
|
254
3108
|
accent: cssColor(colors.accent),
|
|
255
3109
|
building: cssColor(building),
|
|
256
|
-
roadCasing:
|
|
3110
|
+
roadCasing: cssColor(roadCasing),
|
|
257
3111
|
roadMajor: mix(colors.road, colors.accent, 0.16),
|
|
258
3112
|
roadMinor: cssColor(colors.road),
|
|
259
3113
|
textHalo: alpha(colors.canvas, 0.84),
|
|
260
3114
|
textMuted: mix(colors.text, colors.canvas, 0.42)
|
|
261
3115
|
};
|
|
262
3116
|
}
|
|
3117
|
+
function resolveTerrain(terrain, tileBaseUrl) {
|
|
3118
|
+
if (!terrain || terrain === "none") {
|
|
3119
|
+
return void 0;
|
|
3120
|
+
}
|
|
3121
|
+
const terrainConfig = typeof terrain === "string" ? { mode: terrain } : terrain;
|
|
3122
|
+
const mode = terrainConfig.mode ?? "hillshade";
|
|
3123
|
+
if (mode === "none") {
|
|
3124
|
+
return void 0;
|
|
3125
|
+
}
|
|
3126
|
+
const sourceId = terrainConfig.sourceId ?? "tileflow-terrain";
|
|
3127
|
+
const tileset = terrainConfig.tileset ?? "terrain";
|
|
3128
|
+
const url = terrainConfig.url ?? `${tileBaseUrl}/tiles/${tileset}/tiles.json`;
|
|
3129
|
+
const encoding = terrainConfig.encoding ?? "terrarium";
|
|
3130
|
+
return {
|
|
3131
|
+
exaggeration: terrainConfig.exaggeration ?? 1.2,
|
|
3132
|
+
mode,
|
|
3133
|
+
sourceId,
|
|
3134
|
+
source: {
|
|
3135
|
+
attribution: terrainConfig.attribution,
|
|
3136
|
+
encoding,
|
|
3137
|
+
type: "raster-dem",
|
|
3138
|
+
url
|
|
3139
|
+
}
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
263
3142
|
function resolveTypography(overrides = {}, defaults = defaultTypography) {
|
|
264
3143
|
return {
|
|
265
3144
|
...defaults,
|
|
@@ -273,6 +3152,158 @@ function resolveSourceLayers(mapLayers, tilesetLayers) {
|
|
|
273
3152
|
...mapLayers
|
|
274
3153
|
};
|
|
275
3154
|
}
|
|
3155
|
+
function shouldUseOsmBrightTemplate(config, basemap, theme) {
|
|
3156
|
+
const templateTheme = theme.custom || theme.name === "light" || theme.name === "dark";
|
|
3157
|
+
return basemap.type === "osm" && templateTheme && !config.colors && !config.typography && !config.density && !config.roads && !config.labels && !config.poi && !config.buildings && !config.modules?.length && !basemap.sourceLayers && !config.tiles?.sourceLayers;
|
|
3158
|
+
}
|
|
3159
|
+
function createOsmBrightStyle(options) {
|
|
3160
|
+
const template = cloneJson(style_default);
|
|
3161
|
+
const layers = template.layers.map((layer) => remapOsmBrightSource(layer, options.sourceId));
|
|
3162
|
+
const themedLayers = applyOsmBrightTheme(
|
|
3163
|
+
layers,
|
|
3164
|
+
options.colors,
|
|
3165
|
+
options.theme,
|
|
3166
|
+
options.typography
|
|
3167
|
+
);
|
|
3168
|
+
const resolvedLayers = options.terrain ? withTerrainLayers(themedLayers, options.terrain) : themedLayers;
|
|
3169
|
+
return {
|
|
3170
|
+
...template,
|
|
3171
|
+
name: options.name,
|
|
3172
|
+
glyphs: options.glyphs,
|
|
3173
|
+
...options.sprite || template.sprite ? { sprite: options.sprite ?? template.sprite } : {},
|
|
3174
|
+
sources: {
|
|
3175
|
+
[options.sourceId]: {
|
|
3176
|
+
type: "vector",
|
|
3177
|
+
url: options.tilesUrl,
|
|
3178
|
+
attribution: options.attribution
|
|
3179
|
+
},
|
|
3180
|
+
...options.terrain ? {
|
|
3181
|
+
[options.terrain.sourceId]: options.terrain.source
|
|
3182
|
+
} : {}
|
|
3183
|
+
},
|
|
3184
|
+
layers: resolvedLayers,
|
|
3185
|
+
...options.terrain?.mode === "3d" ? {
|
|
3186
|
+
terrain: {
|
|
3187
|
+
exaggeration: options.terrain.exaggeration,
|
|
3188
|
+
source: options.terrain.sourceId
|
|
3189
|
+
}
|
|
3190
|
+
} : {},
|
|
3191
|
+
metadata: {
|
|
3192
|
+
...template.metadata ?? {},
|
|
3193
|
+
...options.metadata,
|
|
3194
|
+
"tileflow:template": "openmaptiles-osm-bright"
|
|
3195
|
+
}
|
|
3196
|
+
};
|
|
3197
|
+
}
|
|
3198
|
+
function cloneJson(value) {
|
|
3199
|
+
return JSON.parse(JSON.stringify(value));
|
|
3200
|
+
}
|
|
3201
|
+
function remapOsmBrightSource(layer, sourceId) {
|
|
3202
|
+
if (layer.source !== "openmaptiles") {
|
|
3203
|
+
return layer;
|
|
3204
|
+
}
|
|
3205
|
+
return {
|
|
3206
|
+
...layer,
|
|
3207
|
+
source: sourceId
|
|
3208
|
+
};
|
|
3209
|
+
}
|
|
3210
|
+
function applyOsmBrightTheme(layers, colors, theme, typography) {
|
|
3211
|
+
if (!theme.custom && theme.name === "light") {
|
|
3212
|
+
return layers;
|
|
3213
|
+
}
|
|
3214
|
+
return layers.map((layer) => {
|
|
3215
|
+
const type = stringValue(layer.type);
|
|
3216
|
+
const sourceLayer = stringValue(layer["source-layer"]);
|
|
3217
|
+
const id = stringValue(layer.id);
|
|
3218
|
+
const nextLayer = { ...layer };
|
|
3219
|
+
const paint = isRecord(layer.paint) ? { ...layer.paint } : {};
|
|
3220
|
+
const layout = isRecord(layer.layout) ? { ...layer.layout } : {};
|
|
3221
|
+
let paintChanged = false;
|
|
3222
|
+
let layoutChanged = false;
|
|
3223
|
+
if (type === "background") {
|
|
3224
|
+
paint["background-color"] = colors.canvas;
|
|
3225
|
+
paintChanged = true;
|
|
3226
|
+
}
|
|
3227
|
+
if (type === "fill") {
|
|
3228
|
+
const fillColor = osmBrightFillColor(id, sourceLayer, colors);
|
|
3229
|
+
if (fillColor) {
|
|
3230
|
+
paint["fill-color"] = fillColor;
|
|
3231
|
+
paintChanged = true;
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
if (type === "line") {
|
|
3235
|
+
const lineColor = osmBrightLineColor(id, sourceLayer, colors);
|
|
3236
|
+
if (lineColor) {
|
|
3237
|
+
paint["line-color"] = lineColor;
|
|
3238
|
+
paintChanged = true;
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
if (type === "symbol") {
|
|
3242
|
+
const textColor = osmBrightTextColor(id, sourceLayer, colors);
|
|
3243
|
+
if (textColor && ("text-color" in paint || id.includes("label") || id.includes("name"))) {
|
|
3244
|
+
paint["text-color"] = textColor;
|
|
3245
|
+
paintChanged = true;
|
|
3246
|
+
}
|
|
3247
|
+
if ("text-halo-color" in paint) {
|
|
3248
|
+
paint["text-halo-color"] = colors.textHalo;
|
|
3249
|
+
paintChanged = true;
|
|
3250
|
+
}
|
|
3251
|
+
if (theme.custom && "text-font" in layout) {
|
|
3252
|
+
layout["text-font"] = textFont(typography);
|
|
3253
|
+
layoutChanged = true;
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
if (paintChanged) {
|
|
3257
|
+
nextLayer.paint = paint;
|
|
3258
|
+
}
|
|
3259
|
+
if (layoutChanged) {
|
|
3260
|
+
nextLayer.layout = layout;
|
|
3261
|
+
}
|
|
3262
|
+
return nextLayer;
|
|
3263
|
+
});
|
|
3264
|
+
}
|
|
3265
|
+
function osmBrightFillColor(id, sourceLayer, colors) {
|
|
3266
|
+
if (sourceLayer === "water" || id.includes("water")) {
|
|
3267
|
+
return colors.water;
|
|
3268
|
+
}
|
|
3269
|
+
if (sourceLayer === "building") {
|
|
3270
|
+
return colors.building;
|
|
3271
|
+
}
|
|
3272
|
+
if (sourceLayer === "landcover" || id.includes("park") || id.includes("wood")) {
|
|
3273
|
+
return colors.nature;
|
|
3274
|
+
}
|
|
3275
|
+
if (sourceLayer === "landuse" || id.includes("landuse")) {
|
|
3276
|
+
return colors.land;
|
|
3277
|
+
}
|
|
3278
|
+
return void 0;
|
|
3279
|
+
}
|
|
3280
|
+
function osmBrightLineColor(id, sourceLayer, colors) {
|
|
3281
|
+
if (sourceLayer === "transportation") {
|
|
3282
|
+
return id.includes("case") || id.includes("casing") ? colors.roadCasing : colors.road;
|
|
3283
|
+
}
|
|
3284
|
+
if (sourceLayer === "waterway") {
|
|
3285
|
+
return colors.water;
|
|
3286
|
+
}
|
|
3287
|
+
if (sourceLayer === "boundary") {
|
|
3288
|
+
return colors.textMuted;
|
|
3289
|
+
}
|
|
3290
|
+
return void 0;
|
|
3291
|
+
}
|
|
3292
|
+
function osmBrightTextColor(id, sourceLayer, colors) {
|
|
3293
|
+
if (sourceLayer === "water_name" || id.includes("water")) {
|
|
3294
|
+
return colors.water;
|
|
3295
|
+
}
|
|
3296
|
+
if (sourceLayer === "transportation_name") {
|
|
3297
|
+
return colors.textMuted;
|
|
3298
|
+
}
|
|
3299
|
+
return colors.text;
|
|
3300
|
+
}
|
|
3301
|
+
function isRecord(value) {
|
|
3302
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
3303
|
+
}
|
|
3304
|
+
function stringValue(value) {
|
|
3305
|
+
return typeof value === "string" ? value : "";
|
|
3306
|
+
}
|
|
276
3307
|
function normalizeBaseUrl(value) {
|
|
277
3308
|
return normalizeUrl(value ?? defaultTileBaseUrl);
|
|
278
3309
|
}
|
|
@@ -282,11 +3313,6 @@ function normalizeStyleBaseUrl(value) {
|
|
|
282
3313
|
function normalizeUrl(value) {
|
|
283
3314
|
return value.replace(/\/+$/, "");
|
|
284
3315
|
}
|
|
285
|
-
function isProjectConfigLike(input) {
|
|
286
|
-
return Boolean(
|
|
287
|
-
input && typeof input === "object" && "maps" in input && typeof input.maps === "object"
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
3316
|
function textFont(typography) {
|
|
291
3317
|
return [`${typography.font} ${fontWeightLabels[typography.weight]}`];
|
|
292
3318
|
}
|
|
@@ -312,34 +3338,82 @@ function openMapTilesLayers(source, sourceLayers, colors, options) {
|
|
|
312
3338
|
}
|
|
313
3339
|
},
|
|
314
3340
|
fillLayer("landuse", source, sourceLayers.landuse, colors.land, 0.42),
|
|
315
|
-
fillLayer(
|
|
316
|
-
"parks",
|
|
317
|
-
source,
|
|
318
|
-
sourceLayers.park,
|
|
319
|
-
colors.nature,
|
|
320
|
-
parkOpacity(options.density)
|
|
321
|
-
),
|
|
3341
|
+
fillLayer("parks", source, sourceLayers.park, colors.nature, parkOpacity(options.density)),
|
|
322
3342
|
fillLayer("water", source, sourceLayers.water, colors.water, 1),
|
|
323
|
-
...buildingLayers(source, sourceLayers.building, colors, options.density),
|
|
3343
|
+
...buildingLayers(source, sourceLayers.building, colors, options.density, options.buildings),
|
|
324
3344
|
...roadLayers(source, sourceLayers.road, colors, options.roads),
|
|
325
3345
|
...boundaryLayers(source, sourceLayers.boundary, colors),
|
|
326
|
-
...labelLayers(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
3346
|
+
...labelLayers(source, sourceLayers.place, colors, options.labels, options.typography),
|
|
3347
|
+
...poiLayers(source, sourceLayers.poi, colors, options.poi, options.typography)
|
|
3348
|
+
];
|
|
3349
|
+
}
|
|
3350
|
+
function withTerrainLayers(layers, terrain) {
|
|
3351
|
+
const hillshadeLayer = {
|
|
3352
|
+
id: "terrain-hillshade",
|
|
3353
|
+
type: "hillshade",
|
|
3354
|
+
source: terrain.sourceId,
|
|
3355
|
+
maxzoom: 15,
|
|
3356
|
+
paint: {
|
|
3357
|
+
"hillshade-accent-color": "rgba(255, 255, 255, 0.18)",
|
|
3358
|
+
"hillshade-exaggeration": terrain.mode === "3d" ? 0.24 : 0.42,
|
|
3359
|
+
"hillshade-highlight-color": "rgba(255, 255, 255, 0.28)",
|
|
3360
|
+
"hillshade-shadow-color": "rgba(38, 44, 50, 0.34)"
|
|
3361
|
+
}
|
|
3362
|
+
};
|
|
3363
|
+
const insertionIndex = layers.findIndex((layer) => layer.id === "water");
|
|
3364
|
+
if (insertionIndex === -1) {
|
|
3365
|
+
return [hillshadeLayer, ...layers];
|
|
3366
|
+
}
|
|
3367
|
+
return [
|
|
3368
|
+
...layers.slice(0, insertionIndex + 1),
|
|
3369
|
+
hillshadeLayer,
|
|
3370
|
+
...layers.slice(insertionIndex + 1)
|
|
340
3371
|
];
|
|
341
3372
|
}
|
|
342
|
-
function buildingLayers(source, sourceLayer, colors, density) {
|
|
3373
|
+
function buildingLayers(source, sourceLayer, colors, density, buildings) {
|
|
3374
|
+
if (buildings === "hidden") {
|
|
3375
|
+
return [];
|
|
3376
|
+
}
|
|
3377
|
+
if (buildings === "3d") {
|
|
3378
|
+
return [
|
|
3379
|
+
{
|
|
3380
|
+
id: "buildings-3d",
|
|
3381
|
+
type: "fill-extrusion",
|
|
3382
|
+
source,
|
|
3383
|
+
"source-layer": sourceLayer,
|
|
3384
|
+
minzoom: 14,
|
|
3385
|
+
filter: ["!=", ["get", "hide_3d"], true],
|
|
3386
|
+
paint: {
|
|
3387
|
+
"fill-extrusion-base": [
|
|
3388
|
+
"case",
|
|
3389
|
+
["has", "render_min_height"],
|
|
3390
|
+
["to-number", ["get", "render_min_height"]],
|
|
3391
|
+
["has", "min_height"],
|
|
3392
|
+
["to-number", ["get", "min_height"]],
|
|
3393
|
+
0
|
|
3394
|
+
],
|
|
3395
|
+
"fill-extrusion-color": colors.building,
|
|
3396
|
+
"fill-extrusion-height": [
|
|
3397
|
+
"interpolate",
|
|
3398
|
+
["linear"],
|
|
3399
|
+
["zoom"],
|
|
3400
|
+
14,
|
|
3401
|
+
0,
|
|
3402
|
+
15,
|
|
3403
|
+
[
|
|
3404
|
+
"case",
|
|
3405
|
+
["has", "render_height"],
|
|
3406
|
+
["to-number", ["get", "render_height"]],
|
|
3407
|
+
["has", "height"],
|
|
3408
|
+
["to-number", ["get", "height"]],
|
|
3409
|
+
18
|
|
3410
|
+
]
|
|
3411
|
+
],
|
|
3412
|
+
"fill-extrusion-opacity": 0.72
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
];
|
|
3416
|
+
}
|
|
343
3417
|
if (density === "clean") {
|
|
344
3418
|
return [
|
|
345
3419
|
{
|
|
@@ -381,12 +3455,12 @@ function buildingLayers(source, sourceLayer, colors, density) {
|
|
|
381
3455
|
}
|
|
382
3456
|
];
|
|
383
3457
|
}
|
|
384
|
-
function roadLayers(source, sourceLayer, colors,
|
|
385
|
-
if (
|
|
3458
|
+
function roadLayers(source, sourceLayer, colors, roads2) {
|
|
3459
|
+
if (roads2 === "hidden") {
|
|
386
3460
|
return [];
|
|
387
3461
|
}
|
|
388
|
-
const opacity =
|
|
389
|
-
const casingOpacity =
|
|
3462
|
+
const opacity = roads2 === "soft" ? 0.72 : roads2 === "standard" ? 0.84 : 0.96;
|
|
3463
|
+
const casingOpacity = roads2 === "detailed" ? 0.3 : 0.16;
|
|
390
3464
|
const majorRoadFilter = [
|
|
391
3465
|
"match",
|
|
392
3466
|
["get", "class"],
|
|
@@ -395,7 +3469,22 @@ function roadLayers(source, sourceLayer, colors, roads) {
|
|
|
395
3469
|
false
|
|
396
3470
|
];
|
|
397
3471
|
const minorRoadFilter = ["!", majorRoadFilter];
|
|
3472
|
+
const nonTunnelRoadFilter = ["!=", ["get", "brunnel"], "tunnel"];
|
|
398
3473
|
return [
|
|
3474
|
+
{
|
|
3475
|
+
id: "roads-tunnels-casing",
|
|
3476
|
+
type: "line",
|
|
3477
|
+
source,
|
|
3478
|
+
"source-layer": sourceLayer,
|
|
3479
|
+
minzoom: 10,
|
|
3480
|
+
filter: ["==", ["get", "brunnel"], "tunnel"],
|
|
3481
|
+
paint: {
|
|
3482
|
+
"line-color": colors.roadCasing,
|
|
3483
|
+
"line-dasharray": [0.6, 0.8],
|
|
3484
|
+
"line-opacity": 0.28,
|
|
3485
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 10, 0.5, 14, 1.7, 16, 3.8]
|
|
3486
|
+
}
|
|
3487
|
+
},
|
|
399
3488
|
{
|
|
400
3489
|
id: "roads-tunnels",
|
|
401
3490
|
type: "line",
|
|
@@ -406,18 +3495,8 @@ function roadLayers(source, sourceLayer, colors, roads) {
|
|
|
406
3495
|
paint: {
|
|
407
3496
|
"line-color": colors.roadMinor,
|
|
408
3497
|
"line-dasharray": [0.6, 0.8],
|
|
409
|
-
"line-opacity":
|
|
410
|
-
"line-width": [
|
|
411
|
-
"interpolate",
|
|
412
|
-
["linear"],
|
|
413
|
-
["zoom"],
|
|
414
|
-
10,
|
|
415
|
-
0.25,
|
|
416
|
-
14,
|
|
417
|
-
1,
|
|
418
|
-
16,
|
|
419
|
-
2.4
|
|
420
|
-
]
|
|
3498
|
+
"line-opacity": 0.2,
|
|
3499
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 10, 0.25, 14, 1, 16, 2.4]
|
|
421
3500
|
}
|
|
422
3501
|
},
|
|
423
3502
|
{
|
|
@@ -426,20 +3505,11 @@ function roadLayers(source, sourceLayer, colors, roads) {
|
|
|
426
3505
|
source,
|
|
427
3506
|
"source-layer": sourceLayer,
|
|
428
3507
|
minzoom: 6,
|
|
3508
|
+
filter: nonTunnelRoadFilter,
|
|
429
3509
|
paint: {
|
|
430
3510
|
"line-color": colors.roadCasing,
|
|
431
3511
|
"line-opacity": casingOpacity,
|
|
432
|
-
"line-width": [
|
|
433
|
-
"interpolate",
|
|
434
|
-
["linear"],
|
|
435
|
-
["zoom"],
|
|
436
|
-
6,
|
|
437
|
-
0.4,
|
|
438
|
-
12,
|
|
439
|
-
1.2,
|
|
440
|
-
16,
|
|
441
|
-
4
|
|
442
|
-
]
|
|
3512
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 6, 0.4, 12, 1.2, 16, 4]
|
|
443
3513
|
}
|
|
444
3514
|
},
|
|
445
3515
|
{
|
|
@@ -448,21 +3518,11 @@ function roadLayers(source, sourceLayer, colors, roads) {
|
|
|
448
3518
|
source,
|
|
449
3519
|
"source-layer": sourceLayer,
|
|
450
3520
|
minzoom: 6,
|
|
451
|
-
filter: minorRoadFilter,
|
|
3521
|
+
filter: ["all", nonTunnelRoadFilter, minorRoadFilter],
|
|
452
3522
|
paint: {
|
|
453
3523
|
"line-color": colors.roadMinor,
|
|
454
3524
|
"line-opacity": opacity * 0.88,
|
|
455
|
-
"line-width": [
|
|
456
|
-
"interpolate",
|
|
457
|
-
["linear"],
|
|
458
|
-
["zoom"],
|
|
459
|
-
6,
|
|
460
|
-
0.2,
|
|
461
|
-
12,
|
|
462
|
-
0.8,
|
|
463
|
-
16,
|
|
464
|
-
3
|
|
465
|
-
]
|
|
3525
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 6, 0.2, 12, 0.8, 16, 3]
|
|
466
3526
|
}
|
|
467
3527
|
},
|
|
468
3528
|
{
|
|
@@ -471,21 +3531,11 @@ function roadLayers(source, sourceLayer, colors, roads) {
|
|
|
471
3531
|
source,
|
|
472
3532
|
"source-layer": sourceLayer,
|
|
473
3533
|
minzoom: 5,
|
|
474
|
-
filter: majorRoadFilter,
|
|
3534
|
+
filter: ["all", nonTunnelRoadFilter, majorRoadFilter],
|
|
475
3535
|
paint: {
|
|
476
3536
|
"line-color": colors.roadMajor,
|
|
477
3537
|
"line-opacity": opacity,
|
|
478
|
-
"line-width": [
|
|
479
|
-
"interpolate",
|
|
480
|
-
["linear"],
|
|
481
|
-
["zoom"],
|
|
482
|
-
5,
|
|
483
|
-
0.35,
|
|
484
|
-
12,
|
|
485
|
-
1.2,
|
|
486
|
-
16,
|
|
487
|
-
4
|
|
488
|
-
]
|
|
3538
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 5, 0.35, 12, 1.2, 16, 4]
|
|
489
3539
|
}
|
|
490
3540
|
},
|
|
491
3541
|
{
|
|
@@ -498,17 +3548,7 @@ function roadLayers(source, sourceLayer, colors, roads) {
|
|
|
498
3548
|
paint: {
|
|
499
3549
|
"line-color": mix(colors.roadMajor, colors.canvas, 0.14),
|
|
500
3550
|
"line-opacity": opacity,
|
|
501
|
-
"line-width": [
|
|
502
|
-
"interpolate",
|
|
503
|
-
["linear"],
|
|
504
|
-
["zoom"],
|
|
505
|
-
10,
|
|
506
|
-
0.45,
|
|
507
|
-
14,
|
|
508
|
-
1.6,
|
|
509
|
-
16,
|
|
510
|
-
4.4
|
|
511
|
-
]
|
|
3551
|
+
"line-width": ["interpolate", ["linear"], ["zoom"], 10, 0.45, 14, 1.6, 16, 4.4]
|
|
512
3552
|
}
|
|
513
3553
|
}
|
|
514
3554
|
];
|
|
@@ -545,17 +3585,7 @@ function labelLayers(source, sourceLayer, colors, labels, typography) {
|
|
|
545
3585
|
layout: {
|
|
546
3586
|
"text-field": ["coalesce", ["get", "name:en"], ["get", "name"]],
|
|
547
3587
|
"text-font": textFont(typography),
|
|
548
|
-
"text-size": [
|
|
549
|
-
"interpolate",
|
|
550
|
-
["linear"],
|
|
551
|
-
["zoom"],
|
|
552
|
-
3,
|
|
553
|
-
10,
|
|
554
|
-
8,
|
|
555
|
-
13,
|
|
556
|
-
14,
|
|
557
|
-
17
|
|
558
|
-
],
|
|
3588
|
+
"text-size": ["interpolate", ["linear"], ["zoom"], 3, 10, 8, 13, 14, 17],
|
|
559
3589
|
"text-letter-spacing": 0,
|
|
560
3590
|
"text-padding": 4
|
|
561
3591
|
},
|
|
@@ -648,11 +3678,27 @@ function roundAlpha(value) {
|
|
|
648
3678
|
function rgbToHex(r, g, b) {
|
|
649
3679
|
return `#${[r, g, b].map((value) => value.toString(16).padStart(2, "0")).join("")}`;
|
|
650
3680
|
}
|
|
3681
|
+
|
|
3682
|
+
// src/config.ts
|
|
3683
|
+
function defineTileflow(config) {
|
|
3684
|
+
return config;
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
// src/modules.ts
|
|
3688
|
+
function roads(options = {}) {
|
|
3689
|
+
return {
|
|
3690
|
+
type: "roads",
|
|
3691
|
+
preset: options.preset ?? "modern",
|
|
3692
|
+
...options.density ? { density: options.density } : {}
|
|
3693
|
+
};
|
|
3694
|
+
}
|
|
651
3695
|
export {
|
|
652
3696
|
createManifest,
|
|
653
3697
|
createStyle,
|
|
654
3698
|
createStyleFromProject,
|
|
655
3699
|
defineTileflow,
|
|
656
3700
|
getDefaultColors,
|
|
3701
|
+
osm,
|
|
3702
|
+
roads,
|
|
657
3703
|
validateConfig
|
|
658
3704
|
};
|