Browse Source

fix:修改新建后的地块没有idbug

wangsisi 4 months ago
parent
commit
4200d548e9
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/views/authentic/authenticMap.js

+ 5 - 2
src/views/authentic/authenticMap.js

@@ -386,8 +386,11 @@ class AuthenticMap {
     if(type==='add') {
       features = [mapData.point]
     }else{
-      console.log(mapData.curPointData)
-      features = [this.kmap.getFeatureById(mapData.curPointData.id)];
+      if(mapData.curPointData.id){
+        features = [this.kmap.getFeatureById(mapData.curPointData.id)];
+      }else{
+        features = [mapData.point]
+      }
     }
     let geometryArr = [];
     let area = 0;