govuk_publishing_components 71.2.0 → 71.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/config/govuk_publishing_components_manifest.js +6 -0
- data/app/assets/javascripts/govuk_publishing_components/all_components.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/map/defra-map.js +16 -0
- data/app/assets/javascripts/govuk_publishing_components/components/map/im-maplibre-worker.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/components/map/map-styles.js +3 -0
- data/app/assets/javascripts/govuk_publishing_components/components/map/map-test.geojson +49 -0
- data/app/assets/javascripts/govuk_publishing_components/components/map.js +215 -0
- data/app/assets/stylesheets/govuk_publishing_components/all-components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_map.scss +53 -0
- data/app/views/govuk_publishing_components/components/_map.html.erb +82 -0
- data/app/views/govuk_publishing_components/components/docs/map.yml +110 -0
- data/lib/govuk_publishing_components/app_helpers/csp_helper.rb +11 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -0
- data/node_modules/axe-core/axe.js +481 -345
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/package.json +3 -3
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +10 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bfe43be27170fe60dcbb6eee6f7063152db60bd5fbebf670182f497dae01985d
|
|
4
|
+
data.tar.gz: 5635998491c8f544d4d59964b16b499547e5284b29c8a79b5380816bea8e2693
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 898d9ea39ef9c3bc06ba7cfa41b069e5d98bf7493d8acf4ffd63ec35fc17195cd7650aa36a513cadc4d125060d1c090b226c7974d02716c234d2bc345439c55b
|
|
7
|
+
data.tar.gz: 19866a34c68455e820277858aa176bb4ec0cdc433fd0dcbc471617042b6e8bc947c7d5c45f85d4aad7252a07a0e97cdeb4381683c469fb3a4ead050495a545a8
|
|
@@ -10,3 +10,9 @@
|
|
|
10
10
|
// Pre-compile these specific files
|
|
11
11
|
//= link govuk_publishing_components/vendor/lux/lux-reporter.js
|
|
12
12
|
//= link govuk_publishing_components/vendor/lux/lux-measurer.js
|
|
13
|
+
|
|
14
|
+
//= link govuk_publishing_components/components/map.js
|
|
15
|
+
//= link govuk_publishing_components/components/map/defra-map.js
|
|
16
|
+
//= link govuk_publishing_components/components/map/im-maplibre-worker.js
|
|
17
|
+
//= link govuk_publishing_components/components/map/map-styles.js
|
|
18
|
+
//= link govuk_publishing_components/components/map/map-test.geojson
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* this is a separate file so we can exclude it from test coverage in nycrc */
|
|
2
|
+
|
|
3
|
+
//= require @defra/interactive-map/dist/umd/index.js
|
|
4
|
+
//= require @defra/interactive-map/dist/umd/im-core.js
|
|
5
|
+
|
|
6
|
+
//= require @defra/interactive-map/providers/maplibre/dist/umd/index.js
|
|
7
|
+
//= require @defra/interactive-map/providers/maplibre/dist/umd/im-maplibre-framework.js
|
|
8
|
+
//= require @defra/interactive-map/providers/maplibre/dist/umd/im-maplibre-provider.js
|
|
9
|
+
|
|
10
|
+
//= require @defra/interactive-map/plugins/interact/dist/umd/index.js
|
|
11
|
+
//= require @defra/interactive-map/plugins/interact/dist/umd/im-interact-plugin.js
|
|
12
|
+
|
|
13
|
+
//= require @defra/interactive-map/plugins/datasets/dist/umd/index.js
|
|
14
|
+
//= require @defra/interactive-map/plugins/datasets/dist/umd/im-datasets-ml-adapter.js
|
|
15
|
+
//= require @defra/interactive-map/plugins/datasets/dist/umd/im-datasets-ol-adapter.js
|
|
16
|
+
//= require @defra/interactive-map/plugins/datasets/dist/umd/im-datasets-plugin.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//= require @defra/interactive-map/providers/maplibre/dist/umd/im-maplibre-worker.js
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* local copy of https://tiles.openfreemap.org/styles/liberty */
|
|
2
|
+
window.GOVUK = window.GOVUK || {}
|
|
3
|
+
window.GOVUK.mapComponentStyles = { version: 8, metadata: {}, sources: { ne2_shaded: { maxzoom: 6, tileSize: 256, tiles: ['https://tiles.openfreemap.org/natural_earth/ne2sr/{z}/{x}/{y}.png'], type: 'raster' }, openmaptiles: { type: 'vector', url: 'https://tiles.openfreemap.org/planet' } }, sprite: 'https://tiles.openfreemap.org/sprites/ofm_f384/ofm', glyphs: 'https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf', layers: [{ id: 'background', type: 'background', paint: { 'background-color': '#FEF8F5' } }, { id: 'landcover-glacier', type: 'fill', source: 'openmaptiles', 'source-layer': 'landcover', filter: ['==', ['get', 'subclass'], 'glacier'], paint: { 'fill-color': '#FFFFFF', 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 0, 0.9, 10, 0.3] } }, { id: 'landuse-residential', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['match', ['get', 'class'], ['neighbourhood', 'residential'], true, false], paint: { 'fill-color': ['interpolate', ['linear'], ['zoom'], 12, 'rgba(243, 243, 243, 0.4)', 16, 'rgba(243, 243, 243, 0.2)'] } }, { id: 'landuse-suburb', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', maxzoom: 10, filter: ['==', ['get', 'class'], 'suburb'], paint: { 'fill-color': ['interpolate', ['linear'], ['zoom'], 8, 'rgba(243, 243, 243, 0.4)', 10, 'rgba(243, 243, 243, 0)'] } }, { id: 'landuse-commercial', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['all', ['match', ['geometry-type'], ['MultiPolygon', 'Polygon'], true, false], ['==', ['get', 'class'], 'commercial']], layout: { visibility: 'none' }, paint: { 'fill-color': 'rgba(244, 215, 215, 0.23)' } }, { id: 'landuse-industrial', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['all', ['match', ['geometry-type'], ['MultiPolygon', 'Polygon'], true, false], ['match', ['get', 'class'], ['dam', 'garages', 'industrial'], true, false]], layout: { visibility: 'none' }, paint: { 'fill-color': 'rgba(255, 248, 204, 0.34)' } }, { id: 'landuse-cemetery', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['==', ['get', 'class'], 'cemetery'], paint: { 'fill-color': '#CFE4DC' } }, { id: 'landuse-hospital', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['==', ['get', 'class'], 'hospital'], layout: { visibility: 'none' }, paint: { 'fill-color': '#F4D7E5' } }, { id: 'landuse-school', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['==', ['get', 'class'], 'school'], layout: { visibility: 'none' }, paint: { 'fill-color': '#DDD6EC' } }, { id: 'landuse-railway', type: 'fill', source: 'openmaptiles', 'source-layer': 'landuse', filter: ['==', ['get', 'class'], 'railway'], paint: { 'fill-color': 'rgba(243, 243, 243, 0.4)' } }, { id: 'park', type: 'fill', source: 'openmaptiles', 'source-layer': 'park', filter: ['match', ['geometry-type'], ['MultiPolygon', 'Polygon'], true, false], paint: { 'fill-color': '#CFE4DC', 'fill-opacity': ['interpolate', ['exponential', 1.8], ['zoom'], 9, 0.5, 12, 0.2] } }, { id: 'landcover-wood', type: 'fill', source: 'openmaptiles', 'source-layer': 'landcover', filter: ['==', ['get', 'class'], 'wood'], paint: { 'fill-antialias': ['step', ['zoom'], false, 9, true], 'fill-color': '#0F7A52', 'fill-opacity': 0.1, 'fill-outline-color': 'rgba(11, 12, 12, 0.03)' } }, { id: 'landcover-grass', type: 'fill', source: 'openmaptiles', 'source-layer': 'landcover', filter: ['==', ['get', 'class'], 'grass'], paint: { 'fill-color': '#CFE4DC', 'fill-opacity': 1 } }, { id: 'landcover-grass-park', type: 'fill', source: 'openmaptiles', 'source-layer': 'park', filter: ['==', ['get', 'class'], 'public_park'], paint: { 'fill-color': '#CFE4DC', 'fill-opacity': 0.8 } }, { id: 'waterway_tunnel', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', minzoom: 14, filter: ['all', ['match', ['get', 'class'], ['canal', 'river', 'stream'], true, false], ['==', ['get', 'brunnel'], 'tunnel']], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-dasharray': [2, 4], 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 13, 0.5, 20, 6] } }, { id: 'waterway-other', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', filter: ['all', ['match', ['get', 'class'], ['canal', 'river', 'stream'], false, true], ['==', ['get', 'intermittent'], 0]], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 13, 0.5, 20, 2] } }, { id: 'waterway-other-intermittent', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', filter: ['all', ['match', ['get', 'class'], ['canal', 'river', 'stream'], false, true], ['==', ['get', 'intermittent'], 1]], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-dasharray': [4, 3], 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 13, 0.5, 20, 2] } }, { id: 'waterway-stream-canal', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', filter: ['all', ['match', ['get', 'class'], ['canal', 'stream'], true, false], ['!=', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'intermittent'], 0]], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 13, 0.5, 20, 6] } }, { id: 'waterway-stream-canal-intermittent', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', filter: ['all', ['match', ['get', 'class'], ['canal', 'stream'], true, false], ['!=', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'intermittent'], 1]], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-dasharray': [4, 3], 'line-width': ['interpolate', ['exponential', 1.3], ['zoom'], 13, 0.5, 20, 6] } }, { id: 'waterway-river', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', filter: ['all', ['==', ['get', 'class'], 'river'], ['!=', ['get', 'brunnel'], 'tunnel'], ['!=', ['get', 'intermittent'], 1]], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 10, 0.8, 20, 6] } }, { id: 'waterway-river-intermittent', type: 'line', source: 'openmaptiles', 'source-layer': 'waterway', filter: ['all', ['==', ['get', 'class'], 'river'], ['!=', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'intermittent'], 1]], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-dasharray': [3, 2.5], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 10, 0.8, 20, 6] } }, { id: 'water', type: 'fill', source: 'openmaptiles', 'source-layer': 'water', filter: ['all', ['!=', ['get', 'intermittent'], 1], ['!=', ['get', 'brunnel'], 'tunnel']], paint: { 'fill-color': '#8EB8DC' } }, { id: 'water-intermittent', type: 'fill', source: 'openmaptiles', 'source-layer': 'water', filter: ['==', ['get', 'intermittent'], 1], paint: { 'fill-color': '#D2E2F1', 'fill-opacity': 0.7 } }, { id: 'landcover-ice-shelf', type: 'fill', source: 'openmaptiles', 'source-layer': 'landcover', filter: ['==', ['get', 'subclass'], 'ice_shelf'], paint: { 'fill-color': '#FFFFFF', 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 0, 0.9, 10, 0.3] } }, { id: 'landcover-sand', type: 'fill', source: 'openmaptiles', 'source-layer': 'landcover', filter: ['==', ['get', 'class'], 'sand'], paint: { 'fill-color': '#FFF8CC', 'fill-opacity': 1 } }, { id: 'building', type: 'fill', source: 'openmaptiles', 'source-layer': 'building', paint: { 'fill-antialias': true, 'fill-color': ['interpolate', ['linear'], ['zoom'], 15.5, '#FEF8F5', 16, '#CECECE'] } }, { id: 'building-top', type: 'fill', source: 'openmaptiles', 'source-layer': 'building', layout: { visibility: 'visible' }, paint: { 'fill-color': '#FEF8F5', 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 13, 0, 16, 1], 'fill-outline-color': '#CECECE', 'fill-translate': ['interpolate', ['linear'], ['zoom'], 14, ['literal', [0, 0]], 16, ['literal', [-2, -2]]] } }, { id: 'tunnel-service-track-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['service', 'track'], true, false]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#CECECE', 'line-dasharray': [0.5, 0.25], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15, 1, 16, 4, 20, 11] } }, { id: 'tunnel-motorway-link-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'motorway'], ['==', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#B39477', 'line-dasharray': [0.5, 0.25], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12, 1, 13, 3, 14, 4, 20, 15] } }, { id: 'tunnel-minor-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'minor']], layout: { 'line-join': 'round' }, paint: { 'line-color': '#CECECE', 'line-dasharray': [0.5, 0.25], '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] } }, { id: 'tunnel-link-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], ['==', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FABB9C', 'line-dasharray': [0.5, 0.25], 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12, 1, 13, 3, 14, 4, 20, 15] } }, { id: 'tunnel-secondary-tertiary-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['secondary', 'tertiary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FABB9C', 'line-dasharray': [0.5, 0.25], 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 8, 1.5, 20, 17] } }, { id: 'tunnel-trunk-primary-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['primary', 'trunk'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FABB9C', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 5, 0.4, 6, 0.6, 7, 1.5, 20, 22] } }, { id: 'tunnel-motorway-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'motorway'], ['!=', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FABB9C', 'line-dasharray': [0.5, 0.25], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 5, 0.4, 6, 0.6, 7, 1.5, 20, 22] } }, { id: 'tunnel-path', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'path']], paint: { 'line-color': '#CCB8A5', 'line-dasharray': [1.5, 0.75], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15, 1.2, 20, 4] } }, { id: 'tunnel-motorway-link', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'motorway'], ['==', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FABB9C', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { id: 'tunnel-service-track', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['service', 'track'], true, false]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FFFFFF', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15.5, 0, 16, 2, 20, 7.5] } }, { id: 'tunnel-link', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], ['==', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FFF8CC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { id: 'tunnel-minor', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'minor']], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FFFFFF', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 13.5, 0, 14, 2.5, 20, 11.5] } }, { id: 'tunnel-secondary-tertiary', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['secondary', 'tertiary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FFF8CC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 6.5, 0, 7, 0.5, 20, 10] } }, { id: 'tunnel-trunk-primary', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['primary', 'trunk'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FFF8CC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 6.5, 0, 7, 0.5, 20, 18] } }, { id: 'tunnel-motorway', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'motorway'], ['!=', ['get', 'ramp'], 1]], layout: { 'line-join': 'round' }, paint: { 'line-color': '#FFF8CC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 6.5, 0, 7, 0.5, 20, 18] } }, { id: 'tunnel-railway', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'tunnel'], ['==', ['get', 'class'], 'rail']], paint: { 'line-color': '#CECECE', 'line-dasharray': [2, 2], 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14, 0.4, 15, 0.75, 20, 2] } }, { id: 'ferry', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['match', ['get', 'class'], ['ferry'], true, false], layout: { 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#8EB8DC', 'line-dasharray': [2, 2], 'line-width': 1.1 } }, { id: 'aeroway-taxiway-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'aeroway', minzoom: 12, filter: ['match', ['get', 'class'], ['taxiway'], true, false], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#858686', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.5], ['zoom'], 11, 2, 17, 12] } }, { id: 'aeroway-runway-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'aeroway', minzoom: 12, filter: ['match', ['get', 'class'], ['runway'], true, false], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#858686', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.5], ['zoom'], 11, 5, 17, 55] } }, { id: 'aeroway-area', type: 'fill', source: 'openmaptiles', 'source-layer': 'aeroway', minzoom: 4, filter: ['all', ['match', ['geometry-type'], ['MultiPolygon', 'Polygon'], true, false], ['match', ['get', 'class'], ['runway', 'taxiway'], true, false]], layout: { visibility: 'none' }, paint: { 'fill-color': '#FFFFFF', 'fill-opacity': ['interpolate', ['linear'], ['zoom'], 13, 0, 14, 1] } }, { id: 'aeroway-taxiway', type: 'line', source: 'openmaptiles', 'source-layer': 'aeroway', minzoom: 4, filter: ['all', ['match', ['get', 'class'], ['taxiway'], true, false], ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#FFFFFF', 'line-opacity': ['interpolate', ['linear'], ['zoom'], 11, 0, 12, 1], 'line-width': ['interpolate', ['exponential', 1.5], ['zoom'], 11, 1, 17, 10] } }, { id: 'aeroway-runway', type: 'line', source: 'openmaptiles', 'source-layer': 'aeroway', minzoom: 4, filter: ['all', ['match', ['get', 'class'], ['runway'], true, false], ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#FFFFFF', 'line-opacity': ['interpolate', ['linear'], ['zoom'], 11, 0, 12, 1], 'line-width': ['interpolate', ['exponential', 1.5], ['zoom'], 11, 4, 17, 50] } }, { id: 'road_area_pier', type: 'fill', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['MultiPolygon', 'Polygon'], true, false], ['==', ['get', 'class'], 'pier']], layout: { visibility: 'none' }, paint: { 'fill-antialias': true, 'fill-color': '#FEF8F5' } }, { id: 'road_pier', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'class'], ['pier'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#FEF8F5', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15, 1, 17, 4] } }, { id: 'highway-area', type: 'fill', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['MultiPolygon', 'Polygon'], true, false], ['match', ['get', 'class'], ['pier'], false, true]], paint: { 'fill-antialias': false, 'fill-color': 'rgba(243, 243, 243, 0.56)', 'fill-opacity': 0.9, 'fill-outline-color': '#CECECE' } }, { id: 'highway-motorway-link-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'motorway'], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#FABB9C', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12, 1, 13, 3, 14, 4, 20, 15] } }, { id: 'highway-link-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 13, filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12, 1, 13, 3, 14, 4, 20, 15] } }, { id: 'highway-minor-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['!=', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['minor', 'service', 'track'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#CECECE', 'line-opacity': 1, 'line-width': { base: 1.2, stops: [[10, 2.2], [13, 3.4], [16, 8], [20, 24]] } }, minzoom: 10 }, { id: 'highway-secondary-tertiary-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['secondary', 'tertiary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.3, stops: [[10, 3], [20, 23]] } }, minzoom: 8 }, { id: 'highway-primary-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 8, filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['primary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.3, stops: [[10, 3], [20, 23]] } } }, { id: 'highway-trunk-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 8, filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['trunk'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.3, stops: [[10, 3], [20, 23]] } } }, { id: 'highway-motorway-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 6, filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'motorway'], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-opacity': ['interpolate', ['linear'], ['zoom'], 4, 0, 5, 1], 'line-width': { base: 1.4, stops: [[5.8, 0], [6, 3], [20, 40]] } } }, { id: 'highway-path', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'path']], layout: { visibility: 'none' }, paint: { 'line-color': '#CCB8A5', 'line-dasharray': [1.5, 0.75], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15, 1.2, 20, 4] } }, { id: 'highway-motorway-link', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 12, filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'motorway'], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { id: 'highway-link', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 13, filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] } }, { id: 'highway-minor', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['!=', ['get', 'brunnel'], 'tunnel'], ['match', ['get', 'class'], ['minor', 'service', 'track'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFFFFF', 'line-opacity': 1, 'line-width': { base: 1.2, stops: [[10, 1.2], [13, 2.2], [16, 6], [20, 20]] } }, minzoom: 10 }, { id: 'highway-secondary-tertiary', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['secondary', 'tertiary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': { base: 1.3, stops: [[10, 2], [20, 20]] } }, minzoom: 8 }, { id: 'highway-primary', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['primary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': { base: 1.3, stops: [[10, 2], [20, 20]] } }, minzoom: 8 }, { id: 'highway-trunk', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['match', ['get', 'class'], ['trunk'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': { base: 1.3, stops: [[10, 2], [20, 20]] } }, minzoom: 8 }, { id: 'highway-motorway', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 6, filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'motorway'], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.4, stops: [[4, 2], [6, 1.3], [20, 30]] } } }, { id: 'railway-transit', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'class'], 'transit'], ['match', ['get', 'brunnel'], ['tunnel'], false, true]], layout: { visibility: 'visible' }, paint: { 'line-color': 'rgba(206, 206, 206, 0.77)', 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14, 0.4, 20, 1] } }, { id: 'railway-transit-hatching', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'class'], 'transit'], ['match', ['get', 'brunnel'], ['tunnel'], false, true]], layout: { visibility: 'visible' }, paint: { 'line-color': 'rgba(206, 206, 206, 0.68)', 'line-dasharray': [0.2, 8], 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14.5, 0, 15, 2, 20, 6] } }, { id: 'railway-service', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'class'], 'rail'], ['has', 'service']], layout: { visibility: 'visible' }, paint: { 'line-color': 'rgba(206, 206, 206, 0.77)', 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14, 0.4, 20, 1] } }, { id: 'railway-service-hatching', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'class'], 'rail'], ['has', 'service']], layout: { visibility: 'visible' }, paint: { 'line-color': 'rgba(206, 206, 206, 0.68)', 'line-dasharray': [0.2, 8], 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14.5, 0, 15, 2, 20, 6] } }, { id: 'railway', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['!', ['has', 'service']], ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'rail']], layout: { visibility: 'visible' }, paint: { 'line-color': '#CECECE', 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14, 0.4, 15, 0.75, 20, 2] } }, { id: 'railway-hatching', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['!', ['has', 'service']], ['match', ['get', 'brunnel'], ['bridge', 'tunnel'], false, true], ['==', ['get', 'class'], 'rail']], layout: { visibility: 'visible' }, paint: { 'line-color': '#CECECE', 'line-dasharray': [0.2, 8], 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14.5, 0, 15, 3, 20, 8] } }, { id: 'bridge-motorway-link-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'motorway'], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'none' }, paint: { 'line-color': '#FABB9C', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12, 1, 13, 3, 14, 4, 20, 15] } }, { id: 'bridge-link-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-opacity': 1, 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12, 1, 13, 3, 14, 4, 20, 15] }, minzoom: 13 }, { id: 'bridge-secondary-tertiary-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['secondary', 'tertiary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.3, stops: [[10, 3], [20, 23]] } }, minzoom: 8 }, { id: 'bridge-trunk-primary-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['primary', 'trunk'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.3, stops: [[10, 3], [20, 23]] } }, minzoom: 8 }, { id: 'bridge-motorway-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'motorway'], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'butt', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-opacity': ['interpolate', ['linear'], ['zoom'], 4, 0, 5, 1], 'line-width': { base: 1.4, stops: [[5.8, 0], [6, 3], [20, 40]] } }, minzoom: 6 }, { id: 'bridge-minor-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['minor', 'service', 'track'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#CECECE', 'line-opacity': 1, 'line-width': { base: 1.2, stops: [[10, 2.2], [13, 3.4], [16, 8], [20, 24]] } }, minzoom: 10 }, { id: 'bridge-path-casing', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'path']], paint: { 'line-color': '#FEF8F5', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15, 1.2, 20, 18] } }, { id: 'bridge-path', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'path']], paint: { 'line-color': '#CCB8A5', 'line-dasharray': [1.5, 0.75], 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 15, 1.2, 20, 4] } }, { id: 'bridge-motorway-link', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'motorway'], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] }, minzoom: 12 }, { id: 'bridge-link', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], ['==', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': ['interpolate', ['exponential', 1.2], ['zoom'], 12.5, 0, 13, 1.5, 14, 2.5, 20, 11.5] }, minzoom: 13 }, { id: 'bridge-minor', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['minor', 'service', 'track'], true, false]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFFFFF', 'line-opacity': 1, 'line-width': { base: 1.2, stops: [[10, 1.2], [13, 2.2], [16, 6], [20, 20]] } }, minzoom: 10 }, { id: 'bridge-secondary-tertiary', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['secondary', 'tertiary'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': { base: 1.3, stops: [[10, 2], [20, 20]] } }, minzoom: 8 }, { id: 'bridge-trunk-primary', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['match', ['get', 'class'], ['primary', 'trunk'], true, false], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FFF8CC', 'line-width': { base: 1.3, stops: [[10, 2], [20, 20]] } }, minzoom: 8 }, { id: 'bridge-motorway', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'motorway'], ['!=', ['get', 'ramp'], 1]], layout: { 'line-cap': 'round', 'line-join': 'round', visibility: 'visible' }, paint: { 'line-color': '#FABB9C', 'line-width': { base: 1.4, stops: [[4, 2], [6, 1.3], [20, 30]] } }, minzoom: 6 }, { id: 'bridge-railway', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'rail']], paint: { 'line-color': '#CECECE', 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14, 0.4, 15, 0.75, 20, 2] } }, { id: 'bridge-railway-hatching', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', filter: ['all', ['==', ['get', 'brunnel'], 'bridge'], ['==', ['get', 'class'], 'rail']], paint: { 'line-color': '#CECECE', 'line-dasharray': [0.2, 8], 'line-width': ['interpolate', ['exponential', 1.4], ['zoom'], 14.5, 0, 15, 3, 20, 8] } }, { id: 'cablecar', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 13, filter: ['==', ['get', 'subclass'], 'cable_car'], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#CECECE', 'line-width': ['interpolate', ['linear'], ['zoom'], 11, 1, 19, 2.5] } }, { id: 'cablecar-dash', type: 'line', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 13, filter: ['==', ['get', 'subclass'], 'cable_car'], layout: { 'line-cap': 'round', visibility: 'none' }, paint: { 'line-color': '#CECECE', 'line-dasharray': [2, 3], 'line-width': ['interpolate', ['linear'], ['zoom'], 11, 3, 19, 5.5] } }, { id: 'boundary_3', type: 'line', source: 'openmaptiles', 'source-layer': 'boundary', minzoom: 5, filter: ['all', ['>=', ['get', 'admin_level'], 3], ['<=', ['get', 'admin_level'], 6], ['!=', ['get', 'maritime'], 1], ['!=', ['get', 'disputed'], 1], ['!', ['has', 'claimed_by']]], paint: { 'line-color': '#CECECE', 'line-dasharray': [1, 1], 'line-width': ['interpolate', ['linear', 1], ['zoom'], 7, 1, 11, 2] } }, { id: 'boundary_2', type: 'line', source: 'openmaptiles', 'source-layer': 'boundary', filter: ['all', ['==', ['get', 'admin_level'], 2], ['!=', ['get', 'maritime'], 1], ['!=', ['get', 'disputed'], 1], ['!', ['has', 'claimed_by']]], layout: { 'line-cap': 'round', 'line-join': 'round' }, paint: { 'line-color': '#858686', 'line-opacity': ['interpolate', ['linear'], ['zoom'], 0, 0.4, 4, 1], 'line-width': ['interpolate', ['linear'], ['zoom'], 3, 1, 5, 1.2, 12, 3] } }, { id: 'boundary_disputed', type: 'line', source: 'openmaptiles', 'source-layer': 'boundary', filter: ['all', ['!=', ['get', 'maritime'], 1], ['==', ['get', 'disputed'], 1]], paint: { 'line-color': '#858686', 'line-dasharray': [1, 2], 'line-width': ['interpolate', ['linear'], ['zoom'], 3, 1, 5, 1.2, 12, 3] } }, { id: 'road_oneway', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 15, filter: ['all', ['==', ['get', 'oneway'], 1], ['match', ['get', 'class'], ['minor', 'motorway', 'primary', 'secondary', 'service', 'tertiary', 'trunk'], true, false]], layout: { 'icon-image': 'oneway', 'icon-padding': 2, 'icon-rotate': 90, 'icon-rotation-alignment': 'map', 'icon-size': ['interpolate', ['linear'], ['zoom'], 15, 0.5, 19, 1], 'symbol-placement': 'line', 'symbol-spacing': 75, visibility: 'none' }, paint: { 'icon-opacity': 0.5 } }, { id: 'road_oneway_opposite', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation', minzoom: 15, filter: ['all', ['==', ['get', 'oneway'], -1], ['match', ['get', 'class'], ['minor', 'motorway', 'primary', 'secondary', 'service', 'tertiary', 'trunk'], true, false]], layout: { 'icon-image': 'oneway', 'icon-padding': 2, 'icon-rotate': -90, 'icon-rotation-alignment': 'map', 'icon-size': ['interpolate', ['linear'], ['zoom'], 15, 0.5, 19, 1], 'symbol-placement': 'line', 'symbol-spacing': 75, visibility: 'none' }, paint: { 'icon-opacity': 0.5 } }, { id: 'waterway_line_label', type: 'symbol', source: 'openmaptiles', 'source-layer': 'waterway', minzoom: 10, filter: ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], layout: { 'symbol-placement': 'line', 'symbol-spacing': 350, 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], ' ', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-letter-spacing': 0.2, 'text-max-width': 5, 'text-size': 14, visibility: 'visible' }, paint: { 'text-color': '#484949', 'text-halo-color': 'rgba(255, 255, 255, 0)', 'text-halo-width': 1.5 } }, { id: 'water_name_point_label', type: 'symbol', source: 'openmaptiles', 'source-layer': 'water_name', filter: ['match', ['geometry-type'], ['MultiPoint', 'Point'], true, false], layout: { 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-letter-spacing': 0.2, 'text-max-width': 5, 'text-size': ['interpolate', ['linear'], ['zoom'], 0, 10, 8, 14], visibility: 'visible' }, paint: { 'text-color': '#484949', 'text-halo-color': 'rgba(255, 255, 255, 0.7)', 'text-halo-width': 1.5 } }, { id: 'water_name_line_label', type: 'symbol', source: 'openmaptiles', 'source-layer': 'water_name', filter: ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], layout: { 'symbol-placement': 'line', 'symbol-spacing': 350, 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], ' ', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-letter-spacing': 0.2, 'text-max-width': 5, 'text-size': 14 }, paint: { 'text-color': '#484949', 'text-halo-color': 'rgba(255, 255, 255, 0)', 'text-halo-width': 1.5 } }, { id: 'poi_r20', type: 'symbol', source: 'openmaptiles', 'source-layer': 'poi', minzoom: 17, filter: ['all', ['match', ['geometry-type'], ['MultiPoint', 'Point'], true, false], ['>=', ['get', 'rank'], 20]], layout: { 'icon-image': ['match', ['get', 'subclass'], ['florist', 'furniture'], ['get', 'subclass'], ['get', 'class']], 'text-anchor': 'top', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-max-width': 9, 'text-offset': [0, 0.6], 'text-size': 12, visibility: 'none' }, paint: { 'text-color': '#484949', 'text-halo-blur': 0.5, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'poi_r7', type: 'symbol', source: 'openmaptiles', 'source-layer': 'poi', minzoom: 16, filter: ['all', ['match', ['geometry-type'], ['MultiPoint', 'Point'], true, false], ['>=', ['get', 'rank'], 7], ['<', ['get', 'rank'], 20]], layout: { 'icon-image': ['match', ['get', 'subclass'], ['florist', 'furniture'], ['get', 'subclass'], ['get', 'class']], 'text-anchor': 'top', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-max-width': 9, 'text-offset': [0, 0.6], 'text-size': 12, visibility: 'none' }, paint: { 'text-color': '#484949', 'text-halo-blur': 0.5, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'poi_r1', type: 'symbol', source: 'openmaptiles', 'source-layer': 'poi', minzoom: 15, filter: ['all', ['match', ['geometry-type'], ['MultiPoint', 'Point'], true, false], ['>=', ['get', 'rank'], 1], ['<', ['get', 'rank'], 7]], layout: { 'icon-image': ['match', ['get', 'subclass'], ['florist', 'furniture'], ['get', 'subclass'], ['get', 'class']], 'text-anchor': 'top', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-max-width': 9, 'text-offset': [0, 0.6], 'text-size': 12, visibility: 'none' }, paint: { 'text-color': '#484949', 'text-halo-blur': 0.5, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'poi_transit', type: 'symbol', source: 'openmaptiles', 'source-layer': 'poi', filter: ['match', ['get', 'class'], ['airport', 'bus', 'rail'], true, false], layout: { 'icon-image': ['to-string', ['get', 'class']], 'icon-size': 0.7, 'text-anchor': 'left', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-max-width': 9, 'text-offset': [0.9, 0], 'text-size': 12, visibility: 'visible' }, paint: { 'text-color': '#16548A', 'text-halo-blur': 0.5, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'highway-name-path', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation_name', minzoom: 15.5, filter: ['==', ['get', 'class'], 'path'], layout: { 'symbol-placement': 'line', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], ' ', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-rotation-alignment': 'map', 'text-size': ['interpolate', ['linear'], ['zoom'], 13, 12, 14, 13], visibility: 'none' }, paint: { 'text-color': '#B39477', 'text-halo-color': '#FEF8F5', 'text-halo-width': 0.5 } }, { id: 'highway-name-minor', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation_name', minzoom: 10, filter: ['all', ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'class'], ['minor', 'service', 'track'], true, false]], layout: { 'symbol-placement': 'line', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], ' ', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Regular'], 'text-rotation-alignment': 'map', 'text-size': ['interpolate', ['linear'], ['zoom'], 10, 11, 13, 12], 'symbol-spacing': 350, 'text-max-angle': 30, 'text-pitch-alignment': 'viewport', visibility: 'visible' }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 0, 'text-halo-width': 2, 'text-halo-color': '#FFFFFF', 'text-translate': [0, 0] } }, { id: 'highway-name-major', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation_name', minzoom: 10, filter: ['match', ['get', 'class'], ['primary', 'secondary', 'tertiary', 'trunk'], true, false], layout: { 'symbol-placement': 'line', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], ' ', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Regular'], 'text-rotation-alignment': 'map', 'text-size': ['interpolate', ['linear'], ['zoom'], 10, 11, 12, 12, 14, 13], 'symbol-spacing': 350, 'text-max-angle': 30, 'text-pitch-alignment': 'viewport', visibility: 'visible' }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 0, 'text-halo-width': 2, 'text-halo-color': '#FFFFFF', 'text-translate': [0, 0] } }, { id: 'highway-shield-non-us', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation_name', minzoom: 6, filter: ['all', ['==', ['get', 'class'], 'motorway'], ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false]], layout: { 'icon-image': ['concat', 'road_', ['get', 'ref_length']], 'icon-rotation-alignment': 'viewport', 'symbol-placement': 'line', 'symbol-spacing': 350, 'text-field': ['to-string', ['get', 'ref']], 'text-font': ['GDS Transport Bold', 'Open Sans Semibold'], 'text-rotation-alignment': 'viewport', 'text-size': 12, visibility: 'visible', 'icon-text-fit': 'both', 'symbol-height-anchor': 'ground', 'icon-text-fit-padding': [1, 2, 5, 2] }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 0, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1, 'text-translate': [0, 2] } }, { id: 'highway-shield-us-interstate', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation_name', minzoom: 7, filter: ['all', ['<=', ['get', 'ref_length'], 6], ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'network'], ['us-interstate'], true, false]], layout: { 'icon-image': ['concat', ['get', 'network'], '_', ['get', 'ref_length']], 'icon-rotation-alignment': 'viewport', 'icon-size': 1, 'symbol-placement': ['step', ['zoom'], 'point', 7, 'line', 8, 'line'], 'symbol-spacing': 200, 'text-field': ['to-string', ['get', 'ref']], 'text-font': ['GDS Transport'], 'text-rotation-alignment': 'viewport', 'text-size': 10, visibility: 'none' } }, { id: 'road_shield_us', type: 'symbol', source: 'openmaptiles', 'source-layer': 'transportation_name', minzoom: 9, filter: ['all', ['<=', ['get', 'ref_length'], 6], ['match', ['geometry-type'], ['LineString', 'MultiLineString'], true, false], ['match', ['get', 'network'], ['us-highway', 'us-state'], true, false]], layout: { 'icon-image': ['concat', ['get', 'network'], '_', ['get', 'ref_length']], 'icon-rotation-alignment': 'viewport', 'icon-size': 1, 'symbol-placement': ['step', ['zoom'], 'point', 11, 'line'], 'symbol-spacing': 200, 'text-field': ['to-string', ['get', 'ref']], 'text-font': ['GDS Transport'], 'text-rotation-alignment': 'viewport', 'text-size': 10, visibility: 'none' } }, { id: 'airport', type: 'symbol', source: 'openmaptiles', 'source-layer': 'aerodrome_label', minzoom: 10, filter: ['all', ['has', 'iata']], layout: { 'icon-image': 'airport_11', 'icon-size': 1, 'text-anchor': 'top', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-max-width': 9, 'text-offset': [0, 0.6], 'text-optional': true, 'text-padding': 2, 'text-size': 12 }, paint: { 'text-color': '#484949', 'text-halo-blur': 0.5, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_other', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 8, filter: ['match', ['get', 'class'], ['city', 'continent', 'country', 'state', 'town', 'village'], false, true], layout: { 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-letter-spacing': 0.1, 'text-max-width': 9, 'text-size': ['interpolate', ['linear'], ['zoom'], 8, 10, 10, 11, 12, 12, 14, 13] }, paint: { 'text-color': '#484949', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_village', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 9, filter: ['==', ['get', 'class'], 'village'], layout: { 'icon-allow-overlap': true, 'icon-image': ['step', ['zoom'], 'circle_11_black', 10, ''], 'icon-optional': false, 'icon-size': 0.2, 'text-anchor': 'bottom', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Regular'], 'text-max-width': 8, 'text-size': ['interpolate', ['linear'], ['zoom'], 9, 11, 11, 12, 13, 14] }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_town', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 6, filter: ['==', ['get', 'class'], 'town'], layout: { 'icon-allow-overlap': true, 'icon-image': ['step', ['zoom'], 'circle_11_black', 10, ''], 'icon-optional': false, 'icon-size': 0.2, 'text-anchor': 'bottom', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Regular'], 'text-max-width': 8, 'text-size': ['interpolate', ['linear'], ['zoom'], 6, 11, 9, 12, 11, 14, 13, 16] }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_state', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 5, maxzoom: 8, filter: ['==', ['get', 'class'], 'state'], layout: { 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport'], 'text-letter-spacing': 0.2, 'text-max-width': 9, 'text-size': ['interpolate', ['linear'], ['zoom'], 5, 10, 8, 14] }, paint: { 'text-color': '#484949', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_city', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 3, filter: ['all', ['==', ['get', 'class'], 'city'], ['!=', ['get', 'capital'], 2]], layout: { 'icon-allow-overlap': true, 'icon-image': ['step', ['zoom'], 'circle_11_black', 9, ''], 'icon-optional': false, 'icon-size': 0.4, 'text-anchor': 'bottom', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Regular'], 'text-max-width': 8, 'text-offset': [0, -0.1], 'text-size': ['interpolate', ['linear'], ['zoom'], 3, 12, 6, 13, 9, 15, 11, 16, 13, 17] }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_city_capital', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 3, filter: ['all', ['==', ['get', 'class'], 'city'], ['==', ['get', 'capital'], 2]], layout: { 'icon-allow-overlap': true, 'icon-image': ['step', ['zoom'], 'circle_11_black', 9, ''], 'icon-optional': false, 'icon-size': 0.5, 'text-anchor': 'bottom', 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport Bold', 'Open Sans Semibold'], 'text-max-width': 8, 'text-offset': [0, -0.2], 'text-size': ['interpolate', ['linear'], ['zoom'], 3, 13, 6, 14, 9, 15, 11, 16, 13, 18] }, paint: { 'text-color': '#0B0C0C', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_country_3', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', minzoom: 2, maxzoom: 6, filter: ['all', ['==', ['get', 'class'], 'country'], ['>=', ['get', 'rank'], 3]], layout: { 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Semibold'], 'text-max-width': 6.25, 'text-size': { base: 1.4, stops: [[0, 10], [3, 12], [4, 14]] }, 'text-transform': 'uppercase', 'text-letter-spacing': 0.5 }, paint: { 'text-color': '#484949', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_country_2', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', maxzoom: 6, filter: ['all', ['==', ['get', 'class'], 'country'], ['==', ['get', 'rank'], 2]], layout: { 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Semibold'], 'text-max-width': 6.25, 'text-size': { base: 1.4, stops: [[0, 10], [3, 12], [4, 14]] }, 'text-transform': 'uppercase', 'text-letter-spacing': 0.5 }, paint: { 'text-color': '#484949', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }, { id: 'label_country_1', type: 'symbol', source: 'openmaptiles', 'source-layer': 'place', maxzoom: 6, filter: ['all', ['==', ['get', 'class'], 'country'], ['==', ['get', 'rank'], 1]], layout: { 'text-field': ['case', ['has', 'name:nonlatin'], ['concat', ['get', 'name:latin'], '\n', ['get', 'name:nonlatin']], ['coalesce', ['get', 'name_en'], ['get', 'name']]], 'text-font': ['GDS Transport', 'Open Sans Semibold'], 'text-max-width': 6.25, 'text-size': { base: 1.4, stops: [[0, 10], [3, 12], [4, 14]] }, 'text-transform': 'uppercase', 'text-letter-spacing': 0.5 }, paint: { 'text-color': '#484949', 'text-halo-blur': 1, 'text-halo-color': '#FFFFFF', 'text-halo-width': 1 } }], id: 'colour' }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "FeatureCollection",
|
|
3
|
+
"features": [
|
|
4
|
+
{
|
|
5
|
+
"type": "Feature",
|
|
6
|
+
"properties": {
|
|
7
|
+
"description": "A large city.",
|
|
8
|
+
"address": "B1 1AA",
|
|
9
|
+
"name": "Birmingham",
|
|
10
|
+
"url": "https://www.gov.uk",
|
|
11
|
+
"email": "test@test.com"
|
|
12
|
+
},
|
|
13
|
+
"geometry": {
|
|
14
|
+
"coordinates": [
|
|
15
|
+
-1.89032729180704,
|
|
16
|
+
52.485470314900795
|
|
17
|
+
],
|
|
18
|
+
"type": "Point"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "Feature",
|
|
23
|
+
"properties": {
|
|
24
|
+
"name": "Coventry",
|
|
25
|
+
"description": "Another large city"
|
|
26
|
+
},
|
|
27
|
+
"geometry": {
|
|
28
|
+
"coordinates": [
|
|
29
|
+
-1.4915442661594511,
|
|
30
|
+
52.40292688379728
|
|
31
|
+
],
|
|
32
|
+
"type": "Point"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "Feature",
|
|
37
|
+
"properties": {
|
|
38
|
+
"name": "Wolverhampton"
|
|
39
|
+
},
|
|
40
|
+
"geometry": {
|
|
41
|
+
"coordinates": [
|
|
42
|
+
-2.127508995156802,
|
|
43
|
+
52.5862548496693
|
|
44
|
+
],
|
|
45
|
+
"type": "Point"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/* global defra */
|
|
2
|
+
/* istanbul ignore next */
|
|
3
|
+
window.GOVUK = window.GOVUK || {}
|
|
4
|
+
/* istanbul ignore next */
|
|
5
|
+
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
6
|
+
|
|
7
|
+
(function (Modules) {
|
|
8
|
+
class Map {
|
|
9
|
+
constructor ($module) {
|
|
10
|
+
this.$module = $module
|
|
11
|
+
this.map_element = this.$module.querySelector('.gem-c-map')
|
|
12
|
+
this.map_id = this.$module.getAttribute('id')
|
|
13
|
+
this.trackingEnabled = this.$module.getAttribute('data-tracking-enabled') === 'true'
|
|
14
|
+
this.headingLevel = parseInt(this.$module.getAttribute('data-heading-level')) || 2
|
|
15
|
+
const cspWorker = this.$module.getAttribute('data-csp-worker')
|
|
16
|
+
this.geoJson = this.$module.getAttribute('data-geojson')
|
|
17
|
+
this.trackingActive = false
|
|
18
|
+
this.panelId = 'the-panel'
|
|
19
|
+
|
|
20
|
+
if (this.geoJson) {
|
|
21
|
+
if (!this.geoJson.startsWith('/') && !this.geoJson.startsWith('data:')) {
|
|
22
|
+
console.error('Error: passed geoJSON must be valid and not be an external URL')
|
|
23
|
+
this.geoJson = false
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let datasetsPlugin = false
|
|
28
|
+
if (this.geoJson) {
|
|
29
|
+
datasetsPlugin = defra.datasetsPlugin({
|
|
30
|
+
datasets: [{
|
|
31
|
+
id: 'features',
|
|
32
|
+
geojson: this.geoJson,
|
|
33
|
+
generateIds: true,
|
|
34
|
+
showInMenu: false,
|
|
35
|
+
minZoom: 1,
|
|
36
|
+
maxZoom: 24, // these must exceed the values used by the map config
|
|
37
|
+
style: {
|
|
38
|
+
symbol: 'pin',
|
|
39
|
+
symbolBackgroundColor: '#ca3535',
|
|
40
|
+
symbolForegroundColor: '#ca3535'
|
|
41
|
+
}
|
|
42
|
+
}]
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
this.interactPlugin = defra.interactPlugin({
|
|
47
|
+
deselectOnClickOutside: true,
|
|
48
|
+
interactionModes: ['selectFeature'],
|
|
49
|
+
layers: [
|
|
50
|
+
{ layerId: 'features', labelProperty: 'name' }
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
// add the site font into the map styles
|
|
55
|
+
window.GOVUK.mapComponentStyles = window.GOVUK.mapComponentStyles || {}
|
|
56
|
+
window.GOVUK.mapComponentStyles['font-faces'] = {
|
|
57
|
+
'GDS Transport': [
|
|
58
|
+
{
|
|
59
|
+
url: this.$module.getAttribute('data-font-light')
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
'GDS Transport Bold': [
|
|
63
|
+
{
|
|
64
|
+
url: this.$module.getAttribute('data-font-bold')
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const config = {
|
|
70
|
+
mapProvider: defra.maplibreProvider({ workerUrl: cspWorker }),
|
|
71
|
+
behaviour: 'inline',
|
|
72
|
+
mapStyle: {
|
|
73
|
+
url: window.GOVUK.mapComponentStyles,
|
|
74
|
+
selectedColor: '#000000',
|
|
75
|
+
haloColor: '#FFFFFF',
|
|
76
|
+
attribution: ''
|
|
77
|
+
},
|
|
78
|
+
plugins: [this.interactPlugin, datasetsPlugin],
|
|
79
|
+
urlPosition: 'none',
|
|
80
|
+
minZoom: 4,
|
|
81
|
+
maxZoom: 16,
|
|
82
|
+
center: [-0.09, 51.505],
|
|
83
|
+
containerHeight: '500px'
|
|
84
|
+
}
|
|
85
|
+
if (window.location.search.includes('percy_tests')) {
|
|
86
|
+
config.canvasContextAttributes = { preserveDrawingBuffer: true }
|
|
87
|
+
}
|
|
88
|
+
const passedConfig = JSON.parse(this.$module.getAttribute('data-config')) || {}
|
|
89
|
+
this.config = Object.assign(config, passedConfig)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
init () {
|
|
93
|
+
const id = this.$module.getAttribute('id')
|
|
94
|
+
this.$module.setAttribute('id', '')
|
|
95
|
+
this.map_element.setAttribute('id', id)
|
|
96
|
+
this.map_element.classList.add('gem-c-map--enabled')
|
|
97
|
+
this.map = new defra.InteractiveMap(this.map_id, this.config)
|
|
98
|
+
|
|
99
|
+
/* istanbul ignore next */
|
|
100
|
+
this.map.on('map:ready', () => {
|
|
101
|
+
this.interactPlugin.enable()
|
|
102
|
+
this.map.addPanel(this.panelId, {
|
|
103
|
+
focus: false,
|
|
104
|
+
label: false,
|
|
105
|
+
showLabel: false,
|
|
106
|
+
html: '<div class="map-panel-content"></div>',
|
|
107
|
+
mobile: { slot: 'drawer', dismissible: true },
|
|
108
|
+
tablet: { slot: 'left-top', dismissible: true, width: '280px' },
|
|
109
|
+
desktop: { slot: 'left-top', dismissible: true, width: '280px' }
|
|
110
|
+
})
|
|
111
|
+
this.map.hidePanel(this.panelId)
|
|
112
|
+
if (this.trackingEnabled) {
|
|
113
|
+
this.trackingActive = true
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
/* istanbul ignore next */
|
|
118
|
+
this.map.on('map:loaded', () => {
|
|
119
|
+
// This is used for Percy tests, so that Percy knows when to take a snapshot.
|
|
120
|
+
this.$module.setAttribute('data-map-loaded', 'true')
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
/* istanbul ignore next */
|
|
124
|
+
this.map.on('app:panelopened', ({ panelId }) => {
|
|
125
|
+
if (panelId !== 'keyboardHelp') {
|
|
126
|
+
this.panelOpen = true
|
|
127
|
+
this.sendAnalytics({
|
|
128
|
+
event_name: 'select_content',
|
|
129
|
+
type: 'map',
|
|
130
|
+
action: 'opened',
|
|
131
|
+
text: this.currentMarkerName
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
/* istanbul ignore next */
|
|
137
|
+
this.map.on('app:panelclosed', ({ panelId }) => {
|
|
138
|
+
if (panelId !== 'keyboardHelp') {
|
|
139
|
+
if (this.panelOpen) {
|
|
140
|
+
this.sendAnalytics({
|
|
141
|
+
event_name: 'select_content',
|
|
142
|
+
type: 'map',
|
|
143
|
+
action: 'closed',
|
|
144
|
+
text: this.currentMarkerName
|
|
145
|
+
})
|
|
146
|
+
this.panelOpen = false
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
/* istanbul ignore next */
|
|
152
|
+
this.map.on('interact:selectionchange', (e) => {
|
|
153
|
+
if (!this.panelContent) {
|
|
154
|
+
this.panelContent = this.$module.querySelector('.map-panel-content')
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (e.selectedFeatures.length > 0) {
|
|
158
|
+
const currentMarker = e.selectedFeatures[0]
|
|
159
|
+
this.currentMarkerName = currentMarker.properties.name
|
|
160
|
+
this.panelContent.innerHTML = this.createPopupContent(currentMarker)
|
|
161
|
+
this.map.showPanel(this.panelId)
|
|
162
|
+
this.sendAnalytics({
|
|
163
|
+
event_name: 'select_content',
|
|
164
|
+
type: 'map',
|
|
165
|
+
action: 'marker click',
|
|
166
|
+
text: this.currentMarkerName
|
|
167
|
+
})
|
|
168
|
+
} else {
|
|
169
|
+
this.map.hidePanel(this.panelId)
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
/* istanbul ignore next */
|
|
174
|
+
this.map.on('app:panelclosed', (e) => {
|
|
175
|
+
this.interactPlugin.clear()
|
|
176
|
+
})
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
createPopupContent (feat) {
|
|
180
|
+
const heading = `h${this.headingLevel}`
|
|
181
|
+
let markup = `<${heading} class="govuk-heading-s govuk-!-margin-bottom-2">${feat.properties.name}</${heading}>`
|
|
182
|
+
const para = function (item) {
|
|
183
|
+
return `<p class="govuk-body govuk-!-margin-bottom-2">${item}</p>`
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const keys = Object.keys(feat.properties)
|
|
187
|
+
keys.forEach((key) => {
|
|
188
|
+
if (key === 'url') {
|
|
189
|
+
markup = `${markup} ${para(`<a href="${feat.properties[key]}" class="gem-c-map__link">${feat.properties[key]}</a>`)}`
|
|
190
|
+
} else if (key === 'email') {
|
|
191
|
+
markup = `${markup} ${para(`<a href="mailto:${feat.properties[key]}" class="gem-c-map__link">${feat.properties[key]}</a>`)}`
|
|
192
|
+
} else if (key !== 'name') {
|
|
193
|
+
markup = `${markup} ${para(feat.properties[key])}`
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
markup = this.removeScript(markup)
|
|
197
|
+
return markup
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
removeScript (input) {
|
|
201
|
+
do {
|
|
202
|
+
input = input.replace(/<[\s]*script/g, '')
|
|
203
|
+
} while (input.includes('<script'))
|
|
204
|
+
return input
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* istanbul ignore next */
|
|
208
|
+
sendAnalytics (data) {
|
|
209
|
+
if (window.dataLayer && this.trackingActive) {
|
|
210
|
+
window.GOVUK.analyticsGa4.core.applySchemaAndSendData(data, 'event_data')
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
Modules.Map = Map
|
|
215
|
+
})(window.GOVUK.Modules)
|
|
@@ -63,6 +63,7 @@ $govuk-output-custom-properties: true;
|
|
|
63
63
|
@import "components/layout-header";
|
|
64
64
|
@import "components/layout-super-navigation-header";
|
|
65
65
|
@import "components/lead-paragraph";
|
|
66
|
+
@import "components/map";
|
|
66
67
|
@import "components/metadata";
|
|
67
68
|
@import "components/modal-dialogue";
|
|
68
69
|
@import "components/notice";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@import "@defra/interactive-map/dist/css/index";
|
|
2
|
+
|
|
3
|
+
.gem-c-map--enabled {
|
|
4
|
+
padding: 0;
|
|
5
|
+
background-color: #d7e0e5;
|
|
6
|
+
|
|
7
|
+
@include govuk-media-query($from: tablet) {
|
|
8
|
+
border: solid 1px govuk-functional-colour(border);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include govuk-media-query($until: desktop) {
|
|
12
|
+
max-height: 80vh;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.gem-c-map__attribution {
|
|
17
|
+
margin-top: govuk-spacing(2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.gem-c-map__attribution-text {
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.gem-c-map__js-on {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.js-enabled {
|
|
29
|
+
.gem-c-map__js-on {
|
|
30
|
+
display: block;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.gem-c-map__no-js {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.gem-c-map__link {
|
|
39
|
+
@include govuk-link-common;
|
|
40
|
+
@include govuk-link-style-default;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// defra map override styles
|
|
44
|
+
.im-c-open-map-button {
|
|
45
|
+
margin-bottom: govuk-spacing(2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.im-c-error {
|
|
49
|
+
margin: 0;
|
|
50
|
+
background: #FFFFFF;
|
|
51
|
+
border-color: govuk-colour("red");
|
|
52
|
+
@include govuk-font(19)
|
|
53
|
+
}
|