两个代码完全一样的页面,一个是nvue,一个是subnvue,nvue的translateMarker好使,subNvue的不好使,测试文件在附件里
this.map = uni.createMapContext('lineMap', this)
this.map.translateMarker({
markerId: 0,
destination: {
latitude: arr[this.i].split(',')[1],
longitude: arr[this.i].split(',')[0]
},
autoRotate: true,
rotate: 180,
duration: 200,
animationEnd: res => {
console.log('结束');
console.log(res);
},
fail(err) {
console.log('失败');
console.log(err);
}
})