Add split export: Export Route vs Export Plan
Split button with default "Export GPX" (track only) and dropdown: - Export Route: clean track for use in any app - Export Plan: track + waypoints + no-go areas in GPX extensions (trails:planning namespace) for reimporting into the planner Also: - Add no-go area serialization to generateGpx (GPX extensions) - Parse no-go areas from GPX extensions on import - Initialize no-go areas in Yjs session from imported GPX - Save to Journal now exports track only (consistent with Export Route) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
237660db5e
commit
4b711abaec
11 changed files with 172 additions and 60 deletions
|
|
@ -90,6 +90,22 @@ export function initializeSessionWithWaypoints(
|
|||
});
|
||||
}
|
||||
|
||||
export function initializeSessionWithNoGoAreas(
|
||||
sessionId: string,
|
||||
noGoAreas: Array<{ points: Array<{ lat: number; lon: number }> }>,
|
||||
): void {
|
||||
const doc = getOrCreateDoc(sessionId);
|
||||
const yNoGoAreas = doc.getArray("noGoAreas");
|
||||
|
||||
doc.transact(() => {
|
||||
for (const area of noGoAreas) {
|
||||
const yMap = new Y.Map();
|
||||
yMap.set("points", area.points);
|
||||
yNoGoAreas.push([yMap]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export async function listSessions(): Promise<SessionMetadata[]> {
|
||||
return getDb()
|
||||
.select()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue