Skip to content

Commit

Permalink
【update】stylemap 切换 webmap 清空 map
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongjiaojiao committed Apr 19, 2024
1 parent 18ce618 commit 6d120cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mapboxgl/web-map/WebMapViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ export default class WebMapViewModel extends Events {
clean() {
if (this.map) {
this.triggerEvent('beforeremovemap', {});
this._handler?.clean();
this._handler ? this._handler.clean() : this.map.remove();
this.map = null;
this._sourceListModel = null;
this._appreciableLayers = [];
Expand Down

0 comments on commit 6d120cb

Please sign in to comment.