From e0231ffda6fd20fd3a2edfc80e0e10437967c5cd Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Fri, 19 May 2023 02:22:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=BD=A6=E5=8A=A8=E7=94=BB=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/record/logic/play.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/matrix-middle-service-web/src/views/record/logic/play.ts b/frontend/matrix-middle-service-web/src/views/record/logic/play.ts index 47ff638..17d75ec 100644 --- a/frontend/matrix-middle-service-web/src/views/record/logic/play.ts +++ b/frontend/matrix-middle-service-web/src/views/record/logic/play.ts @@ -14,14 +14,19 @@ export function playAnimation(map,data,line){ return new AMap.LngLat(item.longitude, item.latitude) }) + let index = 0 data.animateMarker.stopMove(); data.animateMarker.on("movealong",()=>{ // map.add(data.animateMarker) }) data.animateMarker.on("moveend",()=>{ - // setTimeout(()=>{ - // map.remove(data.animateMarker) - // },100) + index++ + + if(index === line.length-1){ + setTimeout(()=>{ + map.remove(data.animateMarker) + },100) + } }) let polyline = new AMap.Polyline({ path: path,