Add GPX upload with hierarchical folders and map display

Upload GPX files into a folder hierarchy (traversal-safe path
resolution against the store root), browse them in a tree panel, and
toggle each one's waypoints/tracks on the map. Waypoints render as
clickable points showing name, description and time; bare URLs in the
description are turned into safe links. GPX layers survive switching
between the Online/Offline base map, same as the radar overlay.

Adds rexml as an explicit dependency — it moved to a bundled gem in
this Ruby version and isn't picked up by Bundler otherwise.
This commit is contained in:
randy committed 2026-08-25 14:05:39 +02:00
1 parent 16e06b2ffe
commit 4e0d2abbd0
13 files changed
+629 -2

No files matched your search

+117
View File
@@ -76,3 +76,120 @@ html, body {
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.gpx-toggle button {
/* Override maplibregl-ctrl-group's 29x29px square icon-button sizing —
this is a text button. */
width: auto;
height: auto;
border: none;
background: #fff;
padding: 6px 10px;
font: inherit;
font-size: 13px;
white-space: nowrap;
cursor: pointer;
}
.gpx-panel {
position: fixed;
top: 0;
right: 0;
width: 300px;
max-width: 90vw;
height: 100%;
display: flex;
flex-direction: column;
background: #fff;
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
font-size: 13px;
z-index: 10;
}
.gpx-panel[hidden] {
display: none;
}
.gpx-panel__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
border-bottom: 1px solid #eee;
}
.gpx-panel__close {
border: none;
background: none;
font-size: 18px;
line-height: 1;
padding: 0 4px;
cursor: pointer;
}
.gpx-upload {
display: flex;
flex-direction: column;
gap: 6px;
padding: 10px 12px;
border-bottom: 1px solid #eee;
}
.gpx-upload input {
font: inherit;
font-size: 13px;
}
.gpx-upload button {
align-self: flex-start;
font: inherit;
font-size: 13px;
cursor: pointer;
}
.gpx-upload__status {
margin: 0;
color: #666;
}
.gpx-tree {
overflow-y: auto;
padding: 8px 12px;
}
.gpx-tree ul {
list-style: none;
margin: 0;
padding-left: 16px;
}
.gpx-tree > ul {
padding-left: 0;
}
.gpx-tree summary {
cursor: pointer;
font-weight: 600;
}
.gpx-tree__file {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 0;
cursor: pointer;
}
.gpx-tree__empty {
color: #888;
font-style: italic;
}
.maplibregl-popup-content p {
margin: 4px 0 0;
}
.gpx-popup__time {
color: #888;
font-size: 12px;
}