perf(map): reuse resources across routes
Preserve standard network layers between map pages while disposing route-owned overlays and controls to prevent memory growth.
This commit is contained in:
@@ -70,6 +70,12 @@ export class DeckLayer extends Layer {
|
||||
this.deck.setProps({ layers });
|
||||
}
|
||||
|
||||
resetSessionLayers(): void {
|
||||
if (this.isDisposed) return;
|
||||
this.userVisibility.clear();
|
||||
this.deck.setProps({ layers: [] });
|
||||
}
|
||||
|
||||
// 获取当前图层
|
||||
getDeckLayers(): any[] {
|
||||
if (this.isDisposed) return [];
|
||||
|
||||
Reference in New Issue
Block a user