浏览代码

清除轨迹

wangzhe 8 月之前
父节点
当前提交
87aa0e7cbe
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      screen-demo/src/views/templateInstance.vue

+ 4 - 1
screen-demo/src/views/templateInstance.vue

@@ -414,11 +414,13 @@ export default {
       this.setpoint()
     },
     close(){
+      this.location.destroy()
       this.open=false
       this.start=[]
       this.end=[]
       this.flag = null
-      this.location.destroy()
+      // console.log("this.location=", this.location);
+      // alert(this.location.destroy())
     },
     //投影转坐标
     MercatorToWGS84(coords) {
@@ -468,6 +470,7 @@ export default {
         toolRoute.route(this.start, this.end).then(data => {
           toolRoute.drawPath(data.routs)
         })
+        this.location = toolRoute;
       }
     },
     handleSizeChange(val) {