算法loading 装配图 首先定位都中国

This commit is contained in:
mmc
2026-05-22 14:14:30 +08:00
parent e642ecbd16
commit 53cd28807b
3 changed files with 51 additions and 13 deletions

View File

@@ -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 () => {