Bug fixes and performance improvements

This commit is contained in:
Ian Renton
2026-05-10 10:57:41 +01:00
parent 74ce486098
commit 363735a235
25 changed files with 82 additions and 66 deletions

View File

@@ -15,6 +15,7 @@ const WAB_WAI_GRID_COLOR_DARK = 'rgba(60, 60, 120, 1.0)';
var backgroundTileLayer;
var markersLayer;
var geodesicsLayer;
var oms;
var terminator;
var maidenheadGrid;
var cqZones;
@@ -48,7 +49,7 @@ function buildQueryString() {
});
str = str + "max_age=" + $("#max-spot-age option:selected").val();
// Additional filters for the map view: No dupes, no QRT, only spots with good locations
str = str + "&dedupe=true&allow_qrt=false&needs_good_location=true";
str = str + "&dedupe=true&allow_qrt=false";
str = str + getCredentialQueryString();
return str;
}
@@ -58,12 +59,14 @@ function updateMap() {
// Clear existing content
markersLayer.clearLayers();
geodesicsLayer.clearLayers();
oms.clearMarkers();
// Make new markers for all spots that match the filter
spots.forEach(function (s) {
var m = L.marker([s["dx_latitude"], s["dx_longitude"]], {icon: getIcon(s)});
m.bindPopup(getTooltipText(s));
markersLayer.addLayer(m);
oms.addMarker(m);
// Create geodesics if required
if ($("#mapShowGeodesics")[0].checked && s["de_latitude"] != null && s["de_longitude"] != null) {
@@ -414,6 +417,12 @@ function setUpMap() {
markersLayer = new L.LayerGroup();
markersLayer.addTo(map);
// Set up spiderfy for overlapping markers
oms = new OverlappingMarkerSpiderfier(map, {keepSpiderfied: true});
oms.addListener('click', function(marker) {
marker.openPopup();
});
// Add geodesic layer
geodesicsLayer = new L.LayerGroup();
geodesicsLayer.addTo(map);