Installable PWA with a share target; design for an item-based library
Android's share sheet (OsmAnd, Locus, mapy.com, ...) can now send GPX/FIT/GeoJSON/ZIP files to the installed app: the service worker parks them and the page offers to import them into a Tracks & Points folder, waiting through a login if needed. Manifest, app icon, a server-side fallback for /share-target. docs/library-design.adoc proposes replacing the file-based GpxStore with folders and items (stable ids, timestamps, tombstones, a change feed) as the base for syncing with OsmAnd and Locus.
This commit is contained in:
1 parent
e2461f794c
commit
25b87b94fe
14 files changed
+637
-5
No files matched your search
@@ -21,6 +21,7 @@ import { formatCoords, formatSunInfo, sunChartHtml } from "/js/sun.js";
|
||||
import { notifySidePanelOpen, onlyOneSidePanelOpen } from "/js/panels.js";
|
||||
import { isLoggedIn } from "/js/auth.js";
|
||||
import { DebugControl } from "/js/debug.js";
|
||||
import { offerSharedFiles } from "/js/share_import.js";
|
||||
import HomeButton from "/vendor/npmap-home-button/home-button.esm.js";
|
||||
import OverviewMap from "/vendor/npmap-overview/overview.esm.js";
|
||||
import * as maplibregl from "/vendor/maplibre-gl/maplibre-gl.mjs";
|
||||
@@ -570,6 +571,7 @@ const gpxPanel = new GpxPanelControl(map, profilePanel);
|
||||
gpxPanel.mount(sidebar);
|
||||
const overlaysControl = new OverlaysControl(map);
|
||||
overlaysControl.mount(sidebar);
|
||||
offerSharedFiles(gpxPanel);
|
||||
searchControl.setLayerOpeners({
|
||||
layers: (path, result) => gpxPanel.showFeature(path, result.bbox.slice(0, 2)),
|
||||
hiking_trails: (code) => overlaysControl.showHikingTrailsCountry(code),
|
||||
|
||||
Reference in new issue
Block a user