diff --git a/src/components/Map.jsx b/src/components/Map.jsx index f1c65d9..97efbbb 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -692,6 +692,18 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices = viewer.scene.requestRenderMode = true; // 👈 加这个(只在需要时渲染) viewer.scene.globe.enableLighting = false; + viewer.camera.flyTo({ + // 中国中心大致坐标 + 合适高度(200万米) + destination: window.Cesium.Cartesian3.fromDegrees(103.84, 31.15, 2000000), + orientation: { + heading: window.Cesium.Math.toRadians(0), + pitch: window.Cesium.Math.toRadians(-90), + roll: 0 + }, + duration: 0 // 初始化直接到位,无需动画 + }); + + try { fetchPublishedLayers() } catch (e) { } return () => { diff --git a/src/components/devices/DeviceOverviewPage.tsx b/src/components/devices/DeviceOverviewPage.tsx index 6a3cf7a..51fe403 100644 --- a/src/components/devices/DeviceOverviewPage.tsx +++ b/src/components/devices/DeviceOverviewPage.tsx @@ -22,6 +22,7 @@ import DroneLivePlayer from '../VolcRtcPlayer.jsx'; import AgoraTextTest from '../AgoraRtc.tsx'; import { useWebRTCPlayer } from '../useWebRTCStream.tsx'; import VideoPlayer from '../VideoPlayer.tsx.tsx'; +import CesiumMap from '../Map.jsx'; const { Content } = Layout; const { Text, Title } = Typography; @@ -234,8 +235,8 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll, 装备协同态势图} extra={ - - + ); @@ -4775,8 +4789,13 @@ export default function Agri() { > 提交热成像分析 - - + ); @@ -4979,7 +4998,7 @@ export default function Agri() {
- {segResult.image?.overlay_image_url && ( + {segResult?.image?.overlay_image_url && (