z***@126.com
z***@126.com
  • 发布:2022-04-13 10:30
  • 更新:2022-04-14 16:44
  • 阅读:1361

uniapp 如何监听scale缩放事件,我看文档上面没有

分类:uni-app

uniapp 如何监听scale缩放事件,我看文档上面没有

2022-04-13 10:30 负责人:无 分享
已邀请:
z***@126.com

z***@126.com (作者)

this.intervalId = setInterval(() => {
this.map.getScale({
success:(res) => {
let _markerId = ''
if(this.marker){
_markerId= this.marker._id
}

        if(this.prevScale > 12.9 && res.scale<=12.9){  
            this.prevScale = res.scale  
            this.showMarkerLabel = false  

            this.getMarkerList(this.toolbar.id, _markerId)  
        }  
        if(this.prevScale < 15 && res.scale >= 15){  
            this.prevScale = res.scale  
            this.showMarkerLabel = true  
            this.getMarkerList(this.toolbar.id, _markerId)  
        }  
    }  
})  

}, 500)

该问题目前已经被锁定, 无法添加新回复