From 407c36bb8000ffef5907697a49029ea2db7bd4b1 Mon Sep 17 00:00:00 2001 From: hbao Date: Fri, 18 Mar 2022 13:51:01 +0800 Subject: [PATCH] =?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();