MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / clean

Method clean

src/common/mapping/WebMapV2.js:81–106  ·  view source on GitHub ↗
(removeMap = true)

Source from the content-addressed store, hash-verified

79 }
80
81 clean(removeMap = true) {
82 if (this.map) {
83 if (this._sourceListModel) {
84 this._sourceListModel.destroy();
85 this._sourceListModel = null;
86 }
87 this.stopCanvg();
88 removeMap && this.map.remove();
89 this.map = null;
90 this._legendList = [];
91 this.center = null;
92 this.zoom = null;
93 if (this._dataflowService) {
94 this._dataflowService.off('messageSucceeded', this._handleDataflowFeaturesCallback);
95 this._dataflowService.off('subscribesucceeded', this._initDataflowLayerCallback);
96 }
97 this._unprojectProjection = null;
98 this._cacheLayerId = new Map();
99 }
100 if (this._layerTimerList.length) {
101 this._layerTimerList.forEach((timer) => {
102 clearInterval(timer);
103 });
104 this._layerTimerList = [];
105 }
106 }
107
108 _initWebMap() {}
109

Callers

nothing calls this directly

Calls 5

stopCanvgMethod · 0.80
forEachMethod · 0.80
destroyMethod · 0.45
removeMethod · 0.45
offMethod · 0.45

Tested by

no test coverage detected