diff --git a/test/integration/render-tests/real-world/bangkok/expected.png b/test/integration/render-tests/real-world/bangkok/expected.png new file mode 100644 index 00000000000..04b70d10d3a Binary files /dev/null and b/test/integration/render-tests/real-world/bangkok/expected.png differ diff --git a/test/integration/render-tests/real-world/bangkok/style.json b/test/integration/render-tests/real-world/bangkok/style.json new file mode 100644 index 00000000000..deca22d175b --- /dev/null +++ b/test/integration/render-tests/real-world/bangkok/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/bangkok.json"], + ["setZoom", 12 ], + ["setCenter", [100.5434415, 13.714627] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/test/integration/render-tests/real-world/chicago/expected.png b/test/integration/render-tests/real-world/chicago/expected.png new file mode 100644 index 00000000000..4ae5bfba545 Binary files /dev/null and b/test/integration/render-tests/real-world/chicago/expected.png differ diff --git a/test/integration/render-tests/real-world/chicago/style.json b/test/integration/render-tests/real-world/chicago/style.json new file mode 100644 index 00000000000..2443a3f49d5 --- /dev/null +++ b/test/integration/render-tests/real-world/chicago/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/chicago.json"], + ["setZoom", 13 ], + ["setCenter", [-87.6942445, 41.8703965] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/test/integration/render-tests/real-world/nepal/expected.png b/test/integration/render-tests/real-world/nepal/expected.png new file mode 100644 index 00000000000..c447cfaf2f4 Binary files /dev/null and b/test/integration/render-tests/real-world/nepal/expected.png differ diff --git a/test/integration/render-tests/real-world/nepal/style.json b/test/integration/render-tests/real-world/nepal/style.json new file mode 100644 index 00000000000..0d648891cd8 --- /dev/null +++ b/test/integration/render-tests/real-world/nepal/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/nepal.json"], + ["setZoom", 13 ], + ["setCenter", [85.48805250000001, 28.115547] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/test/integration/render-tests/real-world/norway/expected.png b/test/integration/render-tests/real-world/norway/expected.png new file mode 100644 index 00000000000..27d7b636cb1 Binary files /dev/null and b/test/integration/render-tests/real-world/norway/expected.png differ diff --git a/test/integration/render-tests/real-world/norway/style.json b/test/integration/render-tests/real-world/norway/style.json new file mode 100644 index 00000000000..df3e8ce7ed7 --- /dev/null +++ b/test/integration/render-tests/real-world/norway/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/norway.json"], + ["setZoom", 12 ], + ["setCenter", [10.8181, 64.863174] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/test/integration/render-tests/real-world/sanfrancisco/expected.png b/test/integration/render-tests/real-world/sanfrancisco/expected.png new file mode 100644 index 00000000000..7bd65a5ff4f Binary files /dev/null and b/test/integration/render-tests/real-world/sanfrancisco/expected.png differ diff --git a/test/integration/render-tests/real-world/sanfrancisco/style.json b/test/integration/render-tests/real-world/sanfrancisco/style.json new file mode 100644 index 00000000000..29110468bc1 --- /dev/null +++ b/test/integration/render-tests/real-world/sanfrancisco/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/sanfrancisco.json"], + ["setZoom", 15 ], + ["setCenter", [-122.448635, 37.7669995] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/test/integration/render-tests/real-world/uruguay/expected.png b/test/integration/render-tests/real-world/uruguay/expected.png new file mode 100644 index 00000000000..107c8b39f92 Binary files /dev/null and b/test/integration/render-tests/real-world/uruguay/expected.png differ diff --git a/test/integration/render-tests/real-world/uruguay/style.json b/test/integration/render-tests/real-world/uruguay/style.json new file mode 100644 index 00000000000..9d5c8cb5234 --- /dev/null +++ b/test/integration/render-tests/real-world/uruguay/style.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 512, + "height": 512, + "operations": [ + ["setStyle", "local://styles/uruguay.json"], + ["setZoom", 9 ], + ["setCenter", [-56.509552, -32.865788] ], + ["wait"] + ] + } + }, + "sources": {}, + "layers": [] +} diff --git a/test/integration/styles/bangkok.json b/test/integration/styles/bangkok.json new file mode 100644 index 00000000000..5dd7cb94574 --- /dev/null +++ b/test/integration/styles/bangkok.json @@ -0,0 +1,976 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://node_modules/%40mapbox/mvt-fixtures/real-world/bangkok/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "NotoCJK" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/test/integration/styles/chicago.json b/test/integration/styles/chicago.json new file mode 100644 index 00000000000..122452bca8d --- /dev/null +++ b/test/integration/styles/chicago.json @@ -0,0 +1,867 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://node_modules/%40mapbox/mvt-fixtures/real-world/chicago/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + } + ] +} diff --git a/test/integration/styles/nepal.json b/test/integration/styles/nepal.json new file mode 100644 index 00000000000..5b6e2f6580d --- /dev/null +++ b/test/integration/styles/nepal.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://node_modules/%40mapbox/mvt-fixtures/real-world/nepal/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/test/integration/styles/norway.json b/test/integration/styles/norway.json new file mode 100644 index 00000000000..7ee23f3f854 --- /dev/null +++ b/test/integration/styles/norway.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://node_modules/%40mapbox/mvt-fixtures/real-world/norway/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/test/integration/styles/sanfrancisco.json b/test/integration/styles/sanfrancisco.json new file mode 100644 index 00000000000..0981d8aa8b5 --- /dev/null +++ b/test/integration/styles/sanfrancisco.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://node_modules/%40mapbox/mvt-fixtures/real-world/sanfrancisco/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +} diff --git a/test/integration/styles/uruguay.json b/test/integration/styles/uruguay.json new file mode 100644 index 00000000000..ac190184538 --- /dev/null +++ b/test/integration/styles/uruguay.json @@ -0,0 +1,981 @@ +{ + "version": 8, + "name": "Basic", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template" + }, + "sources": { + "mapbox": { + "type": "vector", + "tiles": [ "local://node_modules/%40mapbox/mvt-fixtures/real-world/uruguay/{z}-{x}-{y}.mvt" ] + } + }, + "sprite": "mapbox://sprites/mapbox/basic-v9", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#dedede" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d2edae", + "fill-opacity": 0.75 + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d2edae" + }, + "interactive": true + }, + { + "id": "waterway", + "type": "line", + "source": "mapbox", + "source-layer": "waterway", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "river", + "canal" + ] + ], + "paint": { + "line-color": "#a0cfdf", + "line-width": { + "base": 1.4, + "stops": [ + [ + 8, + 0.5 + ], + [ + 20, + 15 + ] + ] + } + }, + "interactive": true + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0cfdf" + }, + "interactive": true + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": "#d6d6d6" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.36, + 0.18 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + }, + "line-dasharray": [ + 0.28, + 0.14 + ] + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "in", + "structure", + "none", + "ford" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "butt", + "line-join": "miter" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major case", + "paint": { + "line-color": "#dedede", + "line-width": { + "base": 1.6, + "stops": [ + [ + 12, + 0.5 + ], + [ + 20, + 10 + ] + ] + }, + "line-gap-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway_link", + "street", + "street_limited", + "service", + "track", + "pedestrian", + "path", + "link" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_minor", + "paint": { + "line-color": "#efefef", + "line-width": { + "base": 1.55, + "stops": [ + [ + 4, + 0.25 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ], + [ + "==", + "structure", + "bridge" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_major", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.4, + "stops": [ + [ + 6, + 0.5 + ], + [ + 20, + 30 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "<=", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 0 + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_country", + "paint": { + "line-color": "#8b8a8a", + "line-width": { + "base": 1.3, + "stops": [ + [ + 3, + 0.5 + ], + [ + 22, + 15 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "icon-image": "{maki}-11", + "text-offset": [ + 0, + 0.5 + ], + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 8, + "text-anchor": "top", + "text-size": 11, + "icon-size": 1 + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "all", + [ + "==", + "scalerank", + 1 + ], + [ + "==", + "localrank", + 1 + ] + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label", + "paint": { + "text-color": "#666", + "text-halo-width": 1, + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-blur": 1 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "layout": { + "symbol-placement": "line", + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-size": { + "base": 1.4, + "stops": [ + [ + 10, + 8 + ], + [ + 20, + 14 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "in", + "class", + "motorway", + "primary", + "secondary", + "tertiary", + "trunk" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "road_major_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 2 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-max-width": 6, + "text-size": { + "stops": [ + [ + 6, + 12 + ], + [ + 12, + 16 + ] + ] + } + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "type", + "town", + "village", + "hamlet", + "suburb", + "neighbourhood", + "island" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 12 + ], + [ + 8, + 16 + ] + ] + } + }, + "maxzoom": 16, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "type", + "city" + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-max-width": 10, + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 8, + 22 + ] + ] + } + }, + "maxzoom": 12, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label", + "paint": { + "text-color": "#666", + "text-halo-color": "rgba(255,255,255,0.75)", + "text-halo-width": 1, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "id": "contour-line", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "!in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.15 + ], + [ + 12, + 0.3 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.5 + ], + [ + 16, + 0.8 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 1 + ], + [ + 16, + 1.6 + ] + ] + } + }, + "interactive": true + }, + { + "id": "contour-line-index", + "type": "line", + "source": "mapbox", + "source-layer": "contour", + "minzoom": 11, + "filter": [ + "in", + "index", + 10, + 5 + ], + "layout": {}, + "paint": { + "line-opacity": { + "base": 1, + "stops": [ + [ + 11, + 0.25 + ], + [ + 12, + 0.5 + ] + ] + }, + "line-color": "hsl(100, 100%, 20%)", + "line-width": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + }, + "line-offset": { + "base": 1, + "stops": [ + [ + 13, + 0.6 + ], + [ + 16, + 1.2 + ] + ] + } + }, + "interactive": true + } + ] +}