aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/static/main.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/static/main.js b/src/static/main.js
index 3ef9cf1..102862f 100644
--- a/src/static/main.js
+++ b/src/static/main.js
@@ -7,9 +7,23 @@ L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
let known_store_chains;
let icons = {};
-var markers = L.featureGroup().addTo(map);
-var polygons = L.featureGroup().addTo(map);
-var heatmap = L.featureGroup().addTo(map);
+var markers = L.featureGroup()
+var polygons = L.featureGroup()
+var heatmap = L.featureGroup()
+
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+if (!urlParams.has('markers') || urlParams.get('markers') == "1") {
+ markers.addTo(map);
+}
+if (!urlParams.has('polygons') || urlParams.get('polygons') == "1") {
+ polygons.addTo(map);
+}
+if (!urlParams.has('heatmap') || urlParams.get('heatmap') == "1") {
+ heatmap.addTo(map);
+}
+
+
const CategoryField = document.getElementById('Category');
const CountryField = document.getElementById('Country');