From 380fbbe67c9de00e7ac41e59ac079080d401b657 Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Thu, 18 May 2023 16:04:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8A=A8=E6=80=81=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E8=B7=AF=E7=BA=BF=20=E5=B9=B6=20=E8=AE=A1=E7=AE=97=20?= =?UTF-8?q?=E6=9C=80=E9=AB=98=20=E5=8F=8A=20=E5=B9=B3=E5=9D=87=20=E9=80=9F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/record/AMapLocation.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/matrix-middle-service-web/src/views/record/AMapLocation.vue b/frontend/matrix-middle-service-web/src/views/record/AMapLocation.vue index ea5760a..2bb1096 100644 --- a/frontend/matrix-middle-service-web/src/views/record/AMapLocation.vue +++ b/frontend/matrix-middle-service-web/src/views/record/AMapLocation.vue @@ -250,8 +250,13 @@ function toggleTraffic() { function changeShowLines(){ console.log("options.showLines",options.showLines) console.log("view.lines",view.lines) - drawMarkers(map,data,options,view.lines.filter((_,index)=>options.showLines.includes(index))) - drawLines(map,data,view.lines.filter((_,index)=>options.showLines.includes(index))) + + let showLines = view.lines.filter((_,index)=>options.showLines.includes(index)) + drawMarkers(map,data,options,showLines) + drawLines(map,data,showLines) + + view.speed.max = (getMaxSpeed(showLines.flat()) * 3.6).toFixed(2); + view.speed.avg = (getAvgSpeed(showLines.flat()) * 3.6).toFixed(2); } AMapLoader.load({