1***@qq.com
1***@qq.com
  • 发布:2023-11-22 18:37
  • 更新:2023-11-22 18:37
  • 阅读:211

uni.createMapContext(mapId,this)接口轨迹回放冲突【moveWithRotate】

分类:uni-app

uni.createMapContext(mapId,this)接口下的translateMarker 函数中有一个配置项

moveWithRotate=true

配置之后地图上的marks就无法旋转了。
去掉这个配置项之后就可以正常旋转

原始代码如下:

_this.mapContext.translateMarker({  
    markerId: 1,  
    destination: {  
        longitude: longitude,  
        latitude: latitude,  
    },  
    autoRotate: true,  
    moveWithRotate:true,  
    duration: this.timeMultiple * 1000,  
    animationEnd(){  
        // 计算当前运行进度  
        _this.percentage = parseInt((_this.currentIndex/_this.pointList.length) * 100)  

        // 判断是否继续移动  
        if(_this.isPlayer){  
            _this.runThisLine()  
        }  
    }  
})  
2023-11-22 18:37 负责人:无 分享
已邀请:

要回复问题请先登录注册