From 68858e0a9d9b5bdb76fe597a366d427568e5d50e Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123 <819527061@qq.com> Date: 星期四, 06 七月 2023 09:59:16 +0800 Subject: [PATCH] 限制最大拖动为11级别 --- src/pages/show/showIndex/showIndex.vue | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/pages/show/showIndex/showIndex.vue b/src/pages/show/showIndex/showIndex.vue index e291947..2e0c23c 100644 --- a/src/pages/show/showIndex/showIndex.vue +++ b/src/pages/show/showIndex/showIndex.vue @@ -82,7 +82,10 @@ }, methods: { initMap() { - this.map = new window.BMap.Map("map"); + this.map = new window.BMap.Map("map",{ + minZoom : 2, + maxZoom : 11 + }); console.log(map,'map===') this.map.centerAndZoom(new BMap.Point(118.183450598,39.6505309225), 11) //map.enableScrollWheelZoom(true) //榧犳爣婊氬姩缂╂斁 -- Gitblit v1.9.1