fix: add transport_mode to entry JSON serialisation in all three map templates; note bbox approach in isNearTrack
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user