@swr-data-lab/components 2.2.0 → 2.3.0

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