Library phase 2: rename/recolor nodes, rename and move folders, split a layer into items; offline routing design

This commit is contained in:
randy committed 2026-11-13 21:16:35 +01:00
1 parent 4d838395b8
commit 6f5f11cb4d
9 files changed
+467 -39

No files matched your search

+18 -1
View File
@@ -2,7 +2,7 @@
:toc:
:toclevels: 2
Status: *phase 1 implemented* (`lib/maptool/library.rb`, see Decisions); phases 2–4 proposed. Replaces the file-based store behind
Status: *phases 1–2 implemented* (`lib/maptool/library.rb`, see Decisions); phases 3–4 proposed. Replaces the file-based store behind
Tracks & Points (`GpxStore`) with an item-based library that OsmAnd, Locus
Map and the MapTool web app can all be synced against.
@@ -324,6 +324,23 @@ removed once nothing uses them.
* Migration runs on first start (no `library.sqlite` yet); `rake
library:migrate` re-runs it (idempotent).
== Decisions (phase 2)
* Rename and color apply to tracks, routes and layers (the node in the
tree). Color is stored as `properties.color` and drawn as the line
color. A layer's color is laid over its legacy GeoJSON when it's served.
Single points keep their category color from the GPX.
* Folders: rename, and move by dragging one onto another folder (or onto
the tree's blank space for the top level). Moving into a folder's own
subfolder, or next to a sibling of the same name, is refused.
* "Split into items" turns a migrated layer into ordinary items in its
folder. Its notes keep their ids, the legacy file is copied to
`sources/` as their "original", and the layer is tombstoned.
`data/gpx/` isn't touched. A note edited in an unsplit layer still
goes to its legacy file.
* `GpxStore` stays, since unsplit layers are still drawn from it. It goes
away once nothing is a layer any more.
== Open questions
* Folder depth over 3 — fine to require Locus Premium?