From 53cd28807bd470d1145df9e4ecbe0f34465e6d4d Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Fri, 22 May 2026 14:14:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=97=E6=B3=95loading=20=20=E8=A3=85?= =?UTF-8?q?=E9=85=8D=E5=9B=BE=20=E9=A6=96=E5=85=88=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E9=83=BD=E4=B8=AD=E5=9B=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map.jsx | 12 +++++++ src/components/devices/DeviceOverviewPage.tsx | 19 +++++++---- src/pages/Agri.jsx | 33 +++++++++++++++---- 3 files changed, 51 insertions(+), 13 deletions(-) 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 && (