原因:語法不兼容,修改轉換成vue的寫法
// 設置polyline屬性,將路線顯示出來,將解壓坐標第一個數據作為起點
# 微信小程序寫法
that.setData({
latitude: pl[0].latitude,
longitude: pl[0].longitude,
polyline: [{
points: pl,
color: '#FF0000DD',
width: 4
}]
}),
# uniapp寫法
that.latitude = pl[0].latitude,
that.longitude = pl[0].longitude,
that.polyline= [{
points: pl,
color: '#FF0000DD',
width: 4
}]
