调整更新的内容
parent
f37e065b83
commit
fc0f625c26
|
@ -60,7 +60,6 @@ export default {
|
||||||
this.recordCar.endTime = recordCar.endTime
|
this.recordCar.endTime = recordCar.endTime
|
||||||
historyMap(this.recordCar).then(res=>{
|
historyMap(this.recordCar).then(res=>{
|
||||||
this.recordCarList = res.data; // 将获取到的对象集合存储到data中
|
this.recordCarList = res.data; // 将获取到的对象集合存储到data中
|
||||||
console.log(this.recordCarList)
|
|
||||||
this.currentObject = {}
|
this.currentObject = {}
|
||||||
this.startDisplay(); // 开始展示
|
this.startDisplay(); // 开始展示
|
||||||
let coordinates = res.data.map(obj => [
|
let coordinates = res.data.map(obj => [
|
||||||
|
@ -68,7 +67,7 @@ export default {
|
||||||
parseFloat(obj.latitude.replace(/"/g, ""))
|
parseFloat(obj.latitude.replace(/"/g, ""))
|
||||||
]);
|
]);
|
||||||
this.lineArr = coordinates
|
this.lineArr = coordinates
|
||||||
console.log(this.lineArr)
|
console.log("历史轨迹经纬:"+this.lineArr)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initMap() {
|
initMap() {
|
||||||
|
@ -134,7 +133,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
startAnimation () {
|
startAnimation () {
|
||||||
// setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
AMap.plugin('AMap.MoveAnimation', () => {
|
AMap.plugin('AMap.MoveAnimation', () => {
|
||||||
console.log('开始回放')
|
console.log('开始回放')
|
||||||
this.marker.moveAlong(this.lineArr, {
|
this.marker.moveAlong(this.lineArr, {
|
||||||
|
@ -144,7 +143,7 @@ export default {
|
||||||
autoRotation: true,
|
autoRotation: true,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
// },2000)
|
},2000)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue