mirror of https://gitee.com/antv-l7/antv-l7
style: lint style
This commit is contained in:
parent
d7ea5e8294
commit
ada18eb683
|
@ -335,7 +335,7 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
this.markerService.destroy();
|
||||
|
||||
// TODO: 销毁 container 容器
|
||||
this.$container?.parentNode?.removeChild(this.$container)
|
||||
this.$container?.parentNode?.removeChild(this.$container);
|
||||
|
||||
this.removeAllListeners();
|
||||
this.inited = false;
|
||||
|
|
|
@ -417,9 +417,9 @@ export default class AMapService
|
|||
|
||||
public destroy() {
|
||||
this.map.destroy();
|
||||
|
||||
|
||||
// TODO: 销毁地图可视化层的容器
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer)
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer);
|
||||
|
||||
// @ts-ignore
|
||||
delete window.initAMap;
|
||||
|
|
|
@ -511,8 +511,8 @@ export default class AMapService
|
|||
this.map.destroy();
|
||||
|
||||
// TODO: 销毁地图可视化层的容器
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer)
|
||||
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer);
|
||||
|
||||
// @ts-ignore
|
||||
delete window.initAMap;
|
||||
const $jsapi = document.getElementById(AMAP_SCRIPT_ID);
|
||||
|
|
|
@ -279,10 +279,9 @@ export default class L7MapService implements IMapService<Map> {
|
|||
}
|
||||
|
||||
public destroy() {
|
||||
|
||||
// TODO: 销毁地图可视化层的容器
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer)
|
||||
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer);
|
||||
|
||||
this.eventEmitter.removeAllListeners();
|
||||
if (this.map) {
|
||||
this.map.remove();
|
||||
|
|
|
@ -362,10 +362,9 @@ export default class MapboxService
|
|||
}
|
||||
|
||||
public destroy() {
|
||||
|
||||
// TODO: 销毁地图可视化层的容器
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer)
|
||||
|
||||
this.$mapContainer?.parentNode?.removeChild(this.$mapContainer);
|
||||
|
||||
this.eventEmitter.removeAllListeners();
|
||||
if (this.map) {
|
||||
this.map.remove();
|
||||
|
|
|
@ -92,12 +92,17 @@ export default class Amap2demo_destroy extends React.Component {
|
|||
bottom: 0,
|
||||
}}
|
||||
/>
|
||||
<button style={{
|
||||
position: 'absolute',
|
||||
top: '0',
|
||||
left: '0',
|
||||
zIndex: 10
|
||||
}} onClick={() => this.scene.destroy()}>destroy</button>
|
||||
<button
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: '0',
|
||||
left: '0',
|
||||
zIndex: 10,
|
||||
}}
|
||||
onClick={() => this.scene.destroy()}
|
||||
>
|
||||
destroy
|
||||
</button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue