From 563293b90a976c3bcf0ff314c2f79777296b94c8 Mon Sep 17 00:00:00 2001 From: qqGroup0 <253114712@qq.com> Date: Sat, 6 May 2023 21:56:25 +0800 Subject: [PATCH] =?UTF-8?q?zqq:call-for-help=E6=B7=BB=E5=8A=A0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map.vue | 15 +-- .../responseManagement/userResponse/index.vue | 97 ++++++++++++++++--- 2 files changed, 92 insertions(+), 20 deletions(-) diff --git a/src/components/Map.vue b/src/components/Map.vue index 0751013..3b6a1a4 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -59,8 +59,8 @@ onMounted(() => { const mapOperations = { wktParseToMap: (res) => { let layer = omnivore.wkt.parse(res) - if(featureLayerG_area.getLayers().length != 0||featureLayerG_point.getLayers().length != 0){ - + if (featureLayerG_area.getLayers().length != 0 || featureLayerG_point.getLayers().length != 0) { + return; } layer.addTo(featureLayerG_point) @@ -70,12 +70,12 @@ const mapOperations = { // 判断审核的数据类型,如果是点则直接flyTo if (attr[0].feature.geometry.type.indexOf('Polygon') == -1) { homeMap.flyTo([attr[0].feature.geometry.coordinates[1], attr[0].feature.geometry.coordinates[0]], 3) - variableStore.layerGroupPoint=res; - return {'layer':layer,'location':[attr[0].feature.geometry.coordinates[1],attr[0].feature.geometry.coordinates[0]]} + variableStore.layerGroupPoint = res; + return { 'layer': layer, 'location': [attr[0].feature.geometry.coordinates[1], attr[0].feature.geometry.coordinates[0]] } } // 判断审核的数据类型,如果是面则计算中心点 然后再fly else { - variableStore.layerGroupPoly=res; + variableStore.layerGroupPoly = res; let polygons = []; for (let i = 0; i < attr[0].feature.geometry.coordinates.length; i++) { console.log(attr[0].feature.geometry.coordinates[i]) @@ -90,7 +90,7 @@ const mapOperations = { let final_center = turf.center(turf.featureCollection(features)) // console.log(final_center) homeMap.flyTo([final_center.geometry.coordinates[1], final_center.geometry.coordinates[0]], 3) - return {'layer':layer,'location':null} + return { 'layer': layer, 'location': null } } // return layer @@ -406,6 +406,9 @@ const mapOperations = { }, deleteRectangle: () => { homeMap.removeLayer(layerRectangle) + }, + removeEdit: () => { + homeMap.pm.toggleGlobalRemovalMode(); } } //omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap); diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index edf45dc..2f84d35 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -309,17 +309,28 @@ - Latitude: - - - Longitude: - + + + Latitude: + + + + + + + + Longitude: + + + + + @@ -376,7 +387,7 @@