From 750926276509bf5388a031a52f84e644dc6787dc Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Thu, 12 Dec 2024 20:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/dept/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index a4e98f3..5f975fb 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -536,8 +536,8 @@ export default { this.innerVisible = true; this.$nextTick(() => { - //在线 new BMapGL - //离线 new window.BMap + //在线地图 new BMapGL + //离线地图 new window.BMap this_.map = new window.BMap.Map('map-container'); // 创建地图实例 let point; if (this_.form.lon != null && this_.form.lon !== '' && this_.form.lat != null && this_.form.lat !== '') { @@ -549,8 +549,10 @@ export default { point = new window.BMap.Point(117.13805, 31.8734); // 创建点坐标 } - this_.map.centerAndZoom(point, 12); // 初始化地图,设置中心点坐标和地图级别 + this_.map.centerAndZoom(point, 14); // 初始化地图,设置中心点坐标和地图级别 this_.map.enableScrollWheelZoom(true); // 启用滚轮放大缩小 + this_.map.setMinZoom(14) // 启用滚轮放大缩小 + this_.map.setMaxZoom(14) // 启用滚轮放大缩小 // 禁用不必要的功能 // this_.map.disableDragging(); // 禁用拖拽