支持动态筛选路线 并 计算 最高 及 平均 速度
This commit is contained in:
parent
76dcedce51
commit
380fbbe67c
@ -250,8 +250,13 @@ function toggleTraffic() {
|
|||||||
function changeShowLines(){
|
function changeShowLines(){
|
||||||
console.log("options.showLines",options.showLines)
|
console.log("options.showLines",options.showLines)
|
||||||
console.log("view.lines",view.lines)
|
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({
|
AMapLoader.load({
|
||||||
|
Loading…
Reference in New Issue
Block a user