diff --git a/main.js b/main.js index 6aaadc2..43a6c36 100644 --- a/main.js +++ b/main.js @@ -119,8 +119,14 @@ for (let category of layerCategories) { document.querySelector("aside").appendChild(catDiv); } +const urlParams = new URLSearchParams(window.location.search); +const urlLayers = urlParams.getAll('layer'); + for (let category of layerCategories) { for (let layer of category.layers) { + if (urlLayers.includes(layer.name)) { + layer.enabled = true; + } if (layer.enabled) { map.addLayer(layer.layer); }