src/utils/map/sector.js
@@ -1,25 +1,25 @@
import { map, object3Dlayer } from './index_old';
import calculate from './calculate';
import imgLocation from '@/assets/mipmap/location.png';
var _defaultDeg = 30,
  _sector = undefined,
  _sectorViews = {};
function clearSector() {
  var list = [];
  for (const key in _sectorViews) {
    list.push(_sectorViews[key]);
  }
  if (list.length > 0) {
    map.remove(list);
    _sectorViews = {};
  }
  if (_sector) {
    object3Dlayer.remove(_sector);
  }
}
export default {
  clearSector() {
    var list = [];
    for (const key in _sectorViews) {
      list.push(_sectorViews[key]);
    }
    if (list.length > 0) {
      map.remove(list);
      _sectorViews = {};
    }
    if (_sector) {
      object3Dlayer.remove(_sector);
    }
  },
  drawSector(fDatas, i) {
    const lnglat = fDatas.lnglats_GD[i];
    let windDir = fDatas.factor[17].datas[i].factorData;
@@ -31,7 +31,7 @@
      return;
    }
    if (_sector != undefined) {
      clearSector();
      this.clearSector();
    }
    // eslint-disable-next-line no-undef
@@ -126,7 +126,7 @@
      styles: [
        {
          icon: {
            img: './asset/mipmap/location.png',
            img: imgLocation,
            size: [16, 16], //可见区域的大小
            ancher: [8, 16], //锚点
            fitZoom: 18, //最合适的级别
@@ -152,7 +152,7 @@
      styles: [
        {
          icon: {
            img: './asset/mipmap/location.png',
            img: imgLocation,
            size: [16, 16], //可见区域的大小
            ancher: [8, 16], //锚点
            fitZoom: 18, //最合适的级别
@@ -182,7 +182,7 @@
      styles: [
        {
          icon: {
            img: './asset/mipmap/location.png',
            img: imgLocation,
            size: [16, 16], //可见区域的大小
            ancher: [8, 16], //锚点
            fitZoom: 18, //最合适的级别
@@ -207,7 +207,7 @@
      styles: [
        {
          icon: {
            img: './asset/mipmap/location.png',
            img: imgLocation,
            size: [16, 16], //可见区域的大小
            ancher: [8, 16], //锚点
            fitZoom: 18, //最合适的级别