From 64722e587bf7268a7ec14f7de4f0e65f422258fe Mon Sep 17 00:00:00 2001 From: tangwenkang <2720983602@qq.com> Date: Mon, 4 Dec 2023 20:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8E=86=E5=8F=B2=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/vehicle/car.vue | 1 - src/views/vehicle/record.vue | 29 ++++++++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/views/vehicle/car.vue b/src/views/vehicle/car.vue index 1be1236..e709992 100644 --- a/src/views/vehicle/car.vue +++ b/src/views/vehicle/car.vue @@ -321,7 +321,6 @@ export default { this.isShow = false this.isList = true this.initMap() - alert(this.vinId) this.startAnimation() }, /*刷新*/ diff --git a/src/views/vehicle/record.vue b/src/views/vehicle/record.vue index e889289..7643f09 100644 --- a/src/views/vehicle/record.vue +++ b/src/views/vehicle/record.vue @@ -134,17 +134,24 @@ export default { }) }, startAnimation () { - setTimeout(()=>{ - AMap.plugin('AMap.MoveAnimation', () => { - console.log('开始回放') - this.marker.moveAlong(this.lineArr, { - // 每一段的时长 - duration: this.duration,//可根据实际采集时间间隔设置 - // JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置 - autoRotation: true, - }); - }) - },2000) + // setTimeout(()=>{ + // AMap.plugin('AMap.MoveAnimation', () => { + // console.log('开始回放') + // this.marker.moveAlong(this.lineArr, { + // // 每一段的时长 + // duration: this.duration,//可根据实际采集时间间隔设置 + // // JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置 + // autoRotation: true, + // }); + // }) + // },2000) + this.marker.moveAlong(this.lineArr, { + // 每一段的时长 + duration: 200,//可根据实际采集时间间隔设置 + // JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置 + autoRotation: true, + }); + }, }, }