@swr-data-lab/components 2.2.0 → 2.3.1

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.
@@ -1,6 +1,10 @@
1
1
  import {} from '../../types';
2
2
  import tokens from '../tokens';
3
3
  const street_layout = {
4
+ 'line-join': 'round',
5
+ 'line-cap': 'round'
6
+ };
7
+ const case_layout = {
4
8
  'line-join': 'round',
5
9
  'line-cap': 'butt'
6
10
  };
@@ -21,8 +25,8 @@ const motorway = {
21
25
  ]
22
26
  }
23
27
  };
24
- const motorway_outline = {
25
- line_color: tokens.street_primary_outline,
28
+ const motorway_case = {
29
+ line_color: tokens.street_primary_case,
26
30
  line_width: {
27
31
  stops: [
28
32
  [10, 0],
@@ -41,7 +45,7 @@ const motorway_link = {
41
45
  ]
42
46
  }
43
47
  };
44
- const motorway_link_outline = {
48
+ const motorway_link_case = {
45
49
  line_width: {
46
50
  stops: [
47
51
  [6, 0],
@@ -56,9 +60,8 @@ const street_primary = {
56
60
  line_width: {
57
61
  stops: [
58
62
  [8, 0],
59
- [10, 1],
60
- [12, 2],
61
- [14, 3],
63
+ [13, 1],
64
+ [15, 2],
62
65
  [16, 10],
63
66
  [18, 34],
64
67
  [19, 70],
@@ -72,13 +75,13 @@ const street_primary = {
72
75
  ]
73
76
  }
74
77
  };
75
- const street_primary_outline = {
76
- line_color: tokens.street_primary_outline,
78
+ const street_primary_case = {
79
+ line_color: tokens.street_primary_case,
77
80
  line_width: {
78
81
  stops: [
79
- [11, 0],
80
- [12, 2],
81
- [14, 5],
82
+ [8, 0],
83
+ [13, 2],
84
+ [15, 4],
82
85
  [16, 12],
83
86
  [18, 36],
84
87
  [19, 74],
@@ -93,24 +96,26 @@ const street_primary_outline = {
93
96
  }
94
97
  };
95
98
  const street_secondary = {
99
+ line_color: tokens.street_secondary,
96
100
  line_width: {
97
101
  stops: [
98
- [11, 1],
99
- [14, 4],
100
- [16, 6],
102
+ [12, 1],
103
+ [14, 2],
104
+ [16, 8],
101
105
  [18, 28],
102
106
  [19, 64],
103
107
  [20, 130]
104
108
  ]
105
109
  }
106
110
  };
107
- const street_secondary_outline = {
111
+ const street_secondary_case = {
108
112
  line_width: {
109
113
  stops: [
110
- [12, 2],
111
- [14, 5],
112
- [16, 7],
113
- [18, 14],
114
+ [12, 0],
115
+ [14, 3],
116
+ [16, 10],
117
+ [18, 30],
118
+ [19, 66],
114
119
  [20, 40]
115
120
  ]
116
121
  }
@@ -134,8 +139,8 @@ const street_residential = {
134
139
  ]
135
140
  }
136
141
  };
137
- const street_residential_outline = {
138
- line_color: tokens.street_tertiary_outline,
142
+ const street_residential_case = {
143
+ line_color: tokens.street_tertiary_case,
139
144
  line_width: {
140
145
  stops: [
141
146
  [14, 0],
@@ -152,94 +157,29 @@ const street_residential_outline = {
152
157
  export default function makeRoads() {
153
158
  const roadLabels = [
154
159
  {
155
- id: 'label-street-livingstreet',
156
- filter: ['==', 'kind', 'living_street'],
157
- minzoom: 14,
158
- layout: {
159
- 'text-field': '{name_de}',
160
- 'text-font': tokens.sans_regular,
161
- 'symbol-placement': 'line',
162
- 'text-anchor': 'center',
163
- 'text-size': {
164
- stops: [
165
- [12, 10],
166
- [15, 13]
167
- ]
168
- }
169
- },
170
- paint: {
171
- 'text-color': 'hsl(240,0%,23%)',
172
- 'text-halo-color': 'hsla(0,0%,100%,0.8)',
173
- 'text-halo-width': 2,
174
- 'text-halo-blur': 1
175
- }
176
- },
177
- {
178
- id: 'label-street-residential',
179
- filter: ['==', 'kind', 'residential'],
160
+ id: 'label-street-misc',
161
+ filter: ['in', 'kind', 'residential', 'livingstreet', 'unclassified'],
180
162
  minzoom: 15,
181
163
  layout: {
182
- 'text-field': '{name_de}',
183
- 'text-font': tokens.sans_regular,
184
- 'symbol-placement': 'line',
185
- 'text-anchor': 'center',
186
- 'text-size': {
187
- stops: [
188
- [12, 10],
189
- [15, 13]
190
- ]
191
- }
192
- },
193
- paint: {
194
- 'text-color': 'hsl(240,0%,23%)',
195
- 'text-halo-color': 'hsla(0,0%,100%,0.8)',
196
- 'text-halo-width': 2,
197
- 'text-halo-blur': 1
198
- }
199
- },
200
- {
201
- id: 'label-street-unclassified',
202
- filter: ['==', 'kind', 'unclassified'],
203
- minzoom: 14,
204
- layout: {
205
- 'text-field': '{name_de}',
206
- 'text-font': tokens.sans_regular,
207
- 'symbol-placement': 'line',
208
- 'text-anchor': 'center',
209
164
  'text-size': {
210
165
  stops: [
211
166
  [12, 10],
212
167
  [15, 13]
213
168
  ]
214
169
  }
215
- },
216
- paint: {
217
- 'text-color': tokens.label_secondary,
218
- 'text-halo-color': tokens.background,
219
- 'text-halo-width': 2
220
170
  }
221
171
  },
222
172
  {
223
173
  id: 'label-street-tertiary',
224
174
  filter: ['==', 'kind', 'tertiary'],
225
- minzoom: 14,
175
+ minzoom: 15,
226
176
  layout: {
227
- 'text-field': '{name_de}',
228
- 'text-font': tokens.sans_regular,
229
- 'symbol-placement': 'line',
230
- 'text-anchor': 'center',
231
177
  'text-size': {
232
178
  stops: [
233
179
  [12, 10],
234
180
  [15, 13]
235
181
  ]
236
182
  }
237
- },
238
- paint: {
239
- 'text-color': tokens.label_secondary,
240
- 'text-halo-color': tokens.background,
241
- 'text-halo-width': 2,
242
- 'text-halo-blur': 1
243
183
  }
244
184
  },
245
185
  {
@@ -247,21 +187,13 @@ export default function makeRoads() {
247
187
  filter: ['==', 'kind', 'secondary'],
248
188
  minzoom: 14,
249
189
  layout: {
250
- 'text-field': '{name_de}',
251
- 'text-font': tokens.sans_regular,
252
- 'symbol-placement': 'line',
253
- 'text-anchor': 'center',
190
+ 'text-letter-spacing': 0.025,
254
191
  'text-size': {
255
192
  stops: [
256
193
  [12, 10],
257
- [15, 13]
194
+ [15, 14]
258
195
  ]
259
196
  }
260
- },
261
- paint: {
262
- 'text-color': tokens.label_primary,
263
- 'text-halo-color': tokens.background,
264
- 'text-halo-width': 2
265
197
  }
266
198
  },
267
199
  {
@@ -269,22 +201,16 @@ export default function makeRoads() {
269
201
  filter: ['==', 'kind', 'primary'],
270
202
  minzoom: 14,
271
203
  layout: {
272
- 'text-field': '{name_de}',
273
204
  'text-letter-spacing': 0.025,
274
- 'text-font': tokens.sans_regular,
275
- 'symbol-placement': 'line',
276
- 'text-anchor': 'center',
277
205
  'text-size': {
278
206
  stops: [
279
207
  [12, 10],
280
- [15, 13]
208
+ [15, 14]
281
209
  ]
282
210
  }
283
211
  },
284
212
  paint: {
285
- 'text-color': tokens.label_secondary,
286
- 'text-halo-color': tokens.background,
287
- 'text-halo-width': 2
213
+ 'text-color': tokens.label_primary
288
214
  }
289
215
  },
290
216
  {
@@ -292,10 +218,6 @@ export default function makeRoads() {
292
218
  filter: ['==', 'kind', 'trunk'],
293
219
  minzoom: 13,
294
220
  layout: {
295
- 'text-field': '{name_de}',
296
- 'text-font': tokens.sans_regular,
297
- 'symbol-placement': 'line',
298
- 'text-anchor': 'center',
299
221
  'text-size': {
300
222
  stops: [
301
223
  [12, 10],
@@ -304,9 +226,7 @@ export default function makeRoads() {
304
226
  }
305
227
  },
306
228
  paint: {
307
- 'text-color': tokens.label_primary,
308
- 'text-halo-color': tokens.background,
309
- 'text-halo-width': 2
229
+ 'text-color': tokens.label_primary
310
230
  }
311
231
  }
312
232
  ].map((el) => {
@@ -314,291 +234,25 @@ export default function makeRoads() {
314
234
  type: 'symbol',
315
235
  source: 'versatiles-osm',
316
236
  'source-layer': 'street_labels',
317
- ...el
318
- };
319
- });
320
- const roadBridges = [
321
- {
322
- id: 'bridge-street-service:bridge',
323
- filter: [
324
- 'all',
325
- ['==', 'kind', 'service'],
326
- ['==', 'bridge', true],
327
- ['!=', 'service', 'driveway']
328
- ],
329
- layout: {
330
- 'line-cap': 'butt',
331
- 'line-join': 'round'
332
- },
333
- paint: {
334
- 'line-color': 'rgb(239,239,239)',
335
- 'line-opacity': {
336
- stops: [
337
- [14, 0],
338
- [15, 1]
339
- ]
340
- },
341
- 'line-width': {
342
- stops: [
343
- [14, 3],
344
- [16, 6],
345
- [18, 25],
346
- [19, 67],
347
- [20, 134]
348
- ]
349
- }
350
- }
351
- },
352
- {
353
- id: 'bridge-street-livingstreet:bridge',
354
- filter: ['all', ['==', 'kind', 'living_street'], ['==', 'bridge', true]],
355
- layout: {
356
- 'line-cap': 'butt',
357
- 'line-join': 'round'
358
- },
359
- paint: {
360
- 'line-color': 'rgb(239,239,239)',
361
- 'line-opacity': {
362
- stops: [
363
- [12, 0],
364
- [13, 1]
365
- ]
366
- },
367
- 'line-width': {
368
- stops: [
369
- [12, 3],
370
- [14, 4],
371
- [16, 8],
372
- [18, 36],
373
- [19, 90],
374
- [20, 179]
375
- ]
376
- }
377
- }
378
- },
379
- {
380
- id: 'bridge-street-residential:bridge',
381
- filter: ['all', ['==', 'kind', 'residential'], ['==', 'bridge', true]],
382
- layout: {
383
- 'line-cap': 'butt',
384
- 'line-join': 'round'
385
- },
386
- paint: {
387
- 'line-color': street_residential.line_color,
388
- 'line-opacity': street_residential.line_opacity,
389
- 'line-width': street_residential.line_opacity
390
- }
391
- },
392
- {
393
- id: 'bridge-street-unclassified:bridge',
394
- filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'bridge', true]],
395
- layout: {
396
- 'line-cap': 'butt',
397
- 'line-join': 'round'
398
- },
399
- paint: {
400
- 'line-color': 'rgb(239,239,239)',
401
- 'line-opacity': {
402
- stops: [
403
- [12, 0],
404
- [13, 1]
405
- ]
406
- },
407
- 'line-width': {
408
- stops: [
409
- [12, 3],
410
- [14, 4],
411
- [16, 8],
412
- [18, 36],
413
- [19, 90],
414
- [20, 179]
415
- ]
416
- }
417
- }
418
- },
419
- {
420
- id: 'bridge-street-tertiary-link:bridge',
421
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
422
- layout: {
423
- 'line-cap': 'butt',
424
- 'line-join': 'round'
425
- },
426
- paint: {
427
- 'line-color': 'rgb(239,239,239)',
428
- 'line-opacity': {
429
- stops: [
430
- [12, 0],
431
- [13, 1]
432
- ]
433
- },
434
- 'line-width': {
435
- stops: [
436
- [12, 3],
437
- [14, 4],
438
- [16, 8],
439
- [18, 36],
440
- [19, 90],
441
- [20, 179]
442
- ]
443
- }
444
- }
445
- },
446
- {
447
- id: 'bridge-street-secondary-link:bridge',
448
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
449
- layout: {
450
- 'line-cap': 'butt',
451
- 'line-join': 'round'
452
- },
453
- paint: {
454
- 'line-color': 'rgb(239,239,239)',
455
- 'line-opacity': 0.5,
456
- 'line-width': {
457
- stops: [
458
- [12, 3],
459
- [14, 4],
460
- [16, 10],
461
- [18, 20],
462
- [20, 56]
463
- ]
464
- }
465
- },
466
- minzoom: 13
467
- },
468
- {
469
- id: 'bridge-street-primary-link:bridge',
470
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
471
- layout: {
472
- 'line-cap': 'butt',
473
- 'line-join': 'round'
474
- },
475
- paint: {
476
- 'line-color': street_primary.line_color,
477
- 'line-width': street_primary.line_width
478
- },
479
- minzoom: 13
480
- },
481
- {
482
- id: 'bridge-street-trunk-link:bridge',
483
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
484
- layout: {
485
- 'line-cap': 'butt',
486
- 'line-join': 'round'
487
- },
488
- paint: {
489
- 'line-color': motorway.line_color,
490
- 'line-width': motorway.line_width
491
- },
492
- minzoom: 13
493
- },
494
- {
495
- id: 'bridge-street-motorway-link:bridge',
496
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
497
- layout: {
498
- 'line-cap': 'butt',
499
- 'line-join': 'round'
500
- },
501
- paint: {
502
- 'line-color': tokens.street_primary,
503
- 'line-width': motorway_link.line_width,
504
- 'line-opacity': motorway.line_opacity
505
- },
506
- minzoom: 12
507
- },
508
- {
509
- id: 'bridge-street-tertiary:bridge',
510
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
511
- layout: {
512
- 'line-cap': 'butt',
513
- 'line-join': 'round'
514
- },
515
- paint: {
516
- 'line-color': 'rgb(239,239,239)',
517
- 'line-opacity': {
518
- stops: [
519
- [12, 0],
520
- [13, 1]
521
- ]
522
- },
523
- 'line-width': {
524
- stops: [
525
- [12, 3],
526
- [14, 4],
527
- [16, 8],
528
- [18, 36],
529
- [19, 90],
530
- [20, 179]
531
- ]
532
- }
533
- }
534
- },
535
- {
536
- id: 'bridge-street-secondary:bridge',
537
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
538
- layout: {
539
- 'line-cap': 'butt',
540
- 'line-join': 'round'
541
- },
542
- paint: {
543
- 'line-color': 'rgb(239,239,239)',
544
- 'line-opacity': {
545
- stops: [
546
- [11, 0],
547
- [12, 1]
548
- ]
549
- },
550
- 'line-width': {
551
- stops: [
552
- [11, 3],
553
- [14, 7],
554
- [16, 11],
555
- [18, 42],
556
- [19, 95],
557
- [20, 193]
558
- ]
559
- }
560
- }
561
- },
562
- {
563
- id: 'bridge-street-primary:bridge',
564
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
565
- layout: {
566
- 'line-cap': 'butt',
567
- 'line-join': 'round'
568
- },
569
- paint: {
570
- 'line-color': street_primary.line_color,
571
- 'line-width': street_primary.line_width
572
- }
573
- },
574
- {
575
- id: 'bridge-street-trunk:bridge',
576
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
577
- layout: {
578
- 'line-cap': 'butt',
579
- 'line-join': 'round'
580
- },
581
- paint: {
582
- 'line-color': motorway.line_color,
583
- 'line-width': motorway.line_width,
584
- 'line-opacity': motorway.line_opacity
585
- }
586
- },
587
- {
588
- id: 'bridge-street-motorway:bridge',
589
- filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
237
+ ...el,
590
238
  layout: {
591
- 'line-cap': 'butt',
592
- 'line-join': 'round'
239
+ 'text-field': '{name_de}',
240
+ 'text-font': tokens.sans_regular,
241
+ 'symbol-placement': 'line',
242
+ 'text-anchor': 'center',
243
+ ...el.layout
593
244
  },
594
245
  paint: {
595
- 'line-color': tokens.street_primary,
596
- 'line-width': motorway.line_width,
597
- 'line-opacity': motorway.line_opacity
246
+ 'text-color': tokens.label_secondary,
247
+ 'text-halo-color': tokens.background,
248
+ 'text-halo-width': 1.5,
249
+ ...el.paint
598
250
  }
599
- },
251
+ };
252
+ });
253
+ const roadBridges = [
600
254
  {
601
- id: 'bridge-street-service:outline',
255
+ id: 'bridge-street-service:case',
602
256
  filter: [
603
257
  'all',
604
258
  ['==', 'kind', 'service'],
@@ -623,10 +277,10 @@ export default function makeRoads() {
623
277
  ]
624
278
  }
625
279
  },
626
- layout: street_layout
280
+ layout: case_layout
627
281
  },
628
282
  {
629
- id: 'bridge-street-livingstreet:outline',
283
+ id: 'bridge-street-livingstreet:case',
630
284
  filter: ['all', ['==', 'kind', 'living_street'], ['==', 'bridge', true]],
631
285
  paint: {
632
286
  'line-color': 'rgb(217,217,217)',
@@ -650,17 +304,17 @@ export default function makeRoads() {
650
304
  layout: street_layout
651
305
  },
652
306
  {
653
- id: 'bridge-street-residential:outline',
307
+ id: 'bridge-street-residential:case',
654
308
  filter: ['all', ['==', 'kind', 'residential'], ['==', 'bridge', true]],
655
309
  paint: {
656
- 'line-color': street_residential_outline.line_color,
657
- 'line-width': street_residential_outline.line_width,
658
- 'line-opacity': street_residential_outline.line_opacity
310
+ 'line-color': street_residential_case.line_color,
311
+ 'line-width': street_residential_case.line_width,
312
+ 'line-opacity': street_residential_case.line_opacity
659
313
  },
660
- layout: street_layout
314
+ layout: case_layout
661
315
  },
662
316
  {
663
- id: 'bridge-street-unclassified:outline',
317
+ id: 'bridge-street-unclassified:case',
664
318
  filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'bridge', true]],
665
319
  paint: {
666
320
  'line-color': 'rgb(217,217,217)',
@@ -681,10 +335,10 @@ export default function makeRoads() {
681
335
  ]
682
336
  }
683
337
  },
684
- layout: street_layout
338
+ layout: case_layout
685
339
  },
686
340
  {
687
- id: 'bridge-street-tertiary-link:outline',
341
+ id: 'bridge-street-tertiary-link:case',
688
342
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
689
343
  paint: {
690
344
  'line-color': 'rgb(217,217,217)',
@@ -705,50 +359,50 @@ export default function makeRoads() {
705
359
  ]
706
360
  }
707
361
  },
708
- layout: street_layout
362
+ layout: case_layout
709
363
  },
710
364
  {
711
- id: 'bridge-street-secondary-link:outline',
365
+ id: 'bridge-street-secondary-link:case',
712
366
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
713
367
  paint: {
714
- 'line-color': tokens.street_secondary_outline,
715
- 'line-width': street_secondary_outline.line_width
368
+ 'line-color': tokens.street_secondary_case,
369
+ 'line-width': street_secondary_case.line_width
716
370
  },
717
- layout: street_layout,
371
+ layout: case_layout,
718
372
  minzoom: 13
719
373
  },
720
374
  {
721
- id: 'bridge-street-primary-link:outline',
375
+ id: 'bridge-street-primary-link:case',
722
376
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
723
377
  paint: {
724
378
  'line-color': street_primary.line_color,
725
379
  'line-width': street_primary.line_width
726
380
  },
727
- layout: street_layout,
381
+ layout: case_layout,
728
382
  minzoom: 13
729
383
  },
730
384
  {
731
- id: 'bridge-street-trunk-link:outline',
385
+ id: 'bridge-street-trunk-link:case',
732
386
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
733
387
  paint: {
734
- 'line-color': motorway_outline.line_color,
735
- 'line-width': motorway_link_outline.line_width
388
+ 'line-color': motorway_case.line_color,
389
+ 'line-width': motorway_link_case.line_width
736
390
  },
737
- layout: street_layout,
391
+ layout: case_layout,
738
392
  minzoom: 13
739
393
  },
740
394
  {
741
- id: 'bridge-street-motorway-link:outline',
395
+ id: 'bridge-street-motorway-link:case',
742
396
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
743
397
  paint: {
744
- 'line-color': motorway_outline.line_color,
745
- 'line-width': motorway_link_outline.line_width
398
+ 'line-color': motorway_case.line_color,
399
+ 'line-width': motorway_link_case.line_width
746
400
  },
747
- layout: street_layout,
401
+ layout: case_layout,
748
402
  minzoom: 12
749
403
  },
750
404
  {
751
- id: 'bridge-street-tertiary:outline',
405
+ id: 'bridge-street-tertiary:case',
752
406
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
753
407
  paint: {
754
408
  'line-color': 'rgb(217,217,217)',
@@ -769,14 +423,14 @@ export default function makeRoads() {
769
423
  ]
770
424
  }
771
425
  },
772
- layout: street_layout
426
+ layout: case_layout
773
427
  },
774
428
  {
775
- id: 'bridge-street-secondary:outline',
429
+ id: 'bridge-street-secondary:case',
776
430
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
777
431
  paint: {
778
- 'line-color': tokens.street_secondary_outline,
779
- 'line-width': street_secondary_outline.line_width,
432
+ 'line-color': tokens.street_secondary_case,
433
+ 'line-width': street_secondary_case.line_width,
780
434
  'line-opacity': {
781
435
  stops: [
782
436
  [11, 0],
@@ -784,34 +438,34 @@ export default function makeRoads() {
784
438
  ]
785
439
  }
786
440
  },
787
- layout: street_layout
441
+ layout: case_layout
788
442
  },
789
443
  {
790
- id: 'bridge-street-primary:outline',
444
+ id: 'bridge-street-primary:case',
791
445
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
792
446
  paint: {
793
- 'line-color': street_primary_outline.line_color,
794
- 'line-width': street_primary_outline.line_width
447
+ 'line-color': street_primary_case.line_color,
448
+ 'line-width': street_primary_case.line_width
795
449
  },
796
- layout: street_layout
450
+ layout: case_layout
797
451
  },
798
452
  {
799
- id: 'bridge-street-trunk:outline',
453
+ id: 'bridge-street-trunk:case',
800
454
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
801
455
  paint: {
802
- 'line-color': motorway_outline.line_color,
803
- 'line-width': motorway_outline.line_width
456
+ 'line-color': motorway_case.line_color,
457
+ 'line-width': motorway_case.line_width
804
458
  },
805
- layout: street_layout
459
+ layout: case_layout
806
460
  },
807
461
  {
808
- id: 'bridge-street-motorway:outline',
462
+ id: 'bridge-street-motorway:case',
809
463
  filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
810
464
  paint: {
811
- 'line-color': motorway_outline.line_color,
812
- 'line-width': motorway_outline.line_width
465
+ 'line-color': motorway_case.line_color,
466
+ 'line-width': motorway_case.line_width
813
467
  },
814
- layout: street_layout
468
+ layout: case_layout
815
469
  },
816
470
  {
817
471
  id: 'bridge-street-service',
@@ -1043,9 +697,7 @@ export default function makeRoads() {
1043
697
  });
1044
698
  const roadTunnels = [
1045
699
  {
1046
- id: 'tunnel-street-service:outline',
1047
- type: 'line',
1048
- 'source-layer': 'streets',
700
+ id: 'tunnel-street-service:case',
1049
701
  filter: [
1050
702
  'all',
1051
703
  ['==', 'kind', 'service'],
@@ -1070,15 +722,10 @@ export default function makeRoads() {
1070
722
  ]
1071
723
  }
1072
724
  },
1073
- layout: {
1074
- 'line-join': 'round',
1075
- 'line-cap': 'round'
1076
- }
725
+ layout: case_layout
1077
726
  },
1078
727
  {
1079
- id: 'tunnel-street-livingstreet:outline',
1080
- type: 'line',
1081
- 'source-layer': 'streets',
728
+ id: 'tunnel-street-livingstreet:case',
1082
729
  filter: ['all', ['==', 'kind', 'living_street'], ['==', 'tunnel', true]],
1083
730
  paint: {
1084
731
  'line-color': 'rgb(222,222,222)',
@@ -1099,30 +746,20 @@ export default function makeRoads() {
1099
746
  ]
1100
747
  }
1101
748
  },
1102
- layout: {
1103
- 'line-join': 'round',
1104
- 'line-cap': 'round'
1105
- }
749
+ layout: case_layout
1106
750
  },
1107
751
  {
1108
- id: 'tunnel-street-residential:outline',
1109
- type: 'line',
1110
- 'source-layer': 'streets',
752
+ id: 'tunnel-street-residential:case',
1111
753
  filter: ['all', ['==', 'kind', 'residential'], ['==', 'tunnel', true]],
1112
754
  paint: {
1113
- 'line-color': street_residential_outline.line_color,
1114
- 'line-width': street_residential_outline.line_width,
1115
- 'line-opacity': street_residential_outline.line_opacity
755
+ 'line-color': street_residential_case.line_color,
756
+ 'line-width': street_residential_case.line_width,
757
+ 'line-opacity': street_residential_case.line_opacity
1116
758
  },
1117
- layout: {
1118
- 'line-join': 'round',
1119
- 'line-cap': 'butt'
1120
- }
759
+ layout: case_layout
1121
760
  },
1122
761
  {
1123
- id: 'tunnel-street-unclassified:outline',
1124
- type: 'line',
1125
- 'source-layer': 'streets',
762
+ id: 'tunnel-street-unclassified:case',
1126
763
  filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'tunnel', true]],
1127
764
  paint: {
1128
765
  'line-color': 'rgb(222,222,222)',
@@ -1143,15 +780,10 @@ export default function makeRoads() {
1143
780
  ]
1144
781
  }
1145
782
  },
1146
- layout: {
1147
- 'line-join': 'round',
1148
- 'line-cap': 'round'
1149
- }
783
+ layout: case_layout
1150
784
  },
1151
785
  {
1152
- id: 'tunnel-street-tertiary-link:outline',
1153
- type: 'line',
1154
- 'source-layer': 'streets',
786
+ id: 'tunnel-street-tertiary-link:case',
1155
787
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
1156
788
  paint: {
1157
789
  'line-color': 'rgb(222,222,222)',
@@ -1172,78 +804,54 @@ export default function makeRoads() {
1172
804
  ]
1173
805
  }
1174
806
  },
1175
- layout: {
1176
- 'line-join': 'round',
1177
- 'line-cap': 'round'
1178
- }
807
+ layout: case_layout
1179
808
  },
1180
809
  {
1181
- id: 'tunnel-street-secondary-link:outline',
810
+ id: 'tunnel-street-secondary-link:case',
1182
811
  type: 'line',
1183
- 'source-layer': 'streets',
1184
812
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
1185
813
  paint: {
1186
- 'line-color': tokens.street_secondary_outline,
814
+ 'line-color': tokens.street_secondary_case,
1187
815
  'line-dasharray': [1, 0.3],
1188
816
  'line-width': street_secondary.line_width
1189
817
  },
1190
- layout: {
1191
- 'line-join': 'round',
1192
- 'line-cap': 'butt'
1193
- },
818
+ layout: case_layout,
1194
819
  minzoom: 13
1195
820
  },
1196
821
  {
1197
- id: 'tunnel-street-primary-link:outline',
1198
- type: 'line',
1199
- 'source-layer': 'streets',
822
+ id: 'tunnel-street-primary-link:case',
1200
823
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
1201
824
  paint: {
1202
- 'line-color': street_primary_outline.line_color,
825
+ 'line-color': street_primary_case.line_color,
1203
826
  'line-dasharray': [1, 0.3],
1204
- 'line-width': street_primary_outline.line_width
1205
- },
1206
- layout: {
1207
- 'line-join': 'round',
1208
- 'line-cap': 'butt'
827
+ 'line-width': street_primary_case.line_width
1209
828
  },
829
+ layout: case_layout,
1210
830
  minzoom: 13
1211
831
  },
1212
832
  {
1213
- id: 'tunnel-street-trunk-link:outline',
1214
- type: 'line',
1215
- 'source-layer': 'streets',
833
+ id: 'tunnel-street-trunk-link:case',
1216
834
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
1217
835
  paint: {
1218
- 'line-color': motorway_outline.line_color,
1219
- 'line-width': motorway_outline.line_width
1220
- },
1221
- layout: {
1222
- 'line-join': 'round',
1223
- 'line-cap': 'butt'
836
+ 'line-color': motorway_case.line_color,
837
+ 'line-width': motorway_case.line_width
1224
838
  },
839
+ layout: case_layout,
1225
840
  minzoom: 13
1226
841
  },
1227
842
  {
1228
- id: 'tunnel-street-motorway-link:outline',
1229
- type: 'line',
1230
- 'source-layer': 'streets',
843
+ id: 'tunnel-street-motorway-link:case',
1231
844
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
1232
845
  paint: {
1233
- 'line-color': motorway_outline.line_color,
1234
- 'line-width': motorway_link_outline.line_width,
846
+ 'line-color': motorway_case.line_color,
847
+ 'line-width': motorway_link_case.line_width,
1235
848
  'line-dasharray': [1, 0.3]
1236
849
  },
1237
- layout: {
1238
- 'line-join': 'round',
1239
- 'line-cap': 'round'
1240
- },
850
+ layout: case_layout,
1241
851
  minzoom: 12
1242
852
  },
1243
853
  {
1244
- id: 'tunnel-street-tertiary:outline',
1245
- type: 'line',
1246
- 'source-layer': 'streets',
854
+ id: 'tunnel-street-tertiary:case',
1247
855
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
1248
856
  paint: {
1249
857
  'line-color': 'rgb(222,222,222)',
@@ -1264,20 +872,15 @@ export default function makeRoads() {
1264
872
  ]
1265
873
  }
1266
874
  },
1267
- layout: {
1268
- 'line-join': 'round',
1269
- 'line-cap': 'round'
1270
- }
875
+ layout: case_layout
1271
876
  },
1272
877
  {
1273
- id: 'tunnel-street-secondary:outline',
1274
- type: 'line',
1275
- 'source-layer': 'streets',
878
+ id: 'tunnel-street-secondary:case',
1276
879
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
1277
880
  paint: {
1278
- 'line-color': tokens.street_secondary_outline,
881
+ 'line-color': tokens.street_secondary_case,
1279
882
  'line-dasharray': [1, 0.3],
1280
- 'line-width': street_secondary_outline.line_width,
883
+ 'line-width': street_secondary_case.line_width,
1281
884
  'line-opacity': {
1282
885
  stops: [
1283
886
  [11, 0],
@@ -1285,60 +888,40 @@ export default function makeRoads() {
1285
888
  ]
1286
889
  }
1287
890
  },
1288
- layout: {
1289
- 'line-join': 'round',
1290
- 'line-cap': 'butt'
1291
- }
891
+ layout: case_layout
1292
892
  },
1293
893
  {
1294
- id: 'tunnel-street-primary:outline',
1295
- type: 'line',
1296
- 'source-layer': 'streets',
894
+ id: 'tunnel-street-primary:case',
1297
895
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
1298
896
  paint: {
1299
- 'line-color': tokens.street_primary_outline,
1300
- 'line-width': street_primary_outline.line_width,
897
+ 'line-color': tokens.street_primary_case,
898
+ 'line-width': street_primary_case.line_width,
1301
899
  'line-dasharray': [1, 0.3]
1302
900
  },
1303
- layout: {
1304
- 'line-join': 'round',
1305
- 'line-cap': 'square'
1306
- }
901
+ layout: case_layout
1307
902
  },
1308
903
  {
1309
- id: 'tunnel-street-trunk:outline',
1310
- type: 'line',
1311
- 'source-layer': 'streets',
904
+ id: 'tunnel-street-trunk:case',
1312
905
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
1313
906
  paint: {
1314
- 'line-color': motorway_outline.line_color,
907
+ 'line-color': motorway_case.line_color,
1315
908
  'line-dasharray': [1, 0.3],
1316
- 'line-width': motorway_outline.line_width
909
+ 'line-width': motorway_case.line_width
1317
910
  },
1318
- layout: {
1319
- 'line-join': 'round',
1320
- 'line-cap': 'round'
1321
- }
911
+ layout: case_layout
1322
912
  },
1323
913
  {
1324
- id: 'tunnel-street-motorway:outline',
1325
- type: 'line',
1326
- 'source-layer': 'streets',
914
+ id: 'tunnel-street-motorway:case',
1327
915
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
1328
916
  paint: {
1329
- 'line-color': motorway_outline.line_color,
1330
- 'line-width': motorway_outline.line_width,
917
+ 'line-color': motorway_case.line_color,
918
+ 'line-width': motorway_case.line_width,
1331
919
  'line-dasharray': [1, 0.3]
1332
920
  },
1333
- layout: {
1334
- 'line-join': 'round',
1335
- 'line-cap': 'round'
1336
- }
921
+ layout: case_layout
1337
922
  },
1338
923
  {
1339
924
  id: 'tunnel-street-service',
1340
- type: 'line',
1341
- 'source-layer': 'streets',
1342
925
  filter: [
1343
926
  'all',
1344
927
  ['==', 'kind', 'service'],
@@ -1363,15 +946,10 @@ export default function makeRoads() {
1363
946
  ]
1364
947
  }
1365
948
  },
1366
- layout: {
1367
- 'line-join': 'round',
1368
- 'line-cap': 'round'
1369
- }
949
+ layout: street_layout
1370
950
  },
1371
951
  {
1372
952
  id: 'tunnel-street-livingstreet',
1373
- type: 'line',
1374
- 'source-layer': 'streets',
1375
953
  filter: ['all', ['==', 'kind', 'living_street'], ['==', 'tunnel', true]],
1376
954
  paint: {
1377
955
  'line-color': 'rgb(247,247,247)',
@@ -1392,15 +970,10 @@ export default function makeRoads() {
1392
970
  ]
1393
971
  }
1394
972
  },
1395
- layout: {
1396
- 'line-join': 'round',
1397
- 'line-cap': 'round'
1398
- }
973
+ layout: street_layout
1399
974
  },
1400
975
  {
1401
976
  id: 'tunnel-street-residential',
1402
- type: 'line',
1403
- 'source-layer': 'streets',
1404
977
  filter: ['all', ['==', 'kind', 'residential'], ['==', 'tunnel', true]],
1405
978
  paint: {
1406
979
  'line-color': street_residential.line_color,
@@ -1412,15 +985,10 @@ export default function makeRoads() {
1412
985
  ]
1413
986
  }
1414
987
  },
1415
- layout: {
1416
- 'line-join': 'round',
1417
- 'line-cap': 'round'
1418
- }
988
+ layout: street_layout
1419
989
  },
1420
990
  {
1421
991
  id: 'tunnel-street-unclassified',
1422
- type: 'line',
1423
- 'source-layer': 'streets',
1424
992
  filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'tunnel', true]],
1425
993
  paint: {
1426
994
  'line-color': 'rgb(247,247,247)',
@@ -1441,15 +1009,10 @@ export default function makeRoads() {
1441
1009
  ]
1442
1010
  }
1443
1011
  },
1444
- layout: {
1445
- 'line-join': 'round',
1446
- 'line-cap': 'round'
1447
- }
1012
+ layout: street_layout
1448
1013
  },
1449
1014
  {
1450
1015
  id: 'tunnel-street-tertiary-link',
1451
- type: 'line',
1452
- 'source-layer': 'streets',
1453
1016
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
1454
1017
  paint: {
1455
1018
  'line-color': 'rgb(247,247,247)',
@@ -1470,15 +1033,10 @@ export default function makeRoads() {
1470
1033
  ]
1471
1034
  }
1472
1035
  },
1473
- layout: {
1474
- 'line-join': 'round',
1475
- 'line-cap': 'round'
1476
- }
1036
+ layout: street_layout
1477
1037
  },
1478
1038
  {
1479
1039
  id: 'tunnel-street-secondary-link',
1480
- type: 'line',
1481
- 'source-layer': 'streets',
1482
1040
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
1483
1041
  paint: {
1484
1042
  'line-color': tokens.street_secondary,
@@ -1489,8 +1047,6 @@ export default function makeRoads() {
1489
1047
  },
1490
1048
  {
1491
1049
  id: 'tunnel-street-primary-link',
1492
- type: 'line',
1493
- 'source-layer': 'streets',
1494
1050
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
1495
1051
  paint: {
1496
1052
  'line-color': street_primary.line_color,
@@ -1501,8 +1057,6 @@ export default function makeRoads() {
1501
1057
  },
1502
1058
  {
1503
1059
  id: 'tunnel-street-trunk-link',
1504
- type: 'line',
1505
- 'source-layer': 'streets',
1506
1060
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
1507
1061
  paint: {
1508
1062
  'line-color': tokens.street_primary,
@@ -1513,8 +1067,6 @@ export default function makeRoads() {
1513
1067
  },
1514
1068
  {
1515
1069
  id: 'tunnel-street-motorway-link',
1516
- type: 'line',
1517
- 'source-layer': 'streets',
1518
1070
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
1519
1071
  paint: {
1520
1072
  'line-color': tokens.street_primary,
@@ -1526,8 +1078,6 @@ export default function makeRoads() {
1526
1078
  },
1527
1079
  {
1528
1080
  id: 'tunnel-street-tertiary',
1529
- type: 'line',
1530
- 'source-layer': 'streets',
1531
1081
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
1532
1082
  paint: {
1533
1083
  'line-color': 'rgb(247,247,247)',
@@ -1548,15 +1098,10 @@ export default function makeRoads() {
1548
1098
  ]
1549
1099
  }
1550
1100
  },
1551
- layout: {
1552
- 'line-join': 'round',
1553
- 'line-cap': 'round'
1554
- }
1101
+ layout: street_layout
1555
1102
  },
1556
1103
  {
1557
1104
  id: 'tunnel-street-secondary',
1558
- type: 'line',
1559
- 'source-layer': 'streets',
1560
1105
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
1561
1106
  paint: {
1562
1107
  'line-color': tokens.street_secondary,
@@ -1572,8 +1117,6 @@ export default function makeRoads() {
1572
1117
  },
1573
1118
  {
1574
1119
  id: 'tunnel-street-primary',
1575
- type: 'line',
1576
- 'source-layer': 'streets',
1577
1120
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
1578
1121
  paint: {
1579
1122
  'line-color': street_primary.line_color,
@@ -1589,8 +1132,6 @@ export default function makeRoads() {
1589
1132
  },
1590
1133
  {
1591
1134
  id: 'tunnel-street-trunk',
1592
- type: 'line',
1593
- 'source-layer': 'streets',
1594
1135
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
1595
1136
  paint: {
1596
1137
  'line-color': tokens.street_primary,
@@ -1606,8 +1147,6 @@ export default function makeRoads() {
1606
1147
  },
1607
1148
  {
1608
1149
  id: 'tunnel-street-motorway',
1609
- type: 'line',
1610
- 'source-layer': 'streets',
1611
1150
  filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
1612
1151
  paint: {
1613
1152
  'line-color': tokens.street_primary,
@@ -1617,12 +1156,11 @@ export default function makeRoads() {
1617
1156
  layout: street_layout
1618
1157
  }
1619
1158
  ].map((el) => {
1620
- return { source: 'versatiles-osm', ...el };
1159
+ return { source: 'versatiles-osm', type: 'line', 'source-layer': 'streets', ...el };
1621
1160
  });
1622
1161
  const roadSurface = [
1623
1162
  {
1624
- id: 'street-service:outline', // See: https://wiki.openstreetmap.org/wiki/Tag:highway%3Dservice
1625
- type: 'line',
1163
+ id: 'street-service:case', // See: https://wiki.openstreetmap.org/wiki/Tag:highway%3Dservice
1626
1164
  filter: [
1627
1165
  'all',
1628
1166
  ['==', 'kind', 'service'],
@@ -1648,14 +1186,10 @@ export default function makeRoads() {
1648
1186
  ]
1649
1187
  }
1650
1188
  },
1651
- layout: {
1652
- 'line-join': 'round',
1653
- 'line-cap': 'round'
1654
- }
1189
+ layout: case_layout
1655
1190
  },
1656
1191
  {
1657
- id: 'street-livingstreet:outline',
1658
- type: 'line',
1192
+ id: 'street-livingstreet:case',
1659
1193
  filter: [
1660
1194
  'all',
1661
1195
  ['==', 'kind', 'living_street'],
@@ -1676,19 +1210,15 @@ export default function makeRoads() {
1676
1210
  },
1677
1211
  'line-opacity': {
1678
1212
  stops: [
1679
- [12, 0],
1680
- [13, 1]
1213
+ [13, 0],
1214
+ [14, 1]
1681
1215
  ]
1682
1216
  }
1683
1217
  },
1684
- layout: {
1685
- 'line-join': 'round',
1686
- 'line-cap': 'round'
1687
- }
1218
+ layout: case_layout
1688
1219
  },
1689
1220
  {
1690
- id: 'street-residential:outline',
1691
- type: 'line',
1221
+ id: 'street-residential:case',
1692
1222
  filter: [
1693
1223
  'all',
1694
1224
  ['==', 'kind', 'residential'],
@@ -1696,18 +1226,14 @@ export default function makeRoads() {
1696
1226
  ['!=', 'tunnel', true]
1697
1227
  ],
1698
1228
  paint: {
1699
- 'line-color': street_residential_outline.line_color,
1700
- 'line-width': street_residential_outline.line_width,
1701
- 'line-opacity': street_residential_outline.line_opacity
1229
+ 'line-color': street_residential_case.line_color,
1230
+ 'line-width': street_residential_case.line_width,
1231
+ 'line-opacity': street_residential_case.line_opacity
1702
1232
  },
1703
- layout: {
1704
- 'line-join': 'round',
1705
- 'line-cap': 'round'
1706
- }
1233
+ layout: case_layout
1707
1234
  },
1708
1235
  {
1709
- id: 'street-unclassified:outline',
1710
- type: 'line',
1236
+ id: 'street-unclassified:case',
1711
1237
  filter: [
1712
1238
  'all',
1713
1239
  ['==', 'kind', 'unclassified'],
@@ -1728,19 +1254,15 @@ export default function makeRoads() {
1728
1254
  },
1729
1255
  'line-opacity': {
1730
1256
  stops: [
1731
- [12, 0],
1732
- [13, 1]
1257
+ [13, 0],
1258
+ [14, 1]
1733
1259
  ]
1734
1260
  }
1735
1261
  },
1736
- layout: {
1737
- 'line-join': 'round',
1738
- 'line-cap': 'butt'
1739
- }
1262
+ layout: case_layout
1740
1263
  },
1741
1264
  {
1742
- id: 'street-tertiary-link:outline',
1743
- type: 'line',
1265
+ id: 'street-tertiary-link:case',
1744
1266
  filter: [
1745
1267
  'all',
1746
1268
  ['!=', 'bridge', true],
@@ -1767,14 +1289,10 @@ export default function makeRoads() {
1767
1289
  ]
1768
1290
  }
1769
1291
  },
1770
- layout: {
1771
- 'line-join': 'round',
1772
- 'line-cap': 'butt'
1773
- }
1292
+ layout: case_layout
1774
1293
  },
1775
1294
  {
1776
- id: 'street-secondary-link:outline',
1777
- type: 'line',
1295
+ id: 'street-secondary-link:case',
1778
1296
  filter: [
1779
1297
  'all',
1780
1298
  ['!=', 'bridge', true],
@@ -1783,18 +1301,14 @@ export default function makeRoads() {
1783
1301
  ['==', 'link', true]
1784
1302
  ],
1785
1303
  paint: {
1786
- 'line-color': tokens.street_secondary_outline,
1787
- 'line-width': street_secondary_outline.line_width
1788
- },
1789
- layout: {
1790
- 'line-join': 'round',
1791
- 'line-cap': 'butt'
1304
+ 'line-color': tokens.street_secondary_case,
1305
+ 'line-width': street_secondary_case.line_width
1792
1306
  },
1307
+ layout: case_layout,
1793
1308
  minzoom: 13
1794
1309
  },
1795
1310
  {
1796
- id: 'street-primary-link:outline',
1797
- type: 'line',
1311
+ id: 'street-primary-link:case',
1798
1312
  filter: [
1799
1313
  'all',
1800
1314
  ['!=', 'bridge', true],
@@ -1803,18 +1317,14 @@ export default function makeRoads() {
1803
1317
  ['==', 'link', true]
1804
1318
  ],
1805
1319
  paint: {
1806
- 'line-color': tokens.street_primary_outline,
1807
- 'line-width': street_primary_outline.line_width
1808
- },
1809
- layout: {
1810
- 'line-join': 'round',
1811
- 'line-cap': 'butt'
1320
+ 'line-color': tokens.street_primary_case,
1321
+ 'line-width': street_primary_case.line_width
1812
1322
  },
1323
+ layout: case_layout,
1813
1324
  minzoom: 13
1814
1325
  },
1815
1326
  {
1816
- id: 'street-trunk-link:outline',
1817
- type: 'line',
1327
+ id: 'street-trunk-link:case',
1818
1328
  filter: [
1819
1329
  'all',
1820
1330
  ['!=', 'bridge', true],
@@ -1823,18 +1333,14 @@ export default function makeRoads() {
1823
1333
  ['==', 'link', true]
1824
1334
  ],
1825
1335
  paint: {
1826
- 'line-color': motorway_outline.line_color,
1827
- 'line-width': motorway_link_outline.line_width
1828
- },
1829
- layout: {
1830
- 'line-join': 'round',
1831
- 'line-cap': 'butt'
1336
+ 'line-color': motorway_case.line_color,
1337
+ 'line-width': motorway_link_case.line_width
1832
1338
  },
1339
+ layout: case_layout,
1833
1340
  minzoom: 13
1834
1341
  },
1835
1342
  {
1836
- id: 'street-motorway-link:outline',
1837
- type: 'line',
1343
+ id: 'street-motorway-link:case',
1838
1344
  filter: [
1839
1345
  'all',
1840
1346
  ['!=', 'bridge', true],
@@ -1843,18 +1349,14 @@ export default function makeRoads() {
1843
1349
  ['==', 'link', true]
1844
1350
  ],
1845
1351
  paint: {
1846
- 'line-color': motorway_outline.line_color,
1847
- 'line-width': motorway_link_outline.line_width
1848
- },
1849
- layout: {
1850
- 'line-join': 'round',
1851
- 'line-cap': 'butt'
1352
+ 'line-color': motorway_case.line_color,
1353
+ 'line-width': motorway_link_case.line_width
1852
1354
  },
1355
+ layout: case_layout,
1853
1356
  minzoom: 12
1854
1357
  },
1855
1358
  {
1856
- id: 'street-tertiary:outline',
1857
- type: 'line',
1359
+ id: 'street-tertiary:case',
1858
1360
  filter: [
1859
1361
  'all',
1860
1362
  ['!=', 'bridge', true],
@@ -1881,14 +1383,10 @@ export default function makeRoads() {
1881
1383
  ]
1882
1384
  }
1883
1385
  },
1884
- layout: {
1885
- 'line-join': 'round',
1886
- 'line-cap': 'round'
1887
- }
1386
+ layout: case_layout
1888
1387
  },
1889
1388
  {
1890
- id: 'street-secondary:outline',
1891
- type: 'line',
1389
+ id: 'street-secondary:case',
1892
1390
  filter: [
1893
1391
  'all',
1894
1392
  ['!=', 'bridge', true],
@@ -1897,8 +1395,8 @@ export default function makeRoads() {
1897
1395
  ['!=', 'link', true]
1898
1396
  ],
1899
1397
  paint: {
1900
- 'line-color': tokens.street_secondary_outline,
1901
- 'line-width': street_secondary_outline.line_width,
1398
+ 'line-color': tokens.street_secondary_case,
1399
+ 'line-width': street_secondary_case.line_width,
1902
1400
  'line-opacity': {
1903
1401
  stops: [
1904
1402
  [11, 0],
@@ -1906,14 +1404,10 @@ export default function makeRoads() {
1906
1404
  ]
1907
1405
  }
1908
1406
  },
1909
- layout: {
1910
- 'line-join': 'round',
1911
- 'line-cap': 'butt'
1912
- }
1407
+ layout: case_layout
1913
1408
  },
1914
1409
  {
1915
- id: 'street-primary:outline',
1916
- type: 'line',
1410
+ id: 'street-primary:case',
1917
1411
  filter: [
1918
1412
  'all',
1919
1413
  ['!=', 'bridge', true],
@@ -1922,17 +1416,13 @@ export default function makeRoads() {
1922
1416
  ['!=', 'link', true]
1923
1417
  ],
1924
1418
  paint: {
1925
- 'line-color': street_primary_outline.line_color,
1926
- 'line-width': street_primary_outline.line_width
1419
+ 'line-color': street_primary_case.line_color,
1420
+ 'line-width': street_primary_case.line_width
1927
1421
  },
1928
- layout: {
1929
- 'line-join': 'round',
1930
- 'line-cap': 'butt'
1931
- }
1422
+ layout: case_layout
1932
1423
  },
1933
1424
  {
1934
- id: 'street-trunk:outline',
1935
- type: 'line',
1425
+ id: 'street-trunk:case',
1936
1426
  filter: [
1937
1427
  'all',
1938
1428
  ['!=', 'bridge', true],
@@ -1941,17 +1431,13 @@ export default function makeRoads() {
1941
1431
  ['!=', 'link', true]
1942
1432
  ],
1943
1433
  paint: {
1944
- 'line-color': motorway_outline.line_color,
1945
- 'line-width': motorway_outline.line_width
1434
+ 'line-color': motorway_case.line_color,
1435
+ 'line-width': motorway_case.line_width
1946
1436
  },
1947
- layout: {
1948
- 'line-join': 'round',
1949
- 'line-cap': 'butt'
1950
- }
1437
+ layout: case_layout
1951
1438
  },
1952
1439
  {
1953
- id: 'street-motorway:outline',
1954
- type: 'line',
1440
+ id: 'street-motorway:case',
1955
1441
  filter: [
1956
1442
  'all',
1957
1443
  ['!=', 'bridge', true],
@@ -1960,17 +1446,13 @@ export default function makeRoads() {
1960
1446
  ['!=', 'link', true]
1961
1447
  ],
1962
1448
  paint: {
1963
- 'line-color': motorway_outline.line_color,
1964
- 'line-width': motorway_outline.line_width
1449
+ 'line-color': motorway_case.line_color,
1450
+ 'line-width': motorway_case.line_width
1965
1451
  },
1966
- layout: {
1967
- 'line-join': 'round',
1968
- 'line-cap': 'butt'
1969
- }
1452
+ layout: case_layout
1970
1453
  },
1971
1454
  {
1972
1455
  id: 'street-service',
1973
- type: 'line',
1974
1456
  filter: [
1975
1457
  'all',
1976
1458
  ['==', 'kind', 'service'],
@@ -1979,7 +1461,7 @@ export default function makeRoads() {
1979
1461
  ['!=', 'service', 'driveway']
1980
1462
  ],
1981
1463
  paint: {
1982
- 'line-color': 'hsl(0,0%,100%)',
1464
+ 'line-color': street_residential.line_color,
1983
1465
  'line-width': {
1984
1466
  stops: [
1985
1467
  [14, 1],
@@ -1996,14 +1478,10 @@ export default function makeRoads() {
1996
1478
  ]
1997
1479
  }
1998
1480
  },
1999
- layout: {
2000
- 'line-join': 'round',
2001
- 'line-cap': 'round'
2002
- }
1481
+ layout: street_layout
2003
1482
  },
2004
1483
  {
2005
1484
  id: 'street-livingstreet',
2006
- type: 'line',
2007
1485
  filter: [
2008
1486
  'all',
2009
1487
  ['==', 'kind', 'living_street'],
@@ -2015,14 +1493,10 @@ export default function makeRoads() {
2015
1493
  'line-width': street_residential.line_width,
2016
1494
  'line-opacity': street_residential.line_opacity
2017
1495
  },
2018
- layout: {
2019
- 'line-join': 'round',
2020
- 'line-cap': 'round'
2021
- }
1496
+ layout: street_layout
2022
1497
  },
2023
1498
  {
2024
1499
  id: 'street-residential',
2025
- type: 'line',
2026
1500
  filter: [
2027
1501
  'all',
2028
1502
  ['==', 'kind', 'residential'],
@@ -2034,14 +1508,10 @@ export default function makeRoads() {
2034
1508
  'line-width': street_residential.line_width,
2035
1509
  'line-opacity': street_residential.line_opacity
2036
1510
  },
2037
- layout: {
2038
- 'line-join': 'round',
2039
- 'line-cap': 'round'
2040
- }
1511
+ layout: street_layout
2041
1512
  },
2042
1513
  {
2043
1514
  id: 'street-unclassified',
2044
- type: 'line',
2045
1515
  filter: [
2046
1516
  'all',
2047
1517
  ['==', 'kind', 'unclassified'],
@@ -2049,7 +1519,7 @@ export default function makeRoads() {
2049
1519
  ['!=', 'tunnel', true]
2050
1520
  ],
2051
1521
  paint: {
2052
- 'line-color': 'hsl(0,0%,100%)',
1522
+ 'line-color': street_secondary.line_color,
2053
1523
  'line-width': {
2054
1524
  stops: [
2055
1525
  [12, 1],
@@ -2067,14 +1537,10 @@ export default function makeRoads() {
2067
1537
  ]
2068
1538
  }
2069
1539
  },
2070
- layout: {
2071
- 'line-join': 'round',
2072
- 'line-cap': 'round'
2073
- }
1540
+ layout: street_layout
2074
1541
  },
2075
1542
  {
2076
1543
  id: 'street-tertiary-link',
2077
- type: 'line',
2078
1544
  filter: [
2079
1545
  'all',
2080
1546
  ['!=', 'bridge', true],
@@ -2101,14 +1567,10 @@ export default function makeRoads() {
2101
1567
  ]
2102
1568
  }
2103
1569
  },
2104
- layout: {
2105
- 'line-join': 'round',
2106
- 'line-cap': 'round'
2107
- }
1570
+ layout: street_layout
2108
1571
  },
2109
1572
  {
2110
1573
  id: 'street-secondary-link',
2111
- type: 'line',
2112
1574
  filter: [
2113
1575
  'all',
2114
1576
  ['!=', 'bridge', true],
@@ -2120,15 +1582,11 @@ export default function makeRoads() {
2120
1582
  'line-color': tokens.street_secondary,
2121
1583
  'line-width': street_secondary.line_width
2122
1584
  },
2123
- layout: {
2124
- 'line-join': 'round',
2125
- 'line-cap': 'round'
2126
- },
1585
+ layout: street_layout,
2127
1586
  minzoom: 13
2128
1587
  },
2129
1588
  {
2130
1589
  id: 'street-primary-link',
2131
- type: 'line',
2132
1590
  filter: [
2133
1591
  'all',
2134
1592
  ['!=', 'bridge', true],
@@ -2140,15 +1598,11 @@ export default function makeRoads() {
2140
1598
  'line-color': street_primary.line_color,
2141
1599
  'line-width': street_primary.line_width
2142
1600
  },
2143
- layout: {
2144
- 'line-join': 'round',
2145
- 'line-cap': 'round'
2146
- },
1601
+ layout: street_layout,
2147
1602
  minzoom: 13
2148
1603
  },
2149
1604
  {
2150
1605
  id: 'street-trunk-link',
2151
- type: 'line',
2152
1606
  filter: [
2153
1607
  'all',
2154
1608
  ['!=', 'bridge', true],
@@ -2160,15 +1614,11 @@ export default function makeRoads() {
2160
1614
  'line-color': tokens.street_primary,
2161
1615
  'line-width': motorway_link.line_width
2162
1616
  },
2163
- layout: {
2164
- 'line-join': 'round',
2165
- 'line-cap': 'round'
2166
- },
1617
+ layout: street_layout,
2167
1618
  minzoom: 13
2168
1619
  },
2169
1620
  {
2170
1621
  id: 'street-motorway-link',
2171
- type: 'line',
2172
1622
  filter: [
2173
1623
  'all',
2174
1624
  ['!=', 'bridge', true],
@@ -2181,15 +1631,11 @@ export default function makeRoads() {
2181
1631
  'line-width': motorway_link.line_width,
2182
1632
  'line-opacity': motorway.line_opacity
2183
1633
  },
2184
- layout: {
2185
- 'line-join': 'round',
2186
- 'line-cap': 'round'
2187
- },
1634
+ layout: street_layout,
2188
1635
  minzoom: 12
2189
1636
  },
2190
1637
  {
2191
1638
  id: 'street-tertiary',
2192
- type: 'line',
2193
1639
  filter: [
2194
1640
  'all',
2195
1641
  ['!=', 'bridge', true],
@@ -2216,14 +1662,10 @@ export default function makeRoads() {
2216
1662
  ]
2217
1663
  }
2218
1664
  },
2219
- layout: {
2220
- 'line-join': 'round',
2221
- 'line-cap': 'round'
2222
- }
1665
+ layout: street_layout
2223
1666
  },
2224
1667
  {
2225
1668
  id: 'street-secondary',
2226
- type: 'line',
2227
1669
  filter: [
2228
1670
  'all',
2229
1671
  ['!=', 'bridge', true],
@@ -2241,14 +1683,10 @@ export default function makeRoads() {
2241
1683
  ]
2242
1684
  }
2243
1685
  },
2244
- layout: {
2245
- 'line-join': 'round',
2246
- 'line-cap': 'round'
2247
- }
1686
+ layout: street_layout
2248
1687
  },
2249
1688
  {
2250
1689
  id: 'street-primary',
2251
- type: 'line',
2252
1690
  filter: [
2253
1691
  'all',
2254
1692
  ['!=', 'bridge', true],
@@ -2266,14 +1704,10 @@ export default function makeRoads() {
2266
1704
  ]
2267
1705
  }
2268
1706
  },
2269
- layout: {
2270
- 'line-join': 'round',
2271
- 'line-cap': 'round'
2272
- }
1707
+ layout: street_layout
2273
1708
  },
2274
1709
  {
2275
1710
  id: 'street-trunk',
2276
- type: 'line',
2277
1711
  filter: [
2278
1712
  'all',
2279
1713
  ['!=', 'bridge', true],
@@ -2286,14 +1720,10 @@ export default function makeRoads() {
2286
1720
  'line-width': motorway.line_width,
2287
1721
  'line-opacity': motorway.line_opacity
2288
1722
  },
2289
- layout: {
2290
- 'line-join': 'round',
2291
- 'line-cap': 'round'
2292
- }
1723
+ layout: street_layout
2293
1724
  },
2294
1725
  {
2295
1726
  id: 'street-motorway',
2296
- type: 'line',
2297
1727
  filter: [
2298
1728
  'all',
2299
1729
  ['!=', 'bridge', true],
@@ -2306,13 +1736,10 @@ export default function makeRoads() {
2306
1736
  'line-width': motorway.line_width,
2307
1737
  'line-opacity': motorway.line_opacity
2308
1738
  },
2309
- layout: {
2310
- 'line-join': 'round',
2311
- 'line-cap': 'round'
2312
- }
1739
+ layout: street_layout
2313
1740
  }
2314
1741
  ].map((el) => {
2315
- return { source: 'versatiles-osm', 'source-layer': 'streets', ...el };
1742
+ return { source: 'versatiles-osm', type: 'line', 'source-layer': 'streets', ...el };
2316
1743
  });
2317
1744
  return { roadLabels, roadBridges, roadSurface, roadTunnels };
2318
1745
  }