Save full planning state to journal (waypoints + no-go areas)
Save to Journal now includes waypoints and no-go areas alongside the track — the full planning state needed for round-tripping. Export Route remains the clean track-only option for other apps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
45d1360be5
commit
fdfacd2997
1 changed files with 7 additions and 1 deletions
|
|
@ -41,7 +41,13 @@ export function SaveToJournalButton({ yjs, callbackUrl, callbackToken, returnUrl
|
|||
points: (yMap.get("points") as Array<{ lat: number; lon: number }>) ?? [],
|
||||
})).filter((a) => a.points.length >= 3);
|
||||
|
||||
const gpx = generateGpx({ name: "trails.cool route", waypoints: [], tracks, noGoAreas });
|
||||
const waypoints = yjs.waypoints.toArray().map((yMap: Y.Map<unknown>) => ({
|
||||
lat: yMap.get("lat") as number,
|
||||
lon: yMap.get("lon") as number,
|
||||
name: yMap.get("name") as string | undefined,
|
||||
}));
|
||||
|
||||
const gpx = generateGpx({ name: "trails.cool route", waypoints, tracks, noGoAreas });
|
||||
|
||||
// POST to Journal callback
|
||||
const response = await fetch(callbackUrl, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue