update embedding instructions

This commit is contained in:
vcoppe
2026-03-28 12:09:31 +01:00
parent f70f92a176
commit 9743fd460e
5 changed files with 15 additions and 6 deletions

View File

@@ -90,6 +90,9 @@ export function getCleanedEmbeddingOptions(
delete cleanedOptions[key];
}
}
if (cleanedOptions['key'] && cleanedOptions['key'] === PUBLIC_MAPTILER_KEY) {
delete cleanedOptions['key'];
}
return cleanedOptions;
}

View File

@@ -85,9 +85,11 @@ export class StyleManager {
this.merge(style, basemapStyle);
const terrain = this.getCurrentTerrain();
style.sources[terrain.source] = terrainSources[terrain.source];
style.terrain = terrain.exaggeration > 0 ? terrain : undefined;
if (this._maptilerKey !== '') {
const terrain = this.getCurrentTerrain();
style.sources[terrain.source] = terrainSources[terrain.source];
style.terrain = terrain.exaggeration > 0 ? terrain : undefined;
}
style.layers.push(...anchorLayers);
@@ -152,6 +154,7 @@ export class StyleManager {
}
updateTerrain() {
if (this._maptilerKey === '') return;
const map_ = get(this._map);
if (!map_) return;