From 82742f328b21f569dbdfeda93b646ed7d49e1a47 Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 28 Nov 2023 08:23:26 +0100 Subject: [PATCH] Allow printing only if not visitor --- assets/js/sections/gridmap.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/assets/js/sections/gridmap.js b/assets/js/sections/gridmap.js index 8a3b3fa2..566667f5 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -90,13 +90,15 @@ function plot(visitor, grid_two, grid_four, grid_six, grid_two_confirmed, grid_f }, }); - var printer = L.easyPrint({ - tileLayer: layer, - sizeModes: ['Current'], - filename: 'myMap', - exportOnly: true, - hideControlContainer: true - }).addTo(map); + if (visitor != true) { + var printer = L.easyPrint({ + tileLayer: layer, + sizeModes: ['Current'], + filename: 'myMap', + exportOnly: true, + hideControlContainer: true + }).addTo(map); + } /*Legend specific*/ var legend = L.control({ position: "topright" });