riku
2024-08-23 1788c96aea9247cc36ef8b82734997f1a6a92fb4
src/model/FactorDatas.js
@@ -1,5 +1,5 @@
import { Factor } from "./Factor";
import calculate from "@/utils/map/calculate";
import { Factor } from './Factor';
import calculate from '@/utils/map/calculate';
/**
 *
@@ -47,6 +47,9 @@
        }]
        */
  setData: function (dataList, drawMode, callback) {
    if (dataList.length == 0) {
      return;
    }
    this.clearData();
    dataList.forEach((d) => {
@@ -62,13 +65,15 @@
      });
    });
    this.convertGPS(this.lnglats_GPS, callback);
  },
  // 新增一个新数据
  addData: function (dataList, drawMode, callback) {
    if (dataList.length == 0) {
      return;
    }
    var newGps = [];
    dataList.forEach((data) => {
      this.times.push(data.time);
@@ -162,7 +167,7 @@
  // 获取数据长度
  length: function () {
    return this.lnglats_GD.length;
  },
  }
};
export { FactorDatas };