forked from drone/command-center-dashboard

罗广辉
2025-04-21 22a23b05b25e4b5c616f65989ac0ca16324f4c29
src/hooks/useMapAggregation/useMapAggregation.js
@@ -1,8 +1,7 @@
import * as Cesium from 'cesium'
import aggregationImg from '@/assets/images/home/useUavHome/aggregation.png'
import eventAggregationImg from '@/assets/images/home/useUavHome/eventAggregationImg.png'
import uavImg from '@/assets/images/home/useUavHome/uavImg.png'
import _ from 'lodash'
import { getEventImage } from '@/utils/stateToImageMap/event'
import { getDroneStatusImage } from '@/utils/stateToImageMap/drone'
@@ -15,6 +14,7 @@
// hook
import { useMapHandlerClick } from '@/hooks/components/useMapHandlerClick'
import { MAP_LEVEL } from '@/const/drc'
/**
 * 机巢聚合功能
@@ -56,19 +56,8 @@
    }
  })
  let scalingJudgment = [
    { name: '县', splashedList: [], gJson: null, show: false, outline: {}, value: [0, 48651], height: 31753 },
    { name: '市', splashedList: [], gJson: null, show: false, outline: {}, value: [48651, 314863], height: 257731 },
    {
      name: '省',
      splashedList: [],
      gJson: null,
      show: false,
      outline: {},
      value: [314863, 3796280000],
      height: 1987280,
    },
  ]
  let scalingJudgment = _.cloneDeep(MAP_LEVEL).map(i => ({...i,gJson: null,splashedList:[], show: false, outline: {}}))
  let viewer = null
  let active = null
@@ -100,7 +89,7 @@
    // 根据高度展示对应的 gJson
    for (let [index, item] of scalingJudgment.entries()) {
      if (!item.show) return
      if (height > item.value[0] && height <= item.value[1]) {
      if (height > item.heightRange[0] && height <= item.heightRange[1]) {
        if (active === item.name) return
        active = item.name
        removeEntities()