mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-04-28 06:15:54 +00:00
further improve event listener performance
This commit is contained in:
@@ -157,6 +157,9 @@ export class StyleManager {
|
||||
const terrain = this.getCurrentTerrain();
|
||||
if (JSON.stringify(mapTerrain) !== JSON.stringify(terrain)) {
|
||||
if (terrain.exaggeration > 0) {
|
||||
if (!map_.getSource(terrain.source)) {
|
||||
map_.addSource(terrain.source, terrainSources[terrain.source]);
|
||||
}
|
||||
map_.setTerrain(terrain);
|
||||
} else {
|
||||
map_.setTerrain(null);
|
||||
|
||||
Reference in New Issue
Block a user