Commit f25765a9 by wangzhihui

轨迹bug修复

1 parent 06f373f1
......@@ -60,8 +60,7 @@ const replay = {
replay.distance=replay.dis.reduce(function (prev, cur, index, arr) {
return prev + cur;
});
replay.distance= parseInt(replay.distance/1000)//算出轨迹的距离(km)
console.log( replay.distance,replay.getSpeed(replay.speed, replay.distance))
replay.distance=replay.distance/1000//算出轨迹的距离(km)
const firstItem = replay.data[0];
replay.navg= AMap.invoke('LuShu', replayData, {
defaultContent: replay.getNavgInfoContent(firstItem),
......@@ -254,7 +253,7 @@ const replay = {
let timeArr = [[40, 30, 16], [30, 20, 12], [20, 12, 8], [5, 3, 2]] // 慢 正常 快 很快
let speed;
let disM=dis*1000
if (dis >= 100) { // 100公里以上
speed = Math.floor((disM/ timeArr[idx][0]))
} else if (dis > 10 && dis< 100) { // 10-100公里
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!