| | |
| | | import jaGeojsonRaw from '@/assets/geojson/ja.geojson?raw' |
| | | import DevicePopup from './components/DevicePopup.vue' |
| | | import DronePopup from './components/DronePopup.vue' |
| | | import dayjs from 'dayjs' |
| | | import { |
| | | createDroneTrackMaterial, |
| | | createRadialGradientMaterial, |
| | |
| | | let droneTrackTickHandler = null |
| | | let droneTrackStartTime = null |
| | | let droneTrackRuntime = [] |
| | | let mapReadyHandled = false |
| | | let favoritePulseRafId = null |
| | | let favoritePulseStartAt = 0 |
| | | let favoritePulseElapsed = 0 |
| | |
| | | const loadPartitions = async () => { |
| | | if (!viewer) return |
| | | try { |
| | | const res = await fwAreaDivideListApi() |
| | | const res = await fwAreaDivideListApi({ |
| | | isSetSceneManage: 1, |
| | | flyTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), |
| | | }) |
| | | await renderPartitions(res?.data?.data ?? []) |
| | | } catch (error) { |
| | | await renderPartitions([]) |
| | |
| | | } |
| | | |
| | | const handleMapReady = ({ viewer: mapViewer, publicCesium: mapPublic }) => { |
| | | if (mapReadyHandled) return |
| | | mapReadyHandled = true |
| | | viewer = mapViewer |
| | | publicCesium = mapPublic |
| | | ensureCockpitPrimitiveLayer() |