mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Serve the Data Library from any server, and let a server shape it (#1807)
A server can answer the library with createLibraryHandler, a fetch handler, and shape what it offers: hide entries (listed: false) or route browser-direct ones through itself (fetch: proxied). View-bounded entries ask for a grid-snapped box, and GeoParquet is read on the server within it. Applications can pass their own tile and data fetchers (createApplicationTools({library: {fetchTile, fetchData}})), and with library.requireCatalog a catalog that does not answer offers nothing and is asked again later. Tile paths have one spelling: integer z/x/y without leading zeros, within the grid and the entry's zooms. A server's index and partition reads are bounded and counted against its subrequest limit.
This commit is contained in:
1 parent
7b4c84a717
commit
9554d6ea71
15 files changed
+1510
-395
No files matched your search
@@ -589,6 +589,17 @@ keyless routes use the keyless gate so they work behind a reverse proxy.
|
||||
Operators opt entries in with `GEV_LIBRARY_ENABLE` and remove them with
|
||||
`GEV_LIBRARY_DISABLE`. A static build with no server still serves every
|
||||
browser-direct, non-opt-in entry; proxied ones say they need the app's server.
|
||||
The proxy is a fetch handler (`createLibraryHandler`, exported as
|
||||
`gods-eye-view/sources/library`) that the dev server mounts behind its gates.
|
||||
Another server can mount it with `listed` (hide entries: the catalog marks them
|
||||
`listed: false` and Browse leaves them out) and `proxied` (route browser-direct
|
||||
entries through it: the catalog marks them `fetch: "proxied"`). A routed
|
||||
view-bounded entry asks for its box snapped to a power-of-two grid
|
||||
(`libraryViewBox`, `?bbox=` on `/data/<id>`); GeoParquet entries are read on the
|
||||
server then. Tile, data and complete index answers carry `public,
|
||||
max-age=<cacheSeconds>` (`private` when keyed). `createApplicationTools`
|
||||
takes `library.fetchTile` and `library.fetchData` so an application can fetch
|
||||
library tiles and proxied datasets through its own cache.
|
||||
|
||||
The Browse dialog is a `dialog[data-panel-surface]`: modal, labelled, search
|
||||
focused on open, Escape and backdrop dismiss and return focus to Browse, and it
|
||||
|
||||
Reference in new issue
Block a user