We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebd9875 commit 624ba14Copy full SHA for 624ba14
1 file changed
src/ui/map.ts
@@ -1928,7 +1928,8 @@ export class Map extends Camera {
1928
// add terrain
1929
const sourceCache = this.style.sourceCaches[options.source];
1930
if (!sourceCache) throw new Error(`cannot load terrain, because there exists no source with ID: ${options.source}`);
1931
- sourceCache.reload();
+ // Update terrain tiles when adding new terrain
1932
+ if (this.terrain === null) sourceCache.reload();
1933
// Warn once if user is using the same source for hillshade and terrain
1934
for (const index in this.style._layers) {
1935
const thisLayer = this.style._layers[index];
0 commit comments