代码如下
<map id='map' :latitude="latitude" :longitude="longitude"
:style="{ width: '100%', height: mapHeight + 'px' }" :markers="markers" :scale="scale"
:polyline="polyline" @markertap="markertap" :enable-overlooking="true" :show-compass="true"
:show-location="showLocation" :max-scale="maxScale" :min-scale="minScale"
:enable-traffic="traffic" :enable-satellite="satellite">
</map>
data里
latitude: 39.909604,
longitude: 116.397228,
scale: 13,
maxScale:20,
minScale:3,
然后在
beforeCreate生命周期或者mounted生命周期
修改
this.maxScale=13
都没有效果
还是用的20
2***@qq.com
nvue修改scale也不生效
2025-07-28 10:38
DCloud_UNI_yuhe
回复 2***@qq.com: 你可以试一下 Plus 的 setZoom 这个方法
2025-07-28 11:05