Fix packet spidering to only include most recent markers with icons
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 <noreply@anthropic.com>
This commit is contained in:
parent
06a7b8d75f
commit
8848c5b391
1 changed files with 6 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue