| | |
| | | |
| | | <script lang="ts" setup> |
| | | import * as Cesium from 'cesium' |
| | | import { computed, onMounted, reactive, ref, watch, WritableComputedRef } from 'vue' |
| | | import { computed, onMounted, reactive, ref, watch, onUnmounted } from 'vue' |
| | | import { EDeviceTypeName, ELocalStorageKey } from '/@/types' |
| | | import rc from '/@/assets/icons/rc.png' |
| | | import { OnlineDevice, EModeCode, OSDVisible, EDockModeCode, DeviceOsd, EDockModeText, EModeText } from '/@/types/device' |
| | |
| | | } |
| | | cesium.addPoint(setting) |
| | | // 无人机路线轨迹 |
| | | // 判断是否存在done_route |
| | | if (cesium.getEntityById('drone_route')) { |
| | | cesium.removeById('drone_route') |
| | | } |
| | | const routeTrajectory = { |
| | | longitude: 115.85666327144976, |
| | | latitude: 28.62452712442823, |
| | |
| | | const setting = { |
| | | longitude: data.dockInfo[data.currentSn].basic_osd?.longitude, |
| | | latitude: data.dockInfo[data.currentSn].basic_osd?.latitude, |
| | | id: `drone_dock_${new Date().getTime()}`, |
| | | billboard: { |
| | | image: getResource('dock.png'), |
| | | outlineWidth: 0, |
| | |
| | | height: 36, |
| | | scale: 1.0, |
| | | }, |
| | | id: 'aerodrome' |
| | | } |
| | | cesium.addPoint(setting) |
| | | // cesium.flyTo(setting) |
| | |
| | | previousPositions.value = [] |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | | cesium.removeAllPoint() |
| | | }) |
| | | |
| | | function getOnlineTopo () { |
| | | getDeviceTopo(workSpaceId.value).then((res) => { |
| | | if (res.code !== 0) { |