From fd7a4b838047451b3913b0e416f24992d79651eb Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 3 Aug 2024 20:12:16 +0200 Subject: [PATCH] applied suggestions supplied by maplibres style deprecations --- map/styles/osm-liberty.json | 1205 +++++++++++------------------------ 1 file changed, 382 insertions(+), 823 deletions(-) diff --git a/map/styles/osm-liberty.json b/map/styles/osm-liberty.json index 07488022f..822662438 100644 --- a/map/styles/osm-liberty.json +++ b/map/styles/osm-liberty.json @@ -35,13 +35,7 @@ "source": "natural_earth_shaded_relief", "maxzoom": 6, "paint": { - "raster-opacity": { - "base": 1.5, - "stops": [ - [4, 0.7], - [6, 0] - ] - } + "raster-opacity": ["interpolate", ["exponential", 1.5], ["zoom"], 4, 0.7, 6, 0] } }, { @@ -71,15 +65,9 @@ "source": "openmaptiles", "source-layer": "landuse", "maxzoom": 8, - "filter": ["==", "class", "residential"], + "filter": ["==", ["get", "class"], "residential"], "paint": { - "fill-color": { - "base": 1, - "stops": [ - [9, "hsla(0, 3%, 85%, 0.84)"], - [12, "hsla(35, 57%, 88%, 0.49)"] - ] - } + "fill-color": ["interpolate", ["linear"], ["zoom"], 9, "hsla(0,3%,85%,0.84)", 12, "hsla(35,57%,88%,0.49)"] } }, { @@ -87,10 +75,10 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landcover", - "filter": ["all", ["==", "class", "wood"]], + "filter": ["==", ["get", "class"], "wood"], "paint": { "fill-antialias": false, - "fill-color": "hsla(98, 61%, 72%, 0.7)", + "fill-color": "hsla(98,61%,72%,0.7)", "fill-opacity": 0.4 } }, @@ -99,7 +87,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landcover", - "filter": ["all", ["==", "class", "grass"]], + "filter": ["==", ["get", "class"], "grass"], "paint": { "fill-antialias": false, "fill-color": "rgba(176, 213, 154, 1)", @@ -111,7 +99,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landcover", - "filter": ["all", ["==", "class", "ice"]], + "filter": ["==", ["get", "class"], "ice"], "paint": { "fill-antialias": false, "fill-color": "rgba(224, 236, 236, 1)", @@ -123,9 +111,9 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landuse", - "filter": ["==", "class", "cemetery"], + "filter": ["==", ["get", "class"], "cemetery"], "paint": { - "fill-color": "hsl(75, 37%, 81%)" + "fill-color": "hsl(75,37%,81%)" } }, { @@ -133,7 +121,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landuse", - "filter": ["==", "class", "hospital"], + "filter": ["==", ["get", "class"], "hospital"], "paint": { "fill-color": "#fde" } @@ -143,7 +131,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landuse", - "filter": ["==", "class", "school"], + "filter": ["==", ["get", "class"], "school"], "paint": { "fill-color": "rgb(236,238,204)" } @@ -153,24 +141,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "waterway", - "filter": ["all", ["==", "brunnel", "tunnel"]], + "filter": ["==", ["get", "brunnel"], "tunnel"], "paint": { "line-color": "#a0c8f0", "line-dasharray": [3, 3], - "line-gap-width": { - "stops": [ - [12, 0], - [20, 6] - ] - }, + "line-gap-width": ["interpolate", ["linear"], ["zoom"], 12, 0, 20, 6], "line-opacity": 1, - "line-width": { - "base": 1.4, - "stops": [ - [8, 1], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 8, 1, 20, 2] } }, { @@ -178,19 +155,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "waterway", - "filter": ["all", ["==", "class", "river"], ["!=", "brunnel", "tunnel"]], + "filter": ["all", ["==", ["get", "class"], "river"], ["!=", ["get", "brunnel"], "tunnel"]], "layout": { "line-cap": "round" }, "paint": { "line-color": "#a0c8f0", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.5], - [20, 6] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 11, 0.5, 20, 6] } }, { @@ -198,19 +169,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "waterway", - "filter": ["all", ["!=", "class", "river"], ["!=", "brunnel", "tunnel"]], + "filter": ["all", ["!=", ["get", "class"], "river"], ["!=", ["get", "brunnel"], "tunnel"]], "layout": { "line-cap": "round" }, "paint": { "line-color": "#a0c8f0", - "line-width": { - "base": 1.3, - "stops": [ - [13, 0.5], - [20, 6] - ] - } + "line-width": ["interpolate", ["exponential", 1.3], ["zoom"], 13, 0.5, 20, 6] } }, { @@ -218,7 +183,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "water", - "filter": ["all", ["!=", "brunnel", "tunnel"]], + "filter": ["!=", ["get", "brunnel"], "tunnel"], "paint": { "fill-color": "rgb(158,189,255)" } @@ -228,7 +193,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "landcover", - "filter": ["all", ["==", "class", "sand"]], + "filter": ["==", ["get", "class"], "sand"], "paint": { "fill-color": "rgba(247, 239, 195, 1)" } @@ -239,7 +204,7 @@ "source": "openmaptiles", "source-layer": "aeroway", "minzoom": 11, - "filter": ["==", "$type", "Polygon"], + "filter": ["==", ["geometry-type"], "Polygon"], "paint": { "fill-color": "rgba(229, 228, 224, 1)", "fill-opacity": 0.7 @@ -251,16 +216,10 @@ "source": "openmaptiles", "source-layer": "aeroway", "minzoom": 11, - "filter": ["all", ["==", "$type", "LineString"], ["==", "class", "runway"]], + "filter": ["all", ["==", ["geometry-type"], "LineString"], ["==", ["get", "class"], "runway"]], "paint": { "line-color": "#f0ede9", - "line-width": { - "base": 1.2, - "stops": [ - [11, 3], - [20, 16] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 11, 3, 20, 16] } }, { @@ -269,16 +228,10 @@ "source": "openmaptiles", "source-layer": "aeroway", "minzoom": 11, - "filter": ["all", ["==", "$type", "LineString"], ["==", "class", "taxiway"]], + "filter": ["all", ["==", ["geometry-type"], "LineString"], ["==", ["get", "class"], "taxiway"]], "paint": { "line-color": "#f0ede9", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.5], - [20, 6] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 11, 0.5, 20, 6] } }, { @@ -286,22 +239,19 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["==", "ramp", 1], ["==", "brunnel", "tunnel"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["==", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "tunnel"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", "line-dasharray": [0.5, 0.25], - "line-width": { - "base": 1.2, - "stops": [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 1, 13, 3, 14, 4, 20, 15] } }, { @@ -309,21 +259,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "service", "track"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["service", "track"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#cfcdca", "line-dasharray": [0.5, 0.25], - "line-width": { - "base": 1.2, - "stops": [ - [15, 1], - [16, 4], - [20, 11] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 15, 1, 16, 4, 20, 11] } }, { @@ -331,21 +278,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "ramp", 1], ["==", "brunnel", "tunnel"]], + "filter": ["all", ["==", ["get", "ramp"], 1], ["==", ["get", "brunnel"], "tunnel"]], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 1, 13, 3, 14, 4, 20, 15] } }, { @@ -353,27 +292,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "street", "street_limited"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["street", "street_limited"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#cfcdca", - "line-opacity": { - "stops": [ - [12, 0], - [12.5, 1] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [12, 0.5], - [13, 1], - [14, 4], - [20, 15] - ] - } + "line-opacity": ["interpolate", ["linear"], ["zoom"], 12, 0, 12.5, 1], + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 0.5, 13, 1, 14, 4, 20, 15] } }, { @@ -381,19 +311,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "secondary", "tertiary"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["secondary", "tertiary"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [8, 1.5], - [20, 17] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 8, 1.5, 20, 17] } }, { @@ -401,21 +329,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "primary", "trunk"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["primary", "trunk"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.4], - [6, 0.7], - [7, 1.75], - [20, 22] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0.4, 6, 0.7, 7, 1.75, 20, 22] } }, { @@ -423,22 +347,19 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["!=", "ramp", 1], ["==", "brunnel", "tunnel"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["!=", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "tunnel"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", "line-dasharray": [0.5, 0.25], - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.4], - [6, 0.7], - [7, 1.75], - [20, 22] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0.4, 6, 0.7, 7, 1.75, 20, 22] } }, { @@ -448,20 +369,14 @@ "source-layer": "transportation", "filter": [ "all", - ["==", "$type", "LineString"], - ["==", "brunnel", "tunnel"], - ["in", "class", "path", "pedestrian"] + ["==", ["geometry-type"], "LineString"], + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["path", "pedestrian"], true, false] ], "paint": { - "line-color": "hsl(0, 0%, 100%)", + "line-color": "hsl(0,0%,100%)", "line-dasharray": [1, 0.75], - "line-width": { - "base": 1.2, - "stops": [ - [14, 0.5], - [20, 10] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 14, 0.5, 20, 10] } }, { @@ -469,21 +384,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["==", "ramp", 1], ["==", "brunnel", "tunnel"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["==", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "tunnel"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fc8", - "line-width": { - "base": 1.2, - "stops": [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { @@ -491,20 +403,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "service", "track"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["service", "track"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff", - "line-width": { - "base": 1.2, - "stops": [ - [15.5, 0], - [16, 2], - [20, 7.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 15.5, 0, 16, 2, 20, 7.5] } }, { @@ -512,21 +421,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "ramp", 1], ["==", "brunnel", "tunnel"]], + "filter": ["all", ["==", ["get", "ramp"], 1], ["==", ["get", "brunnel"], "tunnel"]], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff4c6", - "line-width": { - "base": 1.2, - "stops": [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { @@ -534,20 +435,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "minor"]], + "filter": ["all", ["==", ["get", "brunnel"], "tunnel"], ["match", ["get", "class"], ["minor"], true, false]], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff", - "line-width": { - "base": 1.2, - "stops": [ - [13.5, 0], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 13.5, 0, 14, 2.5, 20, 11.5] } }, { @@ -555,20 +449,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "secondary", "tertiary"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["secondary", "tertiary"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff4c6", - "line-width": { - "base": 1.2, - "stops": [ - [6.5, 0], - [7, 0.5], - [20, 10] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 6.5, 0, 7, 0.5, 20, 10] } }, { @@ -576,20 +467,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "primary", "trunk"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "tunnel"], + ["match", ["get", "class"], ["primary", "trunk"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff4c6", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0], - [7, 1], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0, 7, 1, 20, 18] } }, { @@ -597,20 +485,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["!=", "ramp", 1], ["==", "brunnel", "tunnel"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["!=", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "tunnel"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#ffdaa6", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0], - [7, 1], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0, 7, 1, 20, 18] } }, { @@ -618,17 +504,10 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "rail"]], + "filter": ["all", ["==", ["get", "brunnel"], "tunnel"], ["match", ["get", "class"], ["rail"], true, false]], "paint": { "line-color": "#bbb", - "line-width": { - "base": 1.4, - "stops": [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14, 0.4, 15, 0.75, 20, 2] } }, { @@ -636,18 +515,11 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "rail"]], + "filter": ["all", ["==", ["get", "brunnel"], "tunnel"], ["==", ["get", "class"], "rail"]], "paint": { "line-color": "#bbb", "line-dasharray": [0.2, 8], - "line-width": { - "base": 1.4, - "stops": [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14.5, 0, 15, 3, 20, 8] } }, { @@ -655,17 +527,10 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["in", "class", "transit"]], + "filter": ["all", ["==", ["get", "brunnel"], "tunnel"], ["match", ["get", "class"], ["transit"], true, false]], "paint": { "line-color": "#bbb", - "line-width": { - "base": 1.4, - "stops": [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14, 0.4, 15, 0.75, 20, 2] } }, { @@ -673,18 +538,11 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "transit"]], + "filter": ["all", ["==", ["get", "brunnel"], "tunnel"], ["==", ["get", "class"], "transit"]], "paint": { "line-color": "#bbb", "line-dasharray": [0.2, 8], - "line-width": { - "base": 1.4, - "stops": [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14.5, 0, 15, 3, 20, 8] } }, { @@ -692,7 +550,7 @@ "type": "fill", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "$type", "Polygon"]], + "filter": ["==", ["geometry-type"], "Polygon"], "paint": { "fill-pattern": "pedestrian_polygon" } @@ -703,22 +561,19 @@ "source": "openmaptiles", "source-layer": "transportation", "minzoom": 12, - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "motorway"], ["==", "ramp", 1]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "motorway"], + ["==", ["get", "ramp"], 1] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 1, 13, 3, 14, 4, 20, 15] } }, { @@ -726,21 +581,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "service", "track"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["service", "track"], true, false] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { "line-color": "#cfcdca", - "line-width": { - "base": 1.2, - "stops": [ - [15, 1], - [16, 4], - [20, 11] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 15, 1, 16, 4, 20, 11] } }, { @@ -751,9 +603,9 @@ "minzoom": 13, "filter": [ "all", - ["!in", "brunnel", "bridge", "tunnel"], - ["!in", "class", "pedestrian", "path", "track", "service", "motorway"], - ["==", "ramp", 1] + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["motorway", "path", "pedestrian", "service", "track"], false, true], + ["==", ["get", "ramp"], 1] ], "layout": { "line-cap": "round", @@ -761,15 +613,7 @@ }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 1, 13, 3, 14, 4, 20, 15] } }, { @@ -779,10 +623,10 @@ "source-layer": "transportation", "filter": [ "all", - ["==", "$type", "LineString"], - ["!in", "brunnel", "bridge", "tunnel"], - ["in", "class", "minor"], - ["!=", "ramp", 1] + ["==", ["geometry-type"], "LineString"], + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["minor"], true, false], + ["!=", ["get", "ramp"], 1] ], "layout": { "line-cap": "round", @@ -790,21 +634,8 @@ }, "paint": { "line-color": "#cfcdca", - "line-opacity": { - "stops": [ - [12, 0], - [12.5, 1] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [12, 0.5], - [13, 1], - [14, 4], - [20, 20] - ] - } + "line-opacity": ["interpolate", ["linear"], ["zoom"], 12, 0, 12.5, 1], + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 0.5, 13, 1, 14, 4, 20, 20] } }, { @@ -814,9 +645,9 @@ "source-layer": "transportation", "filter": [ "all", - ["!in", "brunnel", "bridge", "tunnel"], - ["in", "class", "secondary", "tertiary"], - ["!=", "ramp", 1] + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["secondary", "tertiary"], true, false], + ["!=", ["get", "ramp"], 1] ], "layout": { "line-cap": "round", @@ -824,13 +655,7 @@ }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [8, 1.5], - [20, 17] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 8, 1.5, 20, 17] } }, { @@ -838,21 +663,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "primary", "trunk"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["primary", "trunk"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.4], - [6, 0.7], - [7, 1.75], - [20, 22] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0.4, 6, 0.7, 7, 1.75, 20, 22] } }, { @@ -861,22 +682,19 @@ "source": "openmaptiles", "source-layer": "transportation", "minzoom": 5, - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "motorway"], ["!=", "ramp", 1]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "motorway"], + ["!=", ["get", "ramp"], 1] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.4], - [6, 0.7], - [7, 1.75], - [20, 22] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0.4, 6, 0.7, 7, 1.75, 20, 22] } }, { @@ -885,22 +703,19 @@ "source": "openmaptiles", "source-layer": "transportation", "minzoom": 12, - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "motorway"], ["==", "ramp", 1]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "motorway"], + ["==", ["get", "ramp"], 1] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { "line-color": "#fc8", - "line-width": { - "base": 1.2, - "stops": [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { @@ -908,21 +723,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "service", "track"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["service", "track"], true, false] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { "line-color": "#fff", - "line-width": { - "base": 1.2, - "stops": [ - [15.5, 0], - [16, 2], - [20, 7.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 15.5, 0, 16, 2, 20, 7.5] } }, { @@ -933,9 +745,9 @@ "minzoom": 13, "filter": [ "all", - ["!in", "brunnel", "bridge", "tunnel"], - ["==", "ramp", 1], - ["!in", "class", "pedestrian", "path", "track", "service", "motorway"] + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "ramp"], 1], + ["match", ["get", "class"], ["motorway", "path", "pedestrian", "service", "track"], false, true] ], "layout": { "line-cap": "round", @@ -943,15 +755,7 @@ }, "paint": { "line-color": "#fea", - "line-width": { - "base": 1.2, - "stops": [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { @@ -961,9 +765,9 @@ "source-layer": "transportation", "filter": [ "all", - ["==", "$type", "LineString"], - ["!in", "brunnel", "bridge", "tunnel"], - ["in", "class", "minor"] + ["==", ["geometry-type"], "LineString"], + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["minor"], true, false] ], "layout": { "line-cap": "round", @@ -971,14 +775,7 @@ }, "paint": { "line-color": "#fff", - "line-width": { - "base": 1.2, - "stops": [ - [13.5, 0], - [14, 2.5], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 13.5, 0, 14, 2.5, 20, 18] } }, { @@ -986,21 +783,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "secondary", "tertiary"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["secondary", "tertiary"], true, false] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { "line-color": "#fea", - "line-width": { - "base": 1.2, - "stops": [ - [6.5, 0], - [8, 0.5], - [20, 13] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 6.5, 0, 8, 0.5, 20, 13] } }, { @@ -1008,20 +802,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "primary", "trunk"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["match", ["get", "class"], ["primary", "trunk"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fea", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0], - [7, 1], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0, 7, 1, 20, 18] } }, { @@ -1030,27 +821,19 @@ "source": "openmaptiles", "source-layer": "transportation", "minzoom": 5, - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "motorway"], ["!=", "ramp", 1]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "motorway"], + ["!=", ["get", "ramp"], 1] + ], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { - "line-color": { - "base": 1, - "stops": [ - [5, "hsl(26, 87%, 62%)"], - [6, "#fc8"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [5, 0], - [7, 1], - [20, 18] - ] - } + "line-color": ["interpolate", ["linear"], ["zoom"], 5, "hsl(26,87%,62%)", 6, "#fc8"], + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0, 7, 1, 20, 18] } }, { @@ -1058,17 +841,14 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "rail"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "rail"] + ], "paint": { "line-color": "#bbb", - "line-width": { - "base": 1.4, - "stops": [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14, 0.4, 15, 0.75, 20, 2] } }, { @@ -1076,18 +856,15 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "rail"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "rail"] + ], "paint": { "line-color": "#bbb", "line-dasharray": [0.2, 8], - "line-width": { - "base": 1.4, - "stops": [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14.5, 0, 15, 3, 20, 8] } }, { @@ -1095,17 +872,14 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "transit"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "transit"] + ], "paint": { "line-color": "#bbb", - "line-width": { - "base": 1.4, - "stops": [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14, 0.4, 15, 0.75, 20, 2] } }, { @@ -1113,18 +887,15 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "transit"]], + "filter": [ + "all", + ["match", ["get", "brunnel"], ["bridge", "tunnel"], false, true], + ["==", ["get", "class"], "transit"] + ], "paint": { "line-color": "#bbb", "line-dasharray": [0.2, 8], - "line-width": { - "base": 1.4, - "stops": [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14.5, 0, 15, 3, 20, 8] } }, { @@ -1133,7 +904,7 @@ "source": "openmaptiles", "source-layer": "transportation", "minzoom": 15, - "filter": ["==", "oneway", 1], + "filter": ["==", ["get", "oneway"], 1], "layout": { "icon-image": "arrow", "symbol-placement": "line" @@ -1145,7 +916,7 @@ "source": "openmaptiles", "source-layer": "transportation", "minzoom": 15, - "filter": ["==", "oneway", -1], + "filter": ["==", ["get", "oneway"], -1], "layout": { "icon-image": "arrow", "symbol-placement": "line", @@ -1157,21 +928,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["==", "ramp", 1], ["==", "brunnel", "bridge"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["==", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "bridge"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 1, 13, 3, 14, 4, 20, 15] } }, { @@ -1179,20 +947,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "service", "track"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["service", "track"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#cfcdca", - "line-width": { - "base": 1.2, - "stops": [ - [15, 1], - [16, 4], - [20, 11] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 15, 1, 16, 4, 20, 11] } }, { @@ -1200,21 +965,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "link"], ["==", "brunnel", "bridge"]], + "filter": ["all", ["==", ["get", "class"], "link"], ["==", ["get", "brunnel"], "bridge"]], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 1, 13, 3, 14, 4, 20, 15] } }, { @@ -1222,27 +979,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "street", "street_limited"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["street", "street_limited"], true, false] + ], "layout": { "line-join": "round" }, "paint": { - "line-color": "hsl(36, 6%, 74%)", - "line-opacity": { - "stops": [ - [12, 0], - [12.5, 1] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [12, 0.5], - [13, 1], - [14, 4], - [20, 25] - ] - } + "line-color": "hsl(36,6%,74%)", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 12, 0, 12.5, 1], + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 0.5, 13, 1, 14, 4, 20, 25] } }, { @@ -1250,19 +998,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "secondary", "tertiary"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["secondary", "tertiary"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [8, 1.5], - [20, 17] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 8, 1.5, 20, 17] } }, { @@ -1270,21 +1016,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "primary", "trunk"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["primary", "trunk"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.4], - [6, 0.7], - [7, 1.75], - [20, 22] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0.4, 6, 0.7, 7, 1.75, 20, 22] } }, { @@ -1292,21 +1034,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["!=", "ramp", 1], ["==", "brunnel", "bridge"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["!=", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "bridge"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#e9ac77", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.4], - [6, 0.7], - [7, 1.75], - [20, 22] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0.4, 6, 0.7, 7, 1.75, 20, 22] } }, { @@ -1314,21 +1053,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["==", "ramp", 1], ["==", "brunnel", "bridge"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["==", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "bridge"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fc8", - "line-width": { - "base": 1.2, - "stops": [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { @@ -1336,20 +1072,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "service", "track"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["service", "track"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff", - "line-width": { - "base": 1.2, - "stops": [ - [15.5, 0], - [16, 2], - [20, 7.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 15.5, 0, 16, 2, 20, 7.5] } }, { @@ -1357,21 +1090,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "link"], ["==", "brunnel", "bridge"]], + "filter": ["all", ["==", ["get", "class"], "link"], ["==", ["get", "brunnel"], "bridge"]], "layout": { "line-join": "round" }, "paint": { "line-color": "#fea", - "line-width": { - "base": 1.2, - "stops": [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { @@ -1379,20 +1104,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "minor"]], + "filter": ["all", ["==", ["get", "brunnel"], "bridge"], ["match", ["get", "class"], ["minor"], true, false]], "layout": { "line-join": "round" }, "paint": { "line-color": "#fff", - "line-width": { - "base": 1.2, - "stops": [ - [13.5, 0], - [14, 2.5], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 13.5, 0, 14, 2.5, 20, 18] } }, { @@ -1400,20 +1118,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "secondary", "tertiary"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["secondary", "tertiary"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fea", - "line-width": { - "base": 1.2, - "stops": [ - [6.5, 0], - [7, 0.5], - [20, 10] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 6.5, 0, 7, 0.5, 20, 10] } }, { @@ -1421,20 +1136,17 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "brunnel", "bridge"], ["in", "class", "primary", "trunk"]], + "filter": [ + "all", + ["==", ["get", "brunnel"], "bridge"], + ["match", ["get", "class"], ["primary", "trunk"], true, false] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fea", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0], - [7, 1], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0, 7, 1, 20, 18] } }, { @@ -1442,20 +1154,18 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "motorway"], ["!=", "ramp", 1], ["==", "brunnel", "bridge"]], + "filter": [ + "all", + ["==", ["get", "class"], "motorway"], + ["!=", ["get", "ramp"], 1], + ["==", ["get", "brunnel"], "bridge"] + ], "layout": { "line-join": "round" }, "paint": { "line-color": "#fc8", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0], - [7, 1], - [20, 18] - ] - } + "line-width": ["interpolate", ["exponential", 1.2], ["zoom"], 5, 0, 7, 1, 20, 18] } }, { @@ -1463,17 +1173,10 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "rail"], ["==", "brunnel", "bridge"]], + "filter": ["all", ["==", ["get", "class"], "rail"], ["==", ["get", "brunnel"], "bridge"]], "paint": { "line-color": "#bbb", - "line-width": { - "base": 1.4, - "stops": [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14, 0.4, 15, 0.75, 20, 2] } }, { @@ -1481,18 +1184,11 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "rail"], ["==", "brunnel", "bridge"]], + "filter": ["all", ["==", ["get", "class"], "rail"], ["==", ["get", "brunnel"], "bridge"]], "paint": { "line-color": "#bbb", "line-dasharray": [0.2, 8], - "line-width": { - "base": 1.4, - "stops": [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14.5, 0, 15, 3, 20, 8] } }, { @@ -1500,17 +1196,10 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "transit"], ["==", "brunnel", "bridge"]], + "filter": ["all", ["==", ["get", "class"], "transit"], ["==", ["get", "brunnel"], "bridge"]], "paint": { "line-color": "#bbb", - "line-width": { - "base": 1.4, - "stops": [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14, 0.4, 15, 0.75, 20, 2] } }, { @@ -1518,18 +1207,11 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "filter": ["all", ["==", "class", "transit"], ["==", "brunnel", "bridge"]], + "filter": ["all", ["==", ["get", "class"], "transit"], ["==", ["get", "brunnel"], "bridge"]], "paint": { "line-color": "#bbb", "line-dasharray": [0.2, 8], - "line-width": { - "base": 1.4, - "stops": [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } + "line-width": ["interpolate", ["exponential", 1.4], ["zoom"], 14.5, 0, 15, 3, 20, 8] } }, { @@ -1541,22 +1223,8 @@ "maxzoom": 24, "paint": { "fill-color": "rgba(152, 198, 234, 1)", - "fill-outline-color": { - "base": 1, - "stops": [ - [13, "hsla(35, 6%, 79%, 0.32)"], - [14, "hsl(35, 6%, 79%)"] - ] - }, - "fill-opacity": { - "stops": [ - [13, 0], - [14, 1], - [14.5, 0], - [16.8, 0], - [17, 1] - ] - }, + "fill-outline-color": ["interpolate", ["linear"], ["zoom"], 13, "hsla(35,6%,79%,0.32)", 14, "hsl(35,6%,79%)"], + "fill-opacity": ["interpolate", ["linear"], ["zoom"], 13, 0, 14, 1, 14.5, 0, 16.8, 0, 17, 1], "fill-antialias": true } }, @@ -1568,23 +1236,9 @@ "minzoom": 13.5, "maxzoom": 17.5, "paint": { - "fill-extrusion-height": { - "property": "render_height", - "type": "identity" - }, - "fill-extrusion-base": { - "property": "render_min_height", - "type": "identity" - }, - "fill-extrusion-opacity": { - "stops": [ - [13.5, 0], - [14, 0.8], - [16.8, 0.8], - [17, 0.1], - [17.1, 0] - ] - }, + "fill-extrusion-height": ["get", "render_height"], + "fill-extrusion-base": ["get", "render_min_height"], + "fill-extrusion-opacity": ["interpolate", ["linear"], ["zoom"], 13.5, 0, 14, 0.8, 16.8, 0.8, 17, 0.1, 17.1, 0], "fill-extrusion-color": ["interpolate", ["linear"], ["zoom"], 13, "#98c6ea", 15, "#64a0c8", 20, "#005293"] } }, @@ -1594,21 +1248,14 @@ "source": "openmaptiles", "source-layer": "boundary", "minzoom": 8, - "filter": ["all", ["in", "admin_level", 3, 4]], + "filter": ["match", ["get", "admin_level"], [3, 4], true, false], "layout": { "line-join": "round" }, "paint": { "line-color": "#9e9cab", "line-dasharray": [5, 1], - "line-width": { - "base": 1, - "stops": [ - [4, 0.4], - [5, 1], - [12, 1.8] - ] - } + "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.4, 5, 1, 12, 1.8] } }, { @@ -1617,28 +1264,15 @@ "source": "openmaptiles", "source-layer": "boundary", "maxzoom": 5, - "filter": ["all", ["==", "admin_level", 2], ["!has", "claimed_by"]], + "filter": ["all", ["==", ["get", "admin_level"], 2], ["!", ["has", "claimed_by"]]], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { - "line-color": "hsl(248, 1%, 41%)", - "line-opacity": { - "base": 1, - "stops": [ - [0, 0.4], - [4, 1] - ] - }, - "line-width": { - "base": 1, - "stops": [ - [3, 1], - [5, 1.2], - [12, 3] - ] - } + "line-color": "hsl(248,1%,41%)", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.4, 4, 1], + "line-width": ["interpolate", ["linear"], ["zoom"], 3, 1, 5, 1.2, 12, 3] } }, { @@ -1647,28 +1281,15 @@ "source": "openmaptiles", "source-layer": "boundary", "minzoom": 5, - "filter": ["all", ["==", "admin_level", 2]], + "filter": ["==", ["get", "admin_level"], 2], "layout": { "line-cap": "round", "line-join": "round" }, "paint": { - "line-color": "hsl(248, 1%, 41%)", - "line-opacity": { - "base": 1, - "stops": [ - [0, 0.4], - [4, 1] - ] - }, - "line-width": { - "base": 1, - "stops": [ - [3, 1], - [5, 1.2], - [12, 3] - ] - } + "line-color": "hsl(248,1%,41%)", + "line-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.4, 4, 1], + "line-width": ["interpolate", ["linear"], ["zoom"], 3, 1, 5, 1.2, 12, 3] } }, { @@ -1676,9 +1297,9 @@ "type": "symbol", "source": "openmaptiles", "source-layer": "waterway", - "filter": ["all", ["==", "$type", "LineString"]], + "filter": ["==", ["geometry-type"], "LineString"], "layout": { - "text-field": "{name}", + "text-field": ["to-string", ["get", "name"]], "text-font": ["Roboto Regular"], "text-max-width": 5, "text-size": 12, @@ -1695,9 +1316,9 @@ "type": "symbol", "source": "openmaptiles", "source-layer": "water_name", - "filter": ["==", "$type", "Point"], + "filter": ["==", ["geometry-type"], "Point"], "layout": { - "text-field": "{name}", + "text-field": ["to-string", ["get", "name"]], "text-font": ["Roboto Regular"], "text-max-width": 5, "text-size": 12 @@ -1714,11 +1335,11 @@ "source": "openmaptiles", "source-layer": "poi", "minzoom": 16, - "filter": ["all", ["==", "$type", "Point"], [">=", "rank", 20]], + "filter": ["all", ["==", ["geometry-type"], "Point"], [">=", ["get", "rank"], 20]], "layout": { - "icon-image": "{class}_11", + "icon-image": ["concat", ["get", "class"], "_11"], "text-anchor": "top", - "text-field": "{name}", + "text-field": ["to-string", ["get", "name"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 9, "text-offset": [0, 0.6], @@ -1738,11 +1359,11 @@ "source": "openmaptiles", "source-layer": "poi", "minzoom": 15, - "filter": ["all", ["==", "$type", "Point"], [">=", "rank", 7], ["<", "rank", 20]], + "filter": ["all", ["==", ["geometry-type"], "Point"], [">=", ["get", "rank"], 7], ["<", ["get", "rank"], 20]], "layout": { - "icon-image": "{class}_11", + "icon-image": ["concat", ["get", "class"], "_11"], "text-anchor": "top", - "text-field": "{name}", + "text-field": ["to-string", ["get", "name"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 9, "text-offset": [0, 0.6], @@ -1761,11 +1382,11 @@ "source": "openmaptiles", "source-layer": "poi", "minzoom": 14, - "filter": ["all", ["==", "$type", "Point"], [">=", "rank", 1], ["<", "rank", 7]], + "filter": ["all", ["==", ["geometry-type"], "Point"], [">=", ["get", "rank"], 1], ["<", ["get", "rank"], 7]], "layout": { - "icon-image": "{class}_11", + "icon-image": ["concat", ["get", "class"], "_11"], "text-anchor": "top", - "text-field": "{name}", + "text-field": ["to-string", ["get", "name"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 9, "text-offset": [0, 0.6], @@ -1784,11 +1405,11 @@ "type": "symbol", "source": "openmaptiles", "source-layer": "poi", - "filter": ["all", ["in", "class", "bus", "rail", "airport"]], + "filter": ["match", ["get", "class"], ["airport", "bus", "rail"], true, false], "layout": { - "icon-image": "{class}_11", + "icon-image": ["concat", ["get", "class"], "_11"], "text-anchor": "left", - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 9, "text-offset": [0.9, 0], @@ -1811,16 +1432,10 @@ "layout": { "symbol-placement": "line", "text-anchor": "center", - "text-field": "{name}", + "text-field": ["to-string", ["get", "name"]], "text-font": ["Roboto Regular"], "text-offset": [0, 0.15], - "text-size": { - "base": 1, - "stops": [ - [13, 12], - [14, 13] - ] - }, + "text-size": ["interpolate", ["linear"], ["zoom"], 13, 12, 14, 13], "visibility": "visible" }, "paint": { @@ -1836,19 +1451,13 @@ "source": "openmaptiles", "source-layer": "transportation_name", "minzoom": 7, - "filter": ["all", ["<=", "ref_length", 6]], + "filter": ["<=", ["get", "ref_length"], 6], "layout": { - "icon-image": "default_{ref_length}", + "icon-image": ["concat", "default_", ["get", "ref_length"]], "icon-rotation-alignment": "viewport", - "symbol-placement": { - "base": 1, - "stops": [ - [10, "point"], - [11, "line"] - ] - }, + "symbol-placement": ["step", ["zoom"], "point", 11, "line"], "symbol-spacing": 500, - "text-field": "{ref}", + "text-field": ["to-string", ["get", "ref"]], "text-font": ["Roboto Regular"], "text-offset": [0, 0.1], "text-rotation-alignment": "viewport", @@ -1862,19 +1471,19 @@ "type": "symbol", "source": "openmaptiles", "source-layer": "place", - "filter": ["all", ["in", "class", "hamlet", "island", "islet", "neighbourhood", "suburb", "quarter"]], + "filter": [ + "match", + ["get", "class"], + ["hamlet", "island", "islet", "neighbourhood", "quarter", "suburb"], + true, + false + ], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], "text-letter-spacing": 0.1, "text-max-width": 9, - "text-size": { - "base": 1.2, - "stops": [ - [12, 10], - [15, 14] - ] - }, + "text-size": ["interpolate", ["exponential", 1.2], ["zoom"], 12, 10, 15, 14], "text-transform": "uppercase" }, "paint": { @@ -1888,18 +1497,12 @@ "type": "symbol", "source": "openmaptiles", "source-layer": "place", - "filter": ["all", ["==", "class", "village"]], + "filter": ["==", ["get", "class"], "village"], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Regular"], "text-max-width": 8, - "text-size": { - "base": 1.2, - "stops": [ - [10, 12], - [15, 22] - ] - } + "text-size": ["interpolate", ["exponential", 1.2], ["zoom"], 10, 12, 15, 22] }, "paint": { "text-color": "#333", @@ -1912,27 +1515,15 @@ "type": "symbol", "source": "openmaptiles", "source-layer": "place", - "filter": ["all", ["==", "class", "town"]], - "layout": { - "icon-image": { - "base": 1, - "stops": [ - [0, "dot_9"], - [8, ""] - ] - }, + "filter": ["==", ["get", "class"], "town"], + "layout": { + "icon-image": ["step", ["zoom"], "dot_9", 8, ""], "text-anchor": "bottom", - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Regular"], "text-max-width": 8, "text-offset": [0, 0], - "text-size": { - "base": 1.2, - "stops": [ - [7, 12], - [11, 16] - ] - } + "text-size": ["interpolate", ["exponential", 1.2], ["zoom"], 7, 12, 11, 16] }, "paint": { "text-color": "#333", @@ -1946,27 +1537,15 @@ "source": "openmaptiles", "source-layer": "place", "minzoom": 5, - "filter": ["all", ["==", "class", "city"]], - "layout": { - "icon-image": { - "base": 1, - "stops": [ - [0, "dot_9"], - [8, ""] - ] - }, + "filter": ["==", ["get", "class"], "city"], + "layout": { + "icon-image": ["step", ["zoom"], "dot_9", 8, ""], "text-anchor": "bottom", - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Medium"], "text-max-width": 8, "text-offset": [0, 0], - "text-size": { - "base": 1.2, - "stops": [ - [7, 14], - [11, 24] - ] - }, + "text-size": ["interpolate", ["exponential", 1.2], ["zoom"], 7, 14, 11, 24], "icon-allow-overlap": true, "icon-optional": false }, @@ -1983,16 +1562,11 @@ "source-layer": "place", "minzoom": 0, "maxzoom": 6, - "filter": ["all", ["==", "class", "state"]], + "filter": ["==", ["get", "class"], "state"], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], - "text-size": { - "stops": [ - [4, 11], - [6, 15] - ] - }, + "text-size": ["interpolate", ["linear"], ["zoom"], 4, 11, 6, 15], "text-transform": "uppercase" }, "paint": { @@ -2007,17 +1581,12 @@ "source": "openmaptiles", "source-layer": "place", "minzoom": 2.5, - "filter": ["all", [">=", "rank", 3], ["==", "class", "country"]], + "filter": ["all", [">=", ["get", "rank"], 3], ["==", ["get", "class"], "country"]], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 6.25, - "text-size": { - "stops": [ - [3, 11], - [7, 17] - ] - }, + "text-size": ["interpolate", ["linear"], ["zoom"], 3, 11, 7, 17], "text-transform": "none" }, "paint": { @@ -2033,17 +1602,12 @@ "source": "openmaptiles", "source-layer": "place", "minzoom": 2, - "filter": ["all", ["==", "rank", 2], ["==", "class", "country"]], + "filter": ["all", ["==", ["get", "rank"], 2], ["==", ["get", "class"], "country"]], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 6.25, - "text-size": { - "stops": [ - [2, 11], - [5, 17] - ] - }, + "text-size": ["interpolate", ["linear"], ["zoom"], 2, 11, 5, 17], "text-transform": "none" }, "paint": { @@ -2059,17 +1623,12 @@ "source": "openmaptiles", "source-layer": "place", "minzoom": 1, - "filter": ["all", ["==", "rank", 1], ["==", "class", "country"]], + "filter": ["all", ["==", ["get", "rank"], 1], ["==", ["get", "class"], "country"]], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], "text-max-width": 6.25, - "text-size": { - "stops": [ - [1, 11], - [4, 17] - ] - }, + "text-size": ["interpolate", ["linear"], ["zoom"], 1, 11, 4, 17], "text-transform": "none" }, "paint": { @@ -2085,9 +1644,9 @@ "source": "openmaptiles", "source-layer": "place", "maxzoom": 1, - "filter": ["all", ["==", "class", "continent"]], + "filter": ["==", ["get", "class"], "continent"], "layout": { - "text-field": "{name_en}", + "text-field": ["to-string", ["get", "name_en"]], "text-font": ["Roboto Condensed Italic"], "text-size": 13, "text-transform": "uppercase",