(function () { "use strict"; var map = L.map("map").setView([52.37, 9.73], 9); L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { maxZoom: 19, attribution: '© OpenStreetMap contributors', }).addTo(map); var markerLayer = L.layerGroup().addTo(map); var statusBar = document.getElementById("status-bar"); var band2m = document.getElementById("band-2m"); var band70cm = document.getElementById("band-70cm"); var debounceTimer = null; var controller = null; function getSelectedBand() { var has2m = band2m.checked; var has70cm = band70cm.checked; if (has2m && has70cm) return "all"; if (has2m) return "2m"; if (has70cm) return "70cm"; return "all"; } function escapeHtml(str) { if (!str) return ""; return str .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """); } function buildPopup(r) { var bandClass = r.band === "2m" ? "band-2m" : "band-70cm"; var html = '
| Freq | " + r.frequency.toFixed(5) + ' MHz ' + escapeHtml(r.band) + " |
| Offset | " + escapeHtml(r.offset) + " MHz |
| CC | " + r.color_code + " |
| Location | " + loc + " |
| Network | " + escapeHtml(r.ipsc_network) + " |
| Trustee | " + escapeHtml(r.trustee) + " |
| Timeslots | " + escapeHtml(r.ts_linked) + " |
| Status | " + escapeHtml(r.status) + " |