feat(maps): map sources for the Navara engine

createDefaultMapSources takes the engine kind. On Navara, Google 3D is
available from the browser key alone (Navara builds the tiles itself and
has no ion route to them), so it is the default and the recovery stack
when a key is set; without one the default is Esri imagery. Bing (Cesium
ion imagery) has no Navara path and is unavailable with a reason. World
terrain still needs an ion token and falls back to the keyless terrain.
MapStackController passes the kind of the engine it is given; Cesium
sources are unchanged.
This commit is contained in:
German Khokhlov committed 2026-10-15 20:55:59 +04:00
1 parent d112ecf296
commit 72fec292d4
4 files changed
+109 -10

No files matched your search

+7 -1
View File
@@ -9,7 +9,13 @@ export class MapStackController extends MapSourceController {
constructor(viewer, options = {}) {
const googleApiKey =
typeof window !== 'undefined' ? window.__GOOGLE_MAPS_API_KEY__ : '';
const registry = createDefaultMapSources({ ...options, googleApiKey });
// Sources for the page's engine: Navara builds its own from the
// descriptions (src/maps/defaultSources.js).
const registry = createDefaultMapSources({
...options,
googleApiKey,
engineKind: options.engine?.kind === 'navara' ? 'navara' : 'cesium',
});
super(viewer, {
registry,
initialStack: options.googleTileset