From 8848c5b3917496b09fa19f40af43f495c5bb12c0 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 29 Jul 2025 11:57:41 -0500 Subject: [PATCH] Fix packet spidering to only include most recent markers with icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OverlappingMarkerSpiderfier (OMS) was incorrectly configured to exclude historical markers but wasn't properly filtering for only the most recent packets with icons. This caused spidering functionality to break. Changes: - Updated addMarker() to check data.is_most_recent_for_callsign instead of \!_isHistorical - Updated zoom handler to check markerState.is_most_recent_for_callsign when re-adding markers to OMS - Ensures only current position markers (with APRS icons) participate in spidering - Historical markers (red dots) are excluded from spidering as intended 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- assets/js/map.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/js/map.ts b/assets/js/map.ts index 2dd3c88..b3ad99d 100644 --- a/assets/js/map.ts +++ b/assets/js/map.ts @@ -502,8 +502,10 @@ let MapAPRSMap = { if (self.oms) { // Clear and re-add all markers to OMS on zoom change self.oms.clearMarkers(); - self.markers.forEach((marker) => { - if (marker && !marker._isHistorical && !marker._isClusterMarker) { + self.markers.forEach((marker, id) => { + const markerState = self.markerStates.get(String(id)); + // Only add most recent markers (those with icons) to OMS for spidering + if (marker && !marker._isClusterMarker && markerState && markerState.is_most_recent_for_callsign) { self.oms.addMarker(marker); } }); @@ -1547,8 +1549,8 @@ let MapAPRSMap = { marker.openPopup(); } - // Add to OMS for overlapping marker handling (only non-historical markers) - if (self.oms && marker && self.map && !marker._isClusterMarker && !(marker as APRSMarker)._isHistorical) { + // Add to OMS for overlapping marker handling (only most recent packets with icons) + if (self.oms && marker && self.map && !marker._isClusterMarker && data.is_most_recent_for_callsign) { self.oms.addMarker(marker); } },