|
@@ -186,6 +186,14 @@ class AlarmLayer {
|
|
|
this.kmap.map.getView().setCenter([113.6805952006568, 23.60747406160339])
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 销毁地图图层
|
|
|
+ removeAllLayers() {
|
|
|
+ this.warningLayer && this.kmap.map.removeLayer(this.warningLayer.layer)
|
|
|
+ this.plantLayer && this.kmap.map.removeLayer(this.plantLayer.layer)
|
|
|
+ this.warningLayer = null
|
|
|
+ this.plantLayer = null
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
export default AlarmLayer;
|