Merge branch 'main' into feat/post-location-override
Picks up the two fixes committed via the main checkout's submodule git dir: the leg-connection map fix and the U+200E coordinate strip. The outer repo is one directory (~/Projects is a symlink to ~/Nextcloud/Projects), but a worktree gets its own submodule git dir — .git/worktrees/<name>/modules/user vs .git/modules/user — so those commits were not reachable here until a local fetch. No push was needed, so git-sync did not deploy. maplibre-utils.js auto-merged, keeping main's prevNear leg logic alongside this branch's MAP_STYLE extraction. js/map.js conflicted as a generated bundle and was resolved by rebuilding, not hand-merging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -260,15 +260,26 @@ import { MAP_STYLE } from './src/map-style.js';
|
||||
} else if (!trackpointsPerFile || trackpointsPerFile.length === 0) {
|
||||
connect = true; /* no GPX present → connect all */
|
||||
} else {
|
||||
var prev = entries[i - 1];
|
||||
var covered = false;
|
||||
var prev = entries[i - 1];
|
||||
// Each endpoint just needs to be near SOME GPX file, not necessarily
|
||||
// the same one — a leg can legitimately span two consecutive files
|
||||
// (e.g. an unblogged intermediate stop splits one route in two).
|
||||
// Requiring one shared file used to draw a straight connector straight
|
||||
// over an already-GPX-covered path, since this trip's routes are one
|
||||
// contiguous chain recorded a day per file (…-to-X.gpx, X-to-….gpx).
|
||||
//
|
||||
// The trade: two endpoints each near a DIFFERENT track now read as
|
||||
// covered even when there is a real gap between them (a flight or a
|
||||
// train transfer), so no connector is drawn across it. That case is
|
||||
// not detectable from proximity alone — mark the entry after the gap
|
||||
// `force_connect: true` and the branch above handles it.
|
||||
var prevNear = false, currNear = false;
|
||||
for (var f = 0; f < trackpointsPerFile.length; f++) {
|
||||
if (isNearTrack(parseFloat(prev.lat), parseFloat(prev.lng), trackpointsPerFile[f], 10) &&
|
||||
isNearTrack(parseFloat(e.lat), parseFloat(e.lng), trackpointsPerFile[f], 10)) {
|
||||
covered = true; break;
|
||||
}
|
||||
if (!prevNear && isNearTrack(parseFloat(prev.lat), parseFloat(prev.lng), trackpointsPerFile[f], 10)) prevNear = true;
|
||||
if (!currNear && isNearTrack(parseFloat(e.lat), parseFloat(e.lng), trackpointsPerFile[f], 10)) currNear = true;
|
||||
if (prevNear && currNear) break;
|
||||
}
|
||||
connect = !covered;
|
||||
connect = !(prevNear && currNear);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user