@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
1,431 lines (1,430 loc) • 206 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (function (queryPath, _a) {
var worldView = _a.worldView, tilePath = _a.tilePath;
return ({
version: 8,
name: 'Mapbox Outdoors',
metadata: {
'mapbox:type': 'default',
'mapbox:origin': 'outdoors-v11',
'mapbox:autocomposite': true,
'mapbox:groups': {
'1444855786460.0557': {
name: 'Roads',
collapsed: true
},
'1444934295202.7542': {
name: 'Admin boundaries',
collapsed: true
},
'1444855799204.86': {
name: 'Bridges',
collapsed: true
},
'1444855769305.6016': {
name: 'Tunnels',
collapsed: true
}
}
},
sources: {
composite: {
// url: 'mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2',
tiles: [tilePath || queryPath + '/tiles/{z}/{x}/{y}.vector.pbf'],
type: 'vector'
}
},
center: [0, 20],
zoom: 2,
// sprite: 'mapbox://sprites/mapbox/outdoors-v11',
sprite: queryPath + '/sprite/outdoors/sprite',
// glyphs: 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf',
glyphs: queryPath + '/font/{fontstack}/{range}.pbf',
layers: [
{
id: 'land',
type: 'background',
metadata: {},
layout: {},
paint: {
'background-color': [
'interpolate',
['linear'],
['zoom'],
11,
'hsl(35, 32%, 91%)',
13,
'hsl(35, 12%, 89%)'
]
}
},
{
id: 'landcover',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'landcover',
maxzoom: 12,
layout: {},
paint: {
'fill-color': [
'match',
['get', 'class'],
'snow',
'hsl(0, 0%, 100%)',
'hsl(75, 62%, 81%)'
],
'fill-opacity': [
'interpolate',
['exponential', 1.5],
['zoom'],
2,
0.3,
12,
0
],
'fill-antialias': false
}
},
{
id: 'national-park',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'landuse_overlay',
minzoom: 5,
filter: ['==', ['get', 'class'], 'national_park'],
layout: {},
paint: {
'fill-color': 'hsl(100, 58%, 76%)',
'fill-opacity': [
'interpolate',
['linear'],
['zoom'],
5,
0,
6,
0.75,
10,
0.35
]
}
},
{
id: 'national_park-tint-band',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'landuse_overlay',
minzoom: 9,
filter: ['==', ['get', 'class'], 'national_park'],
layout: {
'line-cap': 'round'
},
paint: {
'line-color': 'hsl(100, 62%, 74%)',
'line-width': [
'interpolate',
['exponential', 1.4],
['zoom'],
9,
1,
14,
8
],
'line-offset': [
'interpolate',
['exponential', 1.4],
['zoom'],
9,
0,
14,
-2.5
],
'line-opacity': ['interpolate', ['linear'], ['zoom'], 9, 0, 10, 0.75],
'line-blur': 3
}
},
{
id: 'landuse',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'landuse',
minzoom: 5,
filter: [
'match',
['get', 'class'],
[
'park',
'airport',
'cemetery',
'glacier',
'hospital',
'pitch',
'sand',
'school',
'agriculture',
'wood',
'grass',
'scrub'
],
true,
false
],
layout: {},
paint: {
'fill-color': [
'interpolate',
['linear'],
['zoom'],
15,
[
'match',
['get', 'class'],
'park',
[
'match',
['get', 'type'],
['garden', 'playground', 'zoo'],
'hsl(100, 59%, 81%)',
'hsl(100, 58%, 76%)'
],
'airport',
'hsl(230, 15%, 86%)',
'cemetery',
'hsl(75, 37%, 81%)',
'glacier',
'hsl(196, 72%, 93%)',
'hospital',
'hsl(340, 37%, 87%)',
'pitch',
'hsl(100, 57%, 72%)',
'sand',
'hsl(60, 46%, 87%)',
'school',
'hsl(50, 47%, 81%)',
'agriculture',
'hsl(75, 37%, 81%)',
['wood', 'grass', 'scrub'],
'hsl(75, 41%, 74%)',
'hsla(0, 0%, 0%, 0)'
],
16,
[
'match',
['get', 'class'],
'park',
[
'match',
['get', 'type'],
['garden', 'playground', 'zoo'],
'hsl(100, 59%, 81%)',
'hsl(100, 58%, 76%)'
],
'airport',
'hsl(230, 29%, 89%)',
'cemetery',
'hsl(75, 37%, 81%)',
'glacier',
'hsl(196, 72%, 93%)',
'hospital',
'hsl(340, 63%, 89%)',
'pitch',
'hsl(100, 57%, 72%)',
'sand',
'hsl(60, 46%, 87%)',
'school',
'hsl(50, 63%, 84%)',
'agriculture',
'hsl(75, 37%, 81%)',
['wood', 'grass', 'scrub'],
'hsl(75, 41%, 74%)',
'hsla(0, 0%, 0%, 0)'
]
],
'fill-opacity': [
'interpolate',
['linear'],
['zoom'],
5,
0,
6,
[
'match',
['get', 'class'],
['agriculture', 'wood', 'grass', 'scrub'],
0,
'glacier',
0.5,
1
],
15,
[
'match',
['get', 'class'],
'agriculture',
0.75,
['wood', 'glacier'],
0.5,
'grass',
0.4,
'scrub',
0.2,
1
]
]
}
},
{
id: 'pitch-outline',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'landuse',
minzoom: 15,
filter: ['==', ['get', 'class'], 'pitch'],
layout: {},
paint: {
'line-color': 'hsl(75, 57%, 84%)'
}
},
{
id: 'waterway-shadow',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'waterway',
minzoom: 8,
layout: {
'line-cap': ['step', ['zoom'], 'butt', 11, 'round'],
'line-join': 'round'
},
paint: {
'line-color': 'hsl(215, 84%, 69%)',
'line-width': [
'interpolate',
['exponential', 1.3],
['zoom'],
9,
['match', ['get', 'class'], ['canal', 'river'], 0.1, 0],
20,
['match', ['get', 'class'], ['canal', 'river'], 8, 3]
],
'line-translate': [
'interpolate',
['exponential', 1.2],
['zoom'],
7,
['literal', [0, 0]],
16,
['literal', [-1, -1]]
],
'line-translate-anchor': 'viewport',
'line-opacity': ['interpolate', ['linear'], ['zoom'], 8, 0, 8.5, 1]
}
},
{
id: 'water-shadow',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'water',
layout: {},
paint: {
'fill-color': 'hsl(215, 84%, 69%)',
'fill-translate': [
'interpolate',
['exponential', 1.2],
['zoom'],
7,
['literal', [0, 0]],
16,
['literal', [-1, -1]]
],
'fill-translate-anchor': 'viewport'
}
},
{
id: 'waterway',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'waterway',
minzoom: 8,
layout: {
'line-cap': ['step', ['zoom'], 'butt', 11, 'round'],
'line-join': 'round'
},
paint: {
'line-color': 'hsl(205, 87%, 76%)',
'line-width': [
'interpolate',
['exponential', 1.3],
['zoom'],
9,
['match', ['get', 'class'], ['canal', 'river'], 0.1, 0],
20,
['match', ['get', 'class'], ['canal', 'river'], 8, 3]
],
'line-opacity': ['interpolate', ['linear'], ['zoom'], 8, 0, 8.5, 1]
}
},
{
id: 'water',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'water',
layout: {},
paint: {
'fill-color': 'hsl(196, 80%, 70%)'
}
},
{
id: 'wetland',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'landuse_overlay',
minzoom: 5,
filter: [
'match',
['get', 'class'],
['wetland', 'wetland_noveg'],
true,
false
],
paint: {
'fill-color': 'hsl(185, 43%, 74%)',
'fill-opacity': [
'interpolate',
['linear'],
['zoom'],
10,
0.25,
10.5,
0.15
]
}
},
{
id: 'wetland-pattern',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'landuse_overlay',
minzoom: 5,
filter: [
'match',
['get', 'class'],
['wetland', 'wetland_noveg'],
true,
false
],
paint: {
'fill-color': 'hsl(185, 43%, 74%)',
'fill-opacity': ['interpolate', ['linear'], ['zoom'], 10, 0, 10.5, 1],
'fill-pattern': 'wetland',
'fill-translate-anchor': 'viewport'
}
},
{
id: 'hillshade',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'hillshade',
maxzoom: 16,
layout: {},
paint: {
'fill-color': [
'match',
['get', 'class'],
'shadow',
'hsl(56, 59%, 22%)',
'hsl(0, 0%, 100%)'
],
'fill-opacity': [
'interpolate',
['linear'],
['zoom'],
14,
['match', ['get', 'level'], [67, 56], 0.08, [89, 78], 0.07, 0.15],
16,
0
],
'fill-antialias': false
}
},
{
id: 'contour-line',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'contour',
minzoom: 11,
filter: ['!=', ['get', 'index'], -1],
layout: {},
paint: {
'line-opacity': [
'interpolate',
['linear'],
['zoom'],
11,
['match', ['get', 'index'], [1, 2], 0.15, 0.25],
12,
['match', ['get', 'index'], [1, 2], 0.3, 0.5]
],
'line-color': 'hsl(100, 100%, 20%)',
'line-width': [
'interpolate',
['linear'],
['zoom'],
13,
['match', ['get', 'index'], [1, 2], 0.5, 0.6],
16,
['match', ['get', 'index'], [1, 2], 0.8, 1.2]
],
'line-offset': [
'interpolate',
['linear'],
['zoom'],
13,
['match', ['get', 'index'], [1, 2], 1, 0.6],
16,
['match', ['get', 'index'], [1, 2], 1.6, 1.2]
]
}
},
{
id: 'land-structure-polygon',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'structure',
minzoom: 13,
filter: [
'all',
['==', ['geometry-type'], 'Polygon'],
['==', ['get', 'class'], 'land']
],
layout: {},
paint: {
'fill-color': 'hsl(35, 12%, 89%)'
}
},
{
id: 'land-structure-line',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'structure',
minzoom: 13,
filter: [
'all',
['==', ['geometry-type'], 'LineString'],
['==', ['get', 'class'], 'land']
],
layout: {
'line-cap': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.99],
['zoom'],
14,
0.75,
20,
40
],
'line-color': 'hsl(35, 12%, 89%)'
}
},
{
id: 'aeroway-polygon',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'aeroway',
minzoom: 11,
filter: [
'all',
['==', ['geometry-type'], 'Polygon'],
[
'match',
['get', 'type'],
['runway', 'taxiway', 'helipad'],
true,
false
]
],
layout: {},
paint: {
'fill-color': [
'interpolate',
['linear'],
['zoom'],
15,
'hsl(230, 23%, 82%)',
16,
'hsl(230, 37%, 84%)'
],
'fill-opacity': ['interpolate', ['linear'], ['zoom'], 11, 0, 11.5, 1]
}
},
{
id: 'aeroway-line',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'aeroway',
minzoom: 9,
filter: ['==', ['geometry-type'], 'LineString'],
layout: {},
paint: {
'line-color': [
'interpolate',
['linear'],
['zoom'],
15,
'hsl(230, 23%, 82%)',
16,
'hsl(230, 37%, 84%)'
],
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
9,
['match', ['get', 'type'], 'runway', 1, 'taxiway', 0.5, 0.5],
18,
['match', ['get', 'type'], 'runway', 80, 'taxiway', 20, 20]
]
}
},
{
id: 'building-outline',
type: 'line',
metadata: {},
source: 'composite',
'source-layer': 'building',
minzoom: 15,
filter: [
'all',
['!=', ['get', 'type'], 'building:part'],
['==', ['get', 'underground'], 'false']
],
layout: {},
paint: {
'line-color': 'hsl(35, 6%, 79%)',
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
15,
0.75,
20,
3
],
'line-opacity': ['interpolate', ['linear'], ['zoom'], 15, 0, 16, 1]
}
},
{
id: 'building',
type: 'fill',
metadata: {},
source: 'composite',
'source-layer': 'building',
minzoom: 15,
filter: [
'all',
['!=', ['get', 'type'], 'building:part'],
['==', ['get', 'underground'], 'false']
],
layout: {},
paint: {
'fill-color': [
'interpolate',
['linear'],
['zoom'],
15,
'hsl(35, 11%, 86%)',
16,
'hsl(35, 8%, 85%)'
],
'fill-opacity': ['interpolate', ['linear'], ['zoom'], 15, 0, 16, 1],
'fill-outline-color': 'hsl(35, 6%, 79%)'
}
},
{
id: 'tunnel-street-minor-low',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'step',
['zoom'],
[
'match',
['get', 'class'],
['street', 'street_limited', 'track', 'primary_link'],
true,
false
],
14,
[
'match',
['get', 'class'],
[
'street',
'street_limited',
'track',
'primary_link',
'secondary_link',
'tertiary_link',
'service'
],
true,
false
]
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.5,
14,
[
'match',
['get', 'class'],
['street', 'street_limited', 'primary_link'],
2,
'track',
1,
0.5
],
18,
[
'match',
['get', 'class'],
['street', 'street_limited', 'primary_link'],
18,
12
]
],
'line-color': 'hsl(0, 0%, 100%)',
'line-opacity': ['step', ['zoom'], 1, 14, 0]
}
},
{
id: 'tunnel-street-minor-case',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'step',
['zoom'],
[
'match',
['get', 'class'],
['street', 'street_limited', 'track', 'primary_link'],
true,
false
],
14,
[
'match',
['get', 'class'],
[
'street',
'street_limited',
'track',
'primary_link',
'secondary_link',
'tertiary_link',
'service'
],
true,
false
]
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.75,
20,
2
],
'line-color': [
'match',
['get', 'class'],
'track',
'hsl(50, 100%, 40%)',
'hsl(230, 19%, 75%)'
],
'line-gap-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.5,
14,
[
'match',
['get', 'class'],
['street', 'street_limited', 'primary_link'],
2,
'track',
1,
0.5
],
18,
[
'match',
['get', 'class'],
['street', 'street_limited', 'primary_link'],
18,
12
]
],
'line-opacity': [
'step',
['zoom'],
['match', ['get', 'class'], 'track', 1, 0],
14,
1
],
'line-dasharray': [3, 3]
}
},
{
id: 'tunnel-primary-secondary-tertiary-case',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'match',
['get', 'class'],
['primary', 'secondary', 'tertiary'],
true,
false
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
10,
[
'match',
['get', 'class'],
'primary',
1,
['secondary', 'tertiary'],
0.75,
0.75
],
18,
2
],
'line-color': 'hsl(230, 19%, 75%)',
'line-gap-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
5,
[
'match',
['get', 'class'],
'primary',
0.75,
['secondary', 'tertiary'],
0.1,
0.1
],
18,
[
'match',
['get', 'class'],
'primary',
32,
['secondary', 'tertiary'],
26,
26
]
],
'line-dasharray': [3, 3]
}
},
{
id: 'tunnel-major-link-case',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'match',
['get', 'class'],
['motorway_link', 'trunk_link'],
true,
false
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.75,
20,
2
],
'line-color': 'hsl(0, 0%, 100%)',
'line-gap-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.5,
14,
2,
18,
18
],
'line-dasharray': [3, 3]
}
},
{
id: 'tunnel-motorway-trunk-case',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
['match', ['get', 'class'], ['motorway', 'trunk'], true, false],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
10,
1,
18,
2
],
'line-color': 'hsl(0, 0%, 100%)',
'line-gap-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
5,
0.75,
18,
32
],
'line-dasharray': [3, 3]
}
},
{
id: 'tunnel-construction',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 14,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
['==', ['get', 'class'], 'construction'],
['==', ['geometry-type'], 'LineString']
],
layout: {},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
14,
2,
18,
18
],
'line-color': 'hsl(230, 24%, 87%)',
'line-dasharray': [
'step',
['zoom'],
['literal', [0.4, 0.8]],
15,
['literal', [0.3, 0.6]],
16,
['literal', [0.2, 0.3]],
17,
['literal', [0.2, 0.25]],
18,
['literal', [0.15, 0.15]]
]
}
},
{
id: 'tunnel-path-smooth-rough',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 12,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
['==', ['get', 'class'], 'path'],
[
'step',
['zoom'],
[
'match',
['get', 'type'],
[
'bridleway',
'footway',
'path',
'hiking',
'mountain_bike',
'trail'
],
true,
false
],
16,
[
'match',
['get', 'type'],
[
'bridleway',
'footway',
'path',
'hiking',
'mountain_bike',
'trail',
'corridor',
'sidewalk',
'crossing'
],
true,
false
]
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
15,
1,
18,
4
],
'line-color': 'hsl(35, 26%, 95%)',
'line-dasharray': [
'step',
['zoom'],
['literal', [4, 0.4]],
15,
['literal', [3, 0.4]],
16,
['literal', [3, 0.35]]
]
}
},
{
id: 'tunnel-path-cycleway-piste',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 12,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
['==', ['get', 'class'], 'path'],
['match', ['get', 'type'], ['cycleway', 'piste'], true, false],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
15,
1,
18,
4
],
'line-color': 'hsl(35, 26%, 95%)'
}
},
{
id: 'tunnel-steps',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 14,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
['==', ['get', 'class'], 'steps'],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
15,
1,
16,
1.6,
18,
6
],
'line-color': 'hsl(35, 26%, 95%)',
'line-dasharray': [
'step',
['zoom'],
['literal', [1, 0]],
15,
['literal', [1.75, 1]],
16,
['literal', [1, 0.75]],
17,
['literal', [0.3, 0.3]]
]
}
},
{
id: 'tunnel-major-link',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'match',
['get', 'class'],
['motorway_link', 'trunk_link'],
true,
false
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.5,
14,
2,
18,
18
],
'line-color': [
'match',
['get', 'class'],
'motorway_link',
'hsl(26, 74%, 81%)',
'trunk_link',
'hsl(46, 77%, 78%)',
'hsl(46, 77%, 78%)'
]
}
},
{
id: 'tunnel-pedestrian',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
['==', ['get', 'class'], 'pedestrian'],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
14,
0.5,
18,
12
],
'line-color': 'hsl(0, 0%, 100%)',
'line-dasharray': [
'step',
['zoom'],
['literal', [1, 0]],
15,
['literal', [1.5, 0.4]],
16,
['literal', [1, 0.2]]
]
}
},
{
id: 'tunnel-street-minor',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'step',
['zoom'],
[
'match',
['get', 'class'],
['street', 'street_limited', 'track', 'primary_link'],
true,
false
],
14,
[
'match',
['get', 'class'],
[
'street',
'street_limited',
'track',
'primary_link',
'secondary_link',
'tertiary_link',
'service'
],
true,
false
]
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
12,
0.5,
14,
[
'match',
['get', 'class'],
['street', 'street_limited', 'primary_link'],
2,
'track',
1,
0.5
],
18,
[
'match',
['get', 'class'],
['street', 'street_limited', 'primary_link'],
18,
12
]
],
'line-color': [
'match',
['get', 'class'],
'street_limited',
'hsl(35, 14%, 93%)',
'hsl(0, 0%, 100%)'
],
'line-opacity': [
'step',
['zoom'],
['match', ['get', 'class'], 'track', 1, 0],
14,
1
]
}
},
{
id: 'tunnel-primary-secondary-tertiary',
type: 'line',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 13,
filter: [
'all',
['==', ['get', 'structure'], 'tunnel'],
[
'match',
['get', 'class'],
['primary', 'secondary', 'tertiary'],
true,
false
],
['==', ['geometry-type'], 'LineString']
],
layout: {
'line-cap': 'round',
'line-join': 'round'
},
paint: {
'line-width': [
'interpolate',
['exponential', 1.5],
['zoom'],
5,
[
'match',
['get', 'class'],
'primary',
0.75,
['secondary', 'tertiary'],
0.1,
0.1
],
18,
[
'match',
['get', 'class'],
'primary',
32,
['secondary', 'tertiary'],
26,
26
]
],
'line-color': 'hsl(0, 0%, 100%)'
}
},
{
id: 'tunnel-oneway-arrow-blue',
type: 'symbol',
metadata: {
'mapbox:group': '1444855769305.6016'
},
source: 'composite',
'source-layer': 'road',
minzoom: 15,
filter: [