From 3723dd91e02fd82c5143756360c5c2b832694983 Mon Sep 17 00:00:00 2001 From: Szymon Porwolik Date: Fri, 7 Nov 2025 16:44:02 +0100 Subject: [PATCH] Map can be now extended --- application/views/bandmap/list.php | 1 + assets/js/sections/bandmap_list.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/application/views/bandmap/list.php b/application/views/bandmap/list.php index 72cef795e..938c4f0cd 100644 --- a/application/views/bandmap/list.php +++ b/application/views/bandmap/list.php @@ -90,6 +90,7 @@ // DX Map translation strings var lang_bandmap_draw_spotters = ""; + var lang_bandmap_extend_map = ""; var lang_bandmap_your_qth = ""; var lang_bandmap_callsign = ""; var lang_bandmap_frequency = ""; diff --git a/assets/js/sections/bandmap_list.js b/assets/js/sections/bandmap_list.js index 1d42eb7f3..5fd7a6d39 100644 --- a/assets/js/sections/bandmap_list.js +++ b/assets/js/sections/bandmap_list.js @@ -3508,6 +3508,7 @@ $(function() { legend.onAdd = function(map) { const div = L.DomUtil.create("div", "legend"); div.innerHTML = ' ' + lang_bandmap_draw_spotters + '
'; + div.innerHTML += ' ' + lang_bandmap_extend_map + '
'; return div; }; legend.addTo(dxMap); @@ -3517,6 +3518,21 @@ $(function() { showSpotters = this.checked; updateDxMap(); }); + + $('#extendMapCheckbox').on('change', function() { + const mapContainer = $('#dxMap'); + if (this.checked) { + // Double the height (345px -> 690px) + mapContainer.css('height', '690px'); + } else { + // Restore original height + mapContainer.css('height', '345px'); + } + // Invalidate map size to ensure it redraws properly + if (dxMap) { + dxMap.invalidateSize(); + } + }); }, 100); }