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({