Map stacks off the Cesium allow-list: providers move into the Cesium adapter

The map stacks' imagery, terrain and Google 3D factories move into the
Cesium adapter (src/render/cesium/mapImagery.js, mapTerrain.js,
google3d.js); the ./maps/imagery, ./maps/terrain and ./maps/3d exports
point there. The catalog names its ion stacks by asset number, and the
map source controller and default sources are Cesium-free: they
build providers and switch imagery layers, terrain, tilesets and the
globe's visibility through a map engine (src/maps/engine.js) that the
Cesium adapter provides as it loads (mapEngine.js), through the
application's renderer or the ./render/cesium/unbound export. The
controller and createDefaultMapSources also take it as an `engine`
option.

src/maps/catalog.js, controller.js, imagery.js, terrain.js and google3d.js
leave the allow-list.
This commit is contained in:
Sameh Khamis committed 2026-11-09 12:11:42 -08:00
1 parent aea5c3acc6
commit a8a9cc73a4
31 files changed
+364 -140

No files matched your search

+9
View File
@@ -505,6 +505,15 @@ perform no network requests and discover no additional modules.
standard sources and their setup/fallback policy. The standalone facade wires
these to the application's render governor.
`maps/imagery`, `maps/terrain` and `maps/3d` are the Cesium renderer's
(`src/render/cesium/`). `maps/controller` and `maps/defaults` are
Cesium-free: they make their scene changes and build their providers
through the map engine the renderer provides as it loads
(`src/maps/engine.js`). The application's renderer provides it; with a
viewer with no renderer bound, load `./render/cesium/unbound` once first, or pass the
engine as the controller's and `createDefaultMapSources`' `engine` option.
Without one, constructing a controller throws, naming that export.
A registry supplies `sources`, `defaultId`, `unknownId` and optional `recoveryId`.
Each source has a user-facing `descriptor`, availability/reason, and either an
`imagery({ signal })` factory or a supplied `tileset`/`createTileset({ signal })`.
+12 -1
View File
@@ -558,7 +558,7 @@ Keyless terrain tiles retry when Re:Earth throttles them. The browser fetches
`terrain.reearth.land/cesium-mesh/ellipsoid/{z}/{x}/{y}.terrain` directly; no
proxy in this repository sees those requests (`/api/terrain/heights` is the
separate point-height endpoint), and the upstream edge answers zoom-out bursts
with HTTP 429 under load. `src/maps/terrain.js` hands Cesium a `Resource`
with HTTP 429 under load. `src/render/cesium/mapTerrain.js` hands Cesium a `Resource`
whose retry policy (`src/maps/terrainRetry.js`) every derived tile fetch
inherits: 429, 502, 503 and 504 replies retry up to three times, 750 ms
doubling to a 15 s cap, with every retry waiting behind one shared cooldown
@@ -6650,6 +6650,17 @@ request HTTPS tiles even on HTTP localhost, with the existing Content Security
Policy unchanged. Ion attribution and Bing's per-tile credits are preserved;
other ion imagery assets continue through the SDK's standard ion factory.
The imagery, terrain and 3D factories are the Cesium renderer's
(`src/render/cesium/mapImagery.js`, `mapTerrain.js`, `google3d.js`; the
package exports `./maps/imagery`, `./maps/terrain` and `./maps/3d` point
there). The catalog, the default registry and the controller are
Cesium-free: they reach those factories, and the viewer operations a
switch makes (imagery layers, terrain, the globe's visibility, tilesets),
through the map engine (`src/maps/engine.js`), which the Cesium renderer
provides as it loads (`src/render/cesium/mapEngine.js`). A viewer with no
renderer bound gets it, with the other unbound ports, from the package's
`./render/cesium/unbound` export.
The controller accepts other source registries without adding provider branches.
Each instance caches source construction, ignores superseded scene changes and
releases imagery layers/listeners on replacement. Destroy invalidates pending