想要做一个根据n条经纬度来实现回显车辆的行驶轨迹,现在是使用map的polyline属性来实现,但是地图显示一直是乱的。
selectMap(data).then(res => {
if (res.success) {
const that = this;
that.polylines=[{
points:res.data,
width: 2,
color: "0000CC"
}];
uni.showToast({
icon: 'none',
title: "获取位置成功"
});
} else {
uni.showToast({
icon: 'none',
title: res.msg
});
}
})