fix: add transport_mode to entry JSON serialisation in all three map templates; note bbox approach in isNearTrack

This commit is contained in:
2026-06-20 00:54:04 +02:00
parent 3301f049cc
commit 37c38e925a
4 changed files with 9 additions and 3 deletions
+3
View File
@@ -183,6 +183,9 @@
if (Math.abs(pt[0] - markerLat) > degLat || Math.abs(pt[1] - markerLng) > degLng) continue;
if (haversineKm(markerLat, markerLng, pt[0], pt[1]) <= thresholdKm) return true;
}
// Always check the last point (may be skipped by stride=10).
// Note: per-point degree pre-filter in the loop is functionally equivalent
// to a per-file bounding-box skip at this data scale.
var last = trackpoints[trackpoints.length - 1];
return haversineKm(markerLat, markerLng, last[0], last[1]) <= thresholdKm;
}