<view class="h100 w100">
<!-- <view class="h100 w100" v-if="Platform==='H5'" id="indexMap"> </view> -->
<map
id="indexMap"
ref='indexMap1'
@regionchange='changeEvent'
:show-location='showLocation'
style="width: 100%; height: 100%;"
:latitude="locationInfo.lat"
:longitude="locationInfo.lng"
:markers ='markers'
:scale="scale"
:min-scale='3'
:max-scale='18'
@callouttap='callouttap'
@updated ='mapUpdated'
>
</map>
</view>
uni.$on('moveStart',res=>{
console.log('map moveStart: ',res.name);
console.log('this.mapContext: ', this.mapContext);
this.scale = 18
this.mapContext&&this.mapContext.moveToLocation({
latitude:Number(res.lat),
longitude:Number(res.lng),
success:res=> {
console.log('moveToLocation222',res)
}
})
})
x***@163.com
- 发布:2021-08-03 17:31
- 更新:2022-05-27 17:13
- 阅读:1722
6***@qq.com
亲测可以,感谢提供
2023-02-09 18:42