From e733164e1c779b3aef7245936b9daf7875bf791e Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 14 Dec 2023 17:12:33 +0800
Subject: [PATCH] 解决屏幕缩放导致鼠标位置不准确的问题,右侧,切换校区后的显示BUG

---
 src/store/modules/openlayerData.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/store/modules/openlayerData.js b/src/store/modules/openlayerData.js
index ec68be0..86a657a 100644
--- a/src/store/modules/openlayerData.js
+++ b/src/store/modules/openlayerData.js
@@ -33,6 +33,7 @@
 import OlSourceOSM from "ol/source/OSM.js";
 import OlLayerTile from "ol/layer/Tile.js";
 import OlMap from "ol/Map.js";
+import { defaults as defaultInteractions } from "ol/interaction";
 
 import XYZ from "ol/source/XYZ";
 
@@ -49,6 +50,9 @@
     },
     openlayers: {
       map2D: new OlMap({
+        interactions: defaultInteractions({
+          pinchRotate: false, // 移动端禁止地图旋转
+        }),
         layers: [
           /**
              *  new OlLayerTile({

--
Gitblit v1.9.3