diff --git a/index.html b/index.html index 3a1dd2b9..36ca96fd 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,7 @@ Weather App + diff --git a/scripts.js b/scripts.js index 1d215f20..4c2413ef 100644 --- a/scripts.js +++ b/scripts.js @@ -161,9 +161,10 @@ async function getTA2MapData(latitude, longitude) { if (mapContainer && mapContainer._leaflet_id) { mapContainer._leaflet_id = null; } + mapContainer.innerHTML = ''; - TA2Map = L.map('map-box-temperature', {dragging: false, scrollWheelZoom: false, touchZoom: false}).setView([latitude, longitude], 10); + const TA2Map = L.map('map-box-temperature', {dragging: false, scrollWheelZoom: false, touchZoom: false, doubleClickZoom: false}).setView([latitude, longitude], 10); const mapLayer = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, @@ -190,7 +191,7 @@ async function getPR0MapData(latitude, longitude) { mapContainer.innerHTML = ''; - PR0Map = L.map('map-box-precipitation', {dragging: false, scrollWheelZoom: false, touchZoom: false}).setView([latitude, longitude], 7); + const PR0Map = L.map('map-box-precipitation', {dragging: false, scrollWheelZoom: false, touchZoom: false, doubleClickZoom: false}).setView([latitude, longitude], 7); const mapLayer = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, @@ -216,7 +217,7 @@ async function getWNDMapData(latitude, longitude) { mapContainer.innerHTML = ''; - WNDMap = L.map('map-box-wind', {dragging: false, scrollWheelZoom: false, touchZoom: false}).setView([latitude, longitude], 10); + const WNDMap = L.map('map-box-wind', {dragging: false, scrollWheelZoom: false, touchZoom: false, doubleClickZoom: false}).setView([latitude, longitude], 10); const mapLayer = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18,