From c5c555f662d6e1d4dc197a1a41a9dec4d43d91e2 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Mon, 25 Mar 2024 01:00:54 +0100 Subject: [PATCH] only load on click --- website/assets/map_howto.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/assets/map_howto.js b/website/assets/map_howto.js index d474fea..b1b6dc4 100644 --- a/website/assets/map_howto.js +++ b/website/assets/map_howto.js @@ -34,13 +34,14 @@ function initMap() { } const mapDiv = document.getElementById('map-container') -// mapDiv.onclick = function () { -// initMap() -// } +mapDiv.onclick = function () { + initMap() +} -initMap() +// initMap() function selectStyle(event, style) { + initMap() toggleButtonSelection(event.target) const styleUrl = 'https://tiles.openfreemap.org/styles/' + style