Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-4192: International boundaries update (#6928)

minniewong7000f16cc51a
diff --git a/config/default/common/config/metadata/layers/reference/DoS_International_Boundaries.md b/config/default/common/config/metadata/layers/reference/DoS_International_Boundaries.md
new file mode 100644
index 000000000..a13e020e5
--- /dev/null
+++ b/config/default/common/config/metadata/layers/reference/DoS_International_Boundaries.md
@@ -0,0 +1,5 @@
+The International Boundaries layer is provided by the U.S. Department of State, Office of the Geographer and Global Issues.
+
+The Office of the Geographer and Global Issues at the U.S. Department of State produces the Large Scale International Boundaries (LSIB) dataset. The current edition is version 11.4 (published 24 February 2025). The 11.4 release contains updated boundary lines and data refinements designed to extend the functionality of the dataset. These data and generalized derivatives are the only international boundary lines approved for U.S. Government use. The contents of this dataset reflect U.S. Government policy on international boundary alignment, political recognition, and dispute status. They do not necessarily reflect de facto limits of control.
+
+Source: [Large Scale International Boundaries, U.S. Department of State](https://geodata.state.gov/geonetwork/srv/eng/catalog.search#/metadata/3bdb81a0-c1b9-439a-a0b1-85dac30c59b2)
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/defaults.json b/config/default/common/config/wv.json/defaults.json
index 779215b87..d37d38942 100644
--- a/config/default/common/config/wv.json/defaults.json
+++ b/config/default/common/config/wv.json/defaults.json
@@ -29,7 +29,7 @@
"id": "Coastlines_15m"
},
{
- "id": "Reference_Features_15m",
+ "id": "DoS_International_Boundaries",
"hidden": "true"
},
{
diff --git a/config/default/common/config/wv.json/layerOrder.json b/config/default/common/config/wv.json/layerOrder.json
index b082d83ba..7a2fdb2f9 100644
--- a/config/default/common/config/wv.json/layerOrder.json
+++ b/config/default/common/config/wv.json/layerOrder.json
@@ -1201,7 +1201,7 @@
"Mammal_Richness_Grids_Endangered_Species_2013",
"Mammal_Richness_Grids_All_Threats_2013",
"Coastlines_15m",
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
"Reference_Labels_15m",
"Reference_Labels_15m_arctic",
"Graticule_15m",
diff --git a/config/default/common/config/wv.json/layers/reference/DoS_International_Boundaries.json b/config/default/common/config/wv.json/layers/reference/DoS_International_Boundaries.json
new file mode 100644
index 000000000..a861f4171
--- /dev/null
+++ b/config/default/common/config/wv.json/layers/reference/DoS_International_Boundaries.json
@@ -0,0 +1,30 @@
+{
+ "layers": {
+ "DoS_International_Boundaries": {
+ "id": "DoS_International_Boundaries",
+ "title": "International Boundaries",
+ "subtitle": "U.S. Department of State, Office of the Geographer and Global Issues",
+ "description": "reference/DoS_International_Boundaries",
+ "tags": "borders reference",
+ "group": "overlays",
+ "type": "vector",
+ "layergroup": "Reference",
+ "modalShouldFollowClicks": true,
+ "vectorStyle": {
+ "id": "DoS_International_Boundaries"
+ },
+ "projections": {
+ "geographic": {
+ "id": "DoS_International_Boundaries",
+ "source": "GIBS:geographic",
+ "matrixSet": "15.625m"
+ },
+ "arctic": {
+ "id": "DoS_International_Boundaries",
+ "source": "GIBS:arctic",
+ "matrixSet": "250m"
+ }
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/layers/reference/Reference_Features_15m.json b/config/default/common/config/wv.json/layers/reference/Reference_Features_15m.json
deleted file mode 100644
index 7136bf4da..000000000
--- a/config/default/common/config/wv.json/layers/reference/Reference_Features_15m.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "layers": {
- "Reference_Features_15m": {
- "id": "Reference_Features_15m",
- "title": "Coastlines / Borders / Roads",
- "description": "reference/Reference_Features_15m",
- "tags": "osm reference, country, countries, state, province",
- "group": "overlays",
- "layergroup": "Reference",
- "wrapX": true,
- "projections": {
- "arctic": {
- "id": "Reference_Features",
- "tags": "osm reference, country, countries, state, province",
- "source": "GIBS:arctic",
- "matrixSet": "250m"
- },
- "geographic": {
- "subtitle": "© OpenStreetMap contributors",
- "tags": "borders reference osm",
- "source": "GIBS:geographic"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/config/default/common/config/wv.json/measurements/Reference Map.json b/config/default/common/config/wv.json/measurements/Reference Map.json
index 7b88c00ac..fd91297e7 100644
--- a/config/default/common/config/wv.json/measurements/Reference Map.json
+++ b/config/default/common/config/wv.json/measurements/Reference Map.json
@@ -22,7 +22,7 @@
"description": "",
"image": "",
"settings": [
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
"Coastlines_15m",
"Land_Mask",
"Land_Water_Map"
diff --git a/config/default/common/config/wv.json/naturalEvents.json b/config/default/common/config/wv.json/naturalEvents.json
index becfbb95f..7eecc0ddf 100644
--- a/config/default/common/config/wv.json/naturalEvents.json
+++ b/config/default/common/config/wv.json/naturalEvents.json
@@ -150,7 +150,11 @@
false
],
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -160,7 +164,11 @@
],
"Sea and Lake Ice": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -246,7 +254,11 @@
],
"Water Color": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -276,7 +288,11 @@
],
"Severe Storms": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -306,7 +322,11 @@
],
"Snow": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -428,7 +448,11 @@
false
],
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -552,7 +576,11 @@
false
],
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -562,7 +590,11 @@
],
"Sea and Lake Ice": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -664,7 +696,11 @@
],
"Floods": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -746,7 +782,11 @@
],
"Water Color": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -796,7 +836,11 @@
],
"Severe Storms": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -850,7 +894,11 @@
],
"Snow": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -1036,7 +1084,11 @@
false
],
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -1260,7 +1312,11 @@
false
],
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
@@ -1270,7 +1326,7 @@
],
"Sea and Lake Ice": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
true
],
[
@@ -1360,7 +1416,7 @@
],
"Severe Storms": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
true
],
[
@@ -1395,7 +1451,11 @@
],
"Snow": [
[
- "Reference_Features_15m",
+ "DoS_International_Boundaries",
+ true
+ ],
+ [
+ "Coastlines_15m",
true
],
[
diff --git a/config/default/common/config/wv.json/projections/geographic.json b/config/default/common/config/wv.json/projections/geographic.json
index c46298810..6ab6bb267 100644
--- a/config/default/common/config/wv.json/projections/geographic.json
+++ b/config/default/common/config/wv.json/projections/geographic.json
@@ -28,7 +28,8 @@
0.002197265625,
0.0010986328125,
0.00054931640625,
- 0.00027465820313
+ 0.00027465820313,
+ 0.0001373291015625
],
"numZoomLevels": 21,
"startCenter": [
diff --git a/config/default/common/config/wv.json/redirects.json b/config/default/common/config/wv.json/redirects.json
index ac2fae074..462a2e9ce 100644
--- a/config/default/common/config/wv.json/redirects.json
+++ b/config/default/common/config/wv.json/redirects.json
@@ -21,7 +21,7 @@
"land_mask": "Land_Mask",
"ol_graticule": "Graticule_15m",
"sedac_bound": "Coastlines_15m",
- "cartographic:esri-administrative-boundaries_level-1": "Reference_Features_15m",
+ "cartographic:esri-administrative-boundaries_level-1": ["DoS_International_Boundaries", "Coastlines_15m"],
"cartographic:00-global-labels": "Reference_Labels_15m",
"grump-v1-population-count_2000": "GPW_Population_Density_2000",
"Aqua_Orbit_Asc": "OrbitTracks_Aqua_Ascending",
@@ -75,9 +75,10 @@
"MODIS_Fires_All": "MODIS_Combined_Thermal_Anomalies_All",
"MODIS_Fires_Terra": "MODIS_Terra_Thermal_Anomalies_All",
"MODIS_Fires_Aqua": "MODIS_Aqua_Thermal_Anomalies_All",
- "Reference_Features": "Reference_Features_15m",
+ "Reference_Features": ["DoS_International_Boundaries", "Coastlines_15m"],
"Reference_Labels": "Reference_Labels_15m",
- "Coastlines": "Coastlines_15m"
+ "Coastlines": "Coastlines_15m",
+ "Reference_Features_15m": ["DoS_International_Boundaries", "Coastlines_15m"]
}
}
}
\ No newline at end of file
diff --git a/config/default/common/vectorstyles/DoS_International_Boundaries.json b/config/default/common/vectorstyles/DoS_International_Boundaries.json
new file mode 100644
index 000000000..d1df0da47
--- /dev/null
+++ b/config/default/common/vectorstyles/DoS_International_Boundaries.json
@@ -0,0 +1,87 @@
+{
+ "version": 8,
+ "name": "DoS International Boundaries",
+ "sources": {
+ "DoS_International_Boundaries": {
+ "type": "vector",
+ "tiles": [
+ "https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/DoS_International_Boundaries/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.mvt"
+ ]
+ }
+ },
+ "layers": [
+ {
+ "id": "Line_Glow",
+ "source": "DoS_International_Boundaries",
+ "source-layer": "DoS_International_Boundaries",
+ "source-description": "Default",
+ "type": "line",
+ "paint": {
+ "line-color": [
+ "case",
+ [ "==", ["get", "RANK"], "3"], ["rgba", 16, 18, 18, 0.1],
+ ["rgba", 16, 18, 18, 0.4]
+ ],
+ "line-width": [
+ "interpolate",
+ ["linear"],
+ ["zoom"],
+ 3,[
+ "match", ["get", "RANK"],
+ "3", 1,
+ 3
+ ],
+ 5,[
+ "match", ["get", "RANK"],
+ "3", 1.5,
+ 4.5
+ ],
+ 7,[
+ "match", ["get", "RANK"],
+ "3", 2,
+ 6
+ ]
+ ]
+ }
+ },
+ {
+ "id": "Line_Core",
+ "source": "DoS_International_Boundaries",
+ "source-layer": "DoS_International_Boundaries",
+ "source-description": "Default",
+ "type": "line",
+ "paint": {
+ "line-color": [
+ "case",
+ [ "==", ["get", "RANK"], "3"], ["rgba", 177, 193, 193, 0.25],
+ ["rgba", 177, 193, 193, 1]
+ ],
+ "line-width": [
+ "interpolate",
+ ["linear"],
+ ["zoom"],
+ 3,[
+ "match", ["get", "RANK"],
+ "3", 0.75,
+ 1
+ ],
+ 5,[
+ "match", ["get", "RANK"],
+ "3", 1,
+ 1.5
+ ],
+ 7,[
+ "match", ["get", "RANK"],
+ "3", 1.75,
+ 2
+ ]
+ ],
+ "line-dasharray": [
+ "case",
+ ["==", ["get", "RANK"], "2"], ["literal", [6, 4]],
+ ["literal", [0, 0]]
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/e2e/features/compare/compare-test.spec.js b/e2e/features/compare/compare-test.spec.js
index 9c086cebc..bfa640785 100644
--- a/e2e/features/compare/compare-test.spec.js
+++ b/e2e/features/compare/compare-test.spec.js
@@ -97,7 +97,7 @@ test('Collapse layer list with B state and test label shows correct number of la
const layerCount = page.locator('#accordion-toggler-button .layer-count')
await expect(layerCount).toHaveText('6 Layers')
await collapsedToggleButton.click()
- const referenceFeatures = page.locator('#activeB-Reference_Features_15m')
+ const referenceFeatures = page.locator('#activeB-DoS_International_Boundaries')
await expect(referenceFeatures).toBeVisible()
})
@@ -109,8 +109,8 @@ test('If you exit A|B with B selection active, the active state will then be the
const closeReflectanceAqua = page.locator('#close-activeBMODIS_Aqua_CorrectedReflectance_TrueColor')
const referenceLabels = page.locator('#activeB-Reference_Labels_15m')
const closeRefLabels = page.locator('#close-activeBReference_Labels_15m')
- const referenceFeatures = page.locator('#activeB-Reference_Features_15m')
- const closeRefFeatures = page.locator('#close-activeBReference_Features_15m')
+ const referenceFeatures = page.locator('#activeB-DoS_International_Boundaries')
+ const closeRefFeatures = page.locator('#close-activeBDoS_International_Boundaries')
const coastlines = page.locator('#activeB-Coastlines_15m')
const correctedReflectanceTerra = page.locator('#activeB-MODIS_Terra_CorrectedReflectance_TrueColor')
await expect(correctedReflectanceSNPP).toBeVisible()
diff --git a/e2e/features/compare/permalinks-test.spec.js b/e2e/features/compare/permalinks-test.spec.js
index 12f45231f..beb43882d 100644
--- a/e2e/features/compare/permalinks-test.spec.js
+++ b/e2e/features/compare/permalinks-test.spec.js
@@ -64,7 +64,7 @@ test('Click B tab to ensure that loaded layers are correct', async () => {
const aquaLayer = page.locator('#activeB-MODIS_Aqua_CorrectedReflectance_TrueColor.layer-hidden')
const snppLayer = page.locator('#activeB-VIIRS_SNPP_CorrectedReflectance_TrueColor.layer-hidden')
const refLabels = page.locator('#activeB-Reference_Labels_15m.layer-hidden')
- const refFeatures = page.locator('#activeB-Reference_Features_15m.layer-hidden')
+ const refFeatures = page.locator('#activeB-DoS_International_Boundaries.layer-hidden')
const coastlines = page.locator('#activeB-Coastlines_15m.layer-visible')
const terraLayer = page.locator('#activeB-MODIS_Terra_CorrectedReflectance_TrueColor.layer-visible')
await bTab.click()
diff --git a/e2e/features/image-download/layers-test.spec.js b/e2e/features/image-download/layers-test.spec.js
index a1894978c..db1411186 100644
--- a/e2e/features/image-download/layers-test.spec.js
+++ b/e2e/features/image-download/layers-test.spec.js
@@ -31,7 +31,7 @@ test('List layers in draw order', async () => {
// Verify the layers are loaded by checking they exist in the layer list
const layerItems = page.locator('li.layer-visible')
- await expect(layerItems).toHaveCount(3)
+ await expect(layerItems).toHaveCount(4)
// Start download and verify progress indicator appears
await clickDownload(page)
@@ -89,7 +89,7 @@ test('Do not include obscured layers', async () => {
// Verify layers are loaded
const layerItems = page.locator('li.layer-visible')
- await expect(layerItems).toHaveCount(3)
+ await expect(layerItems).toHaveCount(4)
// Start download and verify progress indicator appears
await clickDownload(page)
diff --git a/e2e/features/layers/layers-sidebar-2-test.spec.js b/e2e/features/layers/layers-sidebar-2-test.spec.js
index f2bf6d7d8..9f5960722 100644
--- a/e2e/features/layers/layers-sidebar-2-test.spec.js
+++ b/e2e/features/layers/layers-sidebar-2-test.spec.js
@@ -12,14 +12,16 @@ const twoGroupsQueryString = 'http://localhost:3000/?v=-107.15747724134027,-81.6
const mixedLayersGroupsDisabledQueryString = 'http://localhost:3000/?v=-107.15747724134027,-81.6706340523014,47.81381180183274,89.12472754295932&l=Reference_Features_15m,VIIRS_SNPP_Thermal_Anomalies_375m_All,MODIS_Combined_Value_Added_AOD,VIIRS_NOAA20_Thermal_Anomalies_375m_All,MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth,MODIS_Terra_CorrectedReflectance_TrueColor&lg=false'
const mixedLayerIdOrder = [
- 'active-Reference_Features_15m',
+ 'active-DoS_International_Boundaries',
+ 'active-Coastlines_15m',
'active-VIIRS_SNPP_Thermal_Anomalies_375m_All',
'active-MODIS_Combined_Value_Added_AOD',
'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All',
'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth'
]
const groupedLayerIdOrder = [
- 'active-Reference_Features_15m',
+ 'active-DoS_International_Boundaries',
+ 'active-Coastlines_15m',
'active-VIIRS_SNPP_Thermal_Anomalies_375m_All',
'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All',
'active-MODIS_Combined_Value_Added_AOD',
@@ -27,11 +29,12 @@ const groupedLayerIdOrder = [
'active-MODIS_Terra_CorrectedReflectance_TrueColor'
]
const ungroupedReorderdLayerIdOrder = [
+ 'active-DoS_International_Boundaries',
+ 'active-Coastlines_15m',
'active-MODIS_Combined_Value_Added_AOD',
'active-MODIS_Combined_MAIAC_L2G_AerosolOpticalDepth',
'active-VIIRS_SNPP_Thermal_Anomalies_375m_All',
- 'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All',
- 'active-Reference_Features_15m'
+ 'active-VIIRS_NOAA20_Thermal_Anomalies_375m_All'
]
test.describe.configure({ mode: 'serial' })
diff --git a/e2e/features/layers/layers-sidebar-test.spec.js b/e2e/features/layers/layers-sidebar-test.spec.js
index 223f6012c..6b2c17c31 100644
--- a/e2e/features/layers/layers-sidebar-test.spec.js
+++ b/e2e/features/layers/layers-sidebar-test.spec.js
@@ -78,7 +78,7 @@ test('Disabling groups puts all overlays into a single group', async () => {
await expect(firesLayer).toBeVisible()
await expect(firesGroup).not.toBeVisible()
const overlayGroupItems = await page.locator('#active-overlays ul > li')
- await expect(overlayGroupItems).toHaveCount(5)
+ await expect(overlayGroupItems).toHaveCount(6)
})
test('Re-enabling groups restores grouping', async () => {
@@ -127,5 +127,5 @@ test('Load with groups disabled from permalink', async () => {
await expect(aodGroup).not.toBeVisible()
await expect(overlaysGroup).toBeVisible()
const overlayGroupItems = await page.locator('#active-overlays ul > li')
- await expect(overlayGroupItems).toHaveCount(5)
+ await expect(overlayGroupItems).toHaveCount(6)
})
diff --git a/e2e/test-utils/hooks/wvHooks.js b/e2e/test-utils/hooks/wvHooks.js
index 8a0f412b2..ffbb97809 100644
--- a/e2e/test-utils/hooks/wvHooks.js
+++ b/e2e/test-utils/hooks/wvHooks.js
@@ -63,7 +63,7 @@ const dateSelectorMonthDay = async (page) => {
const assertDefaultLayers = async (page) => {
const layerItem = page.locator('.item.productsitem')
const refLabels = page.locator('#active-Reference_Labels_15m')
- const refFeatures = page.locator('#active-Reference_Features_15m')
+ const refFeatures = page.locator('#active-DoS_International_Boundaries')
const coastlines = page.locator('#active-Coastlines_15m')
const trueColorNOAA21 = page.locator('#active-VIIRS_NOAA21_CorrectedReflectance_TrueColor')
const trueColorSNPP = page.locator('#active-VIIRS_SNPP_CorrectedReflectance_TrueColor')
diff --git a/tasks/build-options/fetchPreviewSnapshots.js b/tasks/build-options/fetchPreviewSnapshots.js
index 7c9dcd346..51dd77dd1 100644
--- a/tasks/build-options/fetchPreviewSnapshots.js
+++ b/tasks/build-options/fetchPreviewSnapshots.js
@@ -77,7 +77,7 @@ const paramDict = {
const standaloneLayers = [
'Graticule_15m',
'Coastlines_15m',
- 'Reference_Features_15m',
+ 'DoS_International_Boundaries',
'Reference_Labels_15m'
]
const destImgDir = './web/images/layers/previews/'
diff --git a/web/images/layers/previews/arctic/DoS_International_Boundaries.jpg b/web/images/layers/previews/arctic/DoS_International_Boundaries.jpg
new file mode 100644
index 000000000..72524336d
Binary files /dev/null and b/web/images/layers/previews/arctic/DoS_International_Boundaries.jpg differ
diff --git a/web/images/layers/previews/geographic/DoS_International_Boundaries.jpg b/web/images/layers/previews/geographic/DoS_International_Boundaries.jpg
new file mode 100644
index 000000000..396a9e66a
Binary files /dev/null and b/web/images/layers/previews/geographic/DoS_International_Boundaries.jpg differ
diff --git a/web/js/modules/layers/util.js b/web/js/modules/layers/util.js
index 82adb0362..fe7a36075 100644
--- a/web/js/modules/layers/util.js
+++ b/web/js/modules/layers/util.js
@@ -1258,43 +1258,52 @@ export function layersParse12(stateObj, config) {
const lstates = [];
lodashEach(layerDefs, (layerDef) => {
// Get the text before any paren or comma
- let layerId = layerDef.match(/[^(,]+/)[0];
+ const layerId = layerDef.match(/[^(,]+/)[0];
+ const newLayerIds = [];
if (config.redirects && config.redirects.layers) {
- layerId = config.redirects.layers[layerId] || layerId;
+ if (config.redirects.layers[layerId] && Array.isArray(config.redirects.layers[layerId])) {
+ newLayerIds.push(...config.redirects.layers[layerId]);
+ } else {
+ newLayerIds.push(config.redirects.layers[layerId] || layerId);
+ }
+ } else {
+ newLayerIds.push(layerId);
}
- const lstate = {
- id: layerId,
- attributes: [],
- };
- googleTagManager.pushEvent({
- event: 'layer_included_in_url',
- layers: {
- id: layerId,
- },
- });
- // Everything inside parens
- const arrayAttr = layerDef.match(/\(.*\)/);
- if (arrayAttr) {
- // Get single match and remove parens
- const strAttr = arrayAttr[0].replace(/[()]/g, '');
- // Key value pairs
- const kvps = strAttr.split(',');
- lodashEach(kvps, (kvp) => {
- parts = kvp.split('=');
- if (parts.length === 1) {
- lstate.attributes.push({
- id: parts[0],
- value: true,
- });
- } else {
- lstate.attributes.push({
- id: parts[0],
- value: parts[1],
- });
- }
+ newLayerIds.forEach((newLayerId) => {
+ const lstate = {
+ id: newLayerId,
+ attributes: [],
+ };
+ googleTagManager.pushEvent({
+ event: 'layer_included_in_url',
+ layers: {
+ id: newLayerId,
+ },
});
- }
- lstates.push(lstate);
+ // Everything inside parens
+ const arrayAttr = layerDef.match(/\(.*\)/);
+ if (arrayAttr) {
+ // Get single match and remove parens
+ const strAttr = arrayAttr[0].replace(/[()]/g, '');
+ // Key value pairs
+ const kvps = strAttr.split(',');
+ lodashEach(kvps, (kvp) => {
+ parts = kvp.split('=');
+ if (parts.length === 1) {
+ lstate.attributes.push({
+ id: parts[0],
+ value: true,
+ });
+ } else {
+ lstate.attributes.push({
+ id: parts[0],
+ value: parts[1],
+ });
+ }
+ });
+ }
+ lstates.push(lstate);
+ });
});
return createLayerArrayFromState(lstates, config);
} catch (e) {