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.
18 lines
528 B
ERB
18 lines
528 B
ERB
<div id="map"></div>
|
|
|
|
<div id="gpx-panel" class="gpx-panel" hidden>
|
|
<div class="gpx-panel__header">
|
|
<strong>GPX</strong>
|
|
<button type="button" class="gpx-panel__close" aria-label="Close">×</button>
|
|
</div>
|
|
|
|
<form class="gpx-upload">
|
|
<input type="file" name="file" accept=".gpx" required>
|
|
<input type="text" name="folder" placeholder="folder/subfolder (optional)">
|
|
<button type="submit">Upload</button>
|
|
<p class="gpx-upload__status" hidden></p>
|
|
</form>
|
|
|
|
<div class="gpx-tree"></div>
|
|
</div>
|