| 
					
				 | 
			
			
				@@ -17,6 +17,7 @@ import { register } from "ol/proj/proj4"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import GeometryCollection from 'ol/geom/GeometryCollection.js'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ElMessage } from "element-plus"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useStore } from "vuex"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import Polygon from 'ol/geom/Polygon.js'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 proj4.defs( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "EPSG:38572", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,6 +119,14 @@ class AuthenticMap { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(e.type === "modifyend"){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mapData.isEditArea = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mapData.isEditArea = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const features = e.mapBrowserEvent.map.getFeaturesAtPixel(e.mapBrowserEvent.pixel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log('features',features); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (features.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const feature = features[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const geometry = feature.getGeometry(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const coordinates = geometry.getCoordinates()[0]; // 获取多边形的顶点坐标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          console.log('Modified polygon coordinates:', coordinates); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, function(e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let f = null 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -131,6 +140,7 @@ class AuthenticMap { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(!res){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ElMessage.warning("编辑中") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      res = f.get("height")?false:res 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return res 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.kmap.addLayer(this.clickPointLayer.layer); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -207,7 +217,6 @@ class AuthenticMap { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.kmap.endModify(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // 开始编辑 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   startModify(type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.kmap.startModify(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -281,6 +290,24 @@ class AuthenticMap { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     that.kmap.on("singleclick", (evt) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(mapData.curPointData.id && !mapData.disabledForm && mapData.selectPointArr.length===1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ElMessage.warning("编辑中") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        that.kmap.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            layer instanceof VectorLayer && 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              layer.get("name") === "defaultPolygonLayer") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            console.log('09090909'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // const features = e.mapBrowserEvent.map.getFeaturesAtPixel(e.mapBrowserEvent.pixel); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // console.log('features',features); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // if (features.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              const feature = mapData.selectPointArr[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              const geometry = feature.getGeometry(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              console.log('geometry',geometry); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const coordinates = geometry.getCoordinates()[0]; // 获取多边形的顶点坐标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                console.log('Modified polygon coordinates:', coordinates); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if(!mapData.curPointData.id && mapData.isEdit){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -337,16 +364,38 @@ class AuthenticMap { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // 移除点的功能 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   removePoint() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // console.log('getDefaultCursor',this.kmap.getDefaultCursor()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // this.kmap.setDefaultCursor('text') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // console.log('getDefaultCursor',this.kmap.getDefaultCursor()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // var source = this.kmap.setDefaultCursor('move'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // console.log('source',this.kmap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // var source = this.kmap.polygonLayer.source 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // console.log('mapData.curPointData',mapData.curPointData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // source.removeFeature(mapData.curPointData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // source.removeFeature(pointFeature); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // this.kmap.endDraw1() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // console.log('this.kmap.getLayerFeatures',this.kmap.getLayerFeatures()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // const polygonFeature = this.kmap.getLayerFeatures()[0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // var coordinateToRemove = [113.61271651653868, 23.58619390922549]; // 示例坐标,应替换为实际坐标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // var geometry = polygonFeature.getGeometry(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // var coordinates = geometry.getCoordinates(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // console.log('coordinates',coordinates); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 获取多边形的所有坐标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    console.log('arr',mapData.selectPointArr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const features = this.kmap.getLayerFeatures() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    features.forEach(item =>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(item.get("id")===mapData.selectPointArr[0].get("id")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let coordinates = item.getGeometry().getCoordinates(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 删除多边形最后一个坐标点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        coordinates[0][0].pop(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 更新多边形的坐标 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        item.getGeometry().setCoordinates(coordinates); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // // 查找要删除的点的索引 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // var indexToRemove = coordinates[0].findIndex(function(coordinate) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   return coordinate[1][0] === coordinateToRemove[0] && coordinate[1][1] === coordinateToRemove[1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // console.log('indexToRemove',indexToRemove); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // // 如果点存在,则删除它 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // if (indexToRemove > -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   coordinates[0].splice(indexToRemove, 1); // 删除点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   geometry.setCoordinates(coordinates); // 更新几何形状 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // console.log('geometry',geometry); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // console.log('coordinates',coordinates); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   //   获取所有选中点位 
			 |