地图上显示无人机
This commit is contained in:
@@ -692,16 +692,16 @@ 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 // 初始化直接到位,无需动画
|
||||
});
|
||||
//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) { }
|
||||
@@ -776,6 +776,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices =
|
||||
|
||||
|
||||
devices.forEach((device, index) => {
|
||||
console.log(device, "devicedd")
|
||||
|
||||
const raw = device?.lastRunningStatus || {};
|
||||
const parsed = parseLngLat(raw.longitude, raw.latitude);
|
||||
|
||||
@@ -242,12 +242,12 @@ export default function DeviceOverviewPage({ devices, planedevices, devicesAll,
|
||||
<div><span style={{ color: '#1890ff' }}>———</span> 巡检航线</div>
|
||||
<div><span style={{ color: '#fa8c16' }}>———</span> 机器人路径</div>
|
||||
<div><span style={{ color: '#52c41a' }}>———</span> 清洗路径</div>
|
||||
<div><span style={{ color: '#52c41a' }}>●</span> 设备位置</div>
|
||||
<div>🚗 设备位置</div>
|
||||
<div><span style={{ color: '#1890ff' }}>●</span> 补给/充电点</div>
|
||||
<div><span style={{ color: '#ff4d4f' }}>■</span> 障碍/禁入区</div>
|
||||
</div>
|
||||
</div>
|
||||
<CesiumMap />
|
||||
<CesiumMap devices={devicesAll} />
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user