Bläddra i källkod

标记疑点bug修复 -- 直接关闭标记疑点按钮报错

Bella 2 år sedan
förälder
incheckning
60e700f181

+ 3 - 1
public/static/plugins/draw-plugin/leaflet.draw.js

@@ -630,7 +630,9 @@ map2DViewer.setDrawTool = function (options) {
       this.map.off("draw-result", map2DViewer.drawToolFire);
       if (this.measureTool) {
         // 移除绘制的图形
-        this.measureTool._measureGroup.remove();
+        this.measureTool._measureGroup &&
+          this.measureTool._measureGroup.remove();
+
         mousemoveStatus = false;
         map2DViewer.map.doubleClickZoom.disable();
         map2DViewer.map.off("click");

+ 0 - 2
src/components/map/MapHolder.vue

@@ -40,7 +40,6 @@ export default {
     //地图初始化
     this.mapInit();
     // 初始化绘制工具
-    // this.initDraw();
     // 可视化区域图
     this.getJSonData();
     // 地图常用渲染方法
@@ -74,7 +73,6 @@ export default {
       if (val.index === 1 && val.subIndex === 1) {
         console.log("激活标记疑点弹窗");
         this.initDraw();
-        // this.startLabelCase()
       } else {
         console.log("移除疑点标记事件");
         this.stopLabelCase();