From 620a74fdfa4fe6e7923e2ec48991bee99980ced4 Mon Sep 17 00:00:00 2001 From: hbao Date: Fri, 18 Mar 2022 12:09:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B5=8B=E9=87=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 4538d39d..11d98e6c 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -3010,6 +3010,9 @@ var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 + that.clickBbox = center; + console.log(that.mapZjdData); + that.textMjAll = that.mapZjdData.zdmj; map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 @@ -3054,6 +3057,9 @@ var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY; //定位查询位置 var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置 + that.clickBbox = center; + console.log(that.mapZjdData); + that.textMjAll = that.mapZjdData.zdmj; map.getView().animate({ // 只设置需要的属性即可 center: center, // 中心点 @@ -4068,7 +4074,7 @@ $("#area").click(function () { console.log(that.textMjAll); console.log(that.clickBbox); - if(that.textMjAll ==null){ + if(that.textMjAll ==null || that.textMjAll ==""){ that.textMjAll =0; } if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){ From 407c36bb8000ffef5907697a49029ea2db7bd4b1 Mon Sep 17 00:00:00 2001 From: hbao Date: Fri, 18 Mar 2022 13:51:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map/MapGisDrawing.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Map/MapGisDrawing.vue b/src/components/Map/MapGisDrawing.vue index 9cfe652c..5ce4f4df 100644 --- a/src/components/Map/MapGisDrawing.vue +++ b/src/components/Map/MapGisDrawing.vue @@ -560,6 +560,9 @@ export default { maxZoom: 18, //地图放大限制 resolution:Math.random() * 0.00000001, }), + interactions: ol.interaction.defaults({ + pinchRotate: false // 移动端禁止地图旋转 + }), }); //view.setResolution(view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 //获取坐标是否存在 @@ -692,7 +695,7 @@ export default { that.newZb = JSON.stringify(coordinate); if(coordinate !="" && coordinate !=null){ //map.addLayer(vector_drawing); - map.removeInteraction(draw); + that.map.removeInteraction(draw); } that.closeMoule = coordinate; that.formSubmit(); From 44bd31726b9b2cb177df4afcd9a3e3026ad46636 Mon Sep 17 00:00:00 2001 From: hbao Date: Mon, 21 Mar 2022 16:59:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/list.vue | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 11d98e6c..56ecdad5 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -3021,7 +3021,7 @@ duration: 1000, // 缩放持续时间,默认不需要设置 resolution: Math.random() * 0.00000001, }); - this.backMap =1; + //this.backMap =1; } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") { //that.newHt ="1"; var zbNew = JSON.stringify({ @@ -3068,7 +3068,7 @@ duration: 1000, // 缩放持续时间,默认不需要设置 resolution: Math.random() * 0.00000001, }); - this.backMap =1; + //this.backMap =1; } else { let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize()); resolution:resolution + Math.random() * 0.00000001, @@ -3130,22 +3130,22 @@ map.addLayer(fsssTc); //附属设施图层查询开始 ------------------start //使用geoserver服务查询开始 -------------------end - if(this.backMap ==1){ - var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'"; - var wmsSourceBack = new ol.source.ImageWMS({ - crossOrigin: 'anonymous', - params: { - LAYERS: 'zjd_dc:t_house_survey_all', - 'VERSION': '1.1.0', - 'FORMAT': "image/png", - 'CQL_FILTER': cql - }, - serverType: 'geoserver', - url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", - }); - zjdTc.setSource(wmsSourceBack); - ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 - } + // if(this.backMap ==1){ + // var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'"; + // var wmsSourceBack = new ol.source.ImageWMS({ + // crossOrigin: 'anonymous', + // params: { + // LAYERS: 'zjd_dc:t_house_survey_all', + // 'VERSION': '1.1.0', + // 'FORMAT': "image/png", + // 'CQL_FILTER': cql + // }, + // serverType: 'geoserver', + // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms", + // }); + // zjdTc.setSource(wmsSourceBack); + // ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新 + // } //数据库直接加载数据渲染方式---------------------------------------------------start //判断当前账套是否有数据 // var mapTalkAbout = true;