This commit is contained in:
liqi 2025-04-13 16:24:01 +08:00
parent a54a661c12
commit 3b8de544b4
1 changed files with 60 additions and 60 deletions

View File

@ -101,67 +101,67 @@ export default {
}
},
mapNorth() {
let graphicLayer = new mars3d.layer.GraphicLayer();
window.marsMap.addLayer(graphicLayer);
const fixedRoute = new mars3d.graphic.FixedRoute({
name: "贴地表表面漫游",
position: {
type: "time", //
speed: 160,
list: [
[116.043233, 30.845286, 392.48],
[116.046833, 30.846863, 411.33],
[116.052137, 30.848801, 439.45],
[116.060838, 30.850918, 442.91],
[116.069013, 30.852035, 435.14],
[116.18739, 30.854441, 244.53],
[116.205214, 30.859332, 300.96]
]
},
clockLoop: false, //
camera: {
type: "gs",
pitch: -30,
radius: 500
},
// model: {
// show: true,
// url: "https://data.mars3d.cn/gltf/mars/qiche.gltf",
// scale: 0.2,
// minimumPixelSize: 50
// },
model: {
scale: 1,
url: "/uav/scene.gltf",
heading: 90,
mergeOrientation: true, // ,orientationheading
minimumPixelSize: 50
},
polyline: {
color: "rgba(255,0,0,0.5)",
width: 2,
showAll: true
},
path: {
color: "rgba(255,255,0,1.0)",
width: 4,
leadTime: 0
}
});
graphicLayer.addGraphic(fixedRoute);
fixedRoute.start();
// 1.
// const currentView = window.marsMap.getCameraView();
// // 2. heading0
// window.marsMap.setCameraView({
// lat: currentView.lat,
// lng: currentView.lng,
// alt: currentView.alt,
// heading: 0, //
// pitch: currentView.pitch,
// roll: currentView.roll
// let graphicLayer = new mars3d.layer.GraphicLayer();
// window.marsMap.addLayer(graphicLayer);
// const fixedRoute = new mars3d.graphic.FixedRoute({
// name: "",
// position: {
// type: "time", //
// speed: 160,
// list: [
// [116.043233, 30.845286, 392.48],
// [116.046833, 30.846863, 411.33],
// [116.052137, 30.848801, 439.45],
// [116.060838, 30.850918, 442.91],
// [116.069013, 30.852035, 435.14],
// [116.18739, 30.854441, 244.53],
// [116.205214, 30.859332, 300.96]
// ]
// },
// clockLoop: false, //
// camera: {
// type: "gs",
// pitch: -30,
// radius: 500
// },
// // model: {
// // show: true,
// // url: "https://data.mars3d.cn/gltf/mars/qiche.gltf",
// // scale: 0.2,
// // minimumPixelSize: 50
// // },
// model: {
// scale: 1,
// url: "/uav/scene.gltf",
// heading: 90,
// mergeOrientation: true, // ,orientationheading
// minimumPixelSize: 50
// },
// polyline: {
// color: "rgba(255,0,0,0.5)",
// width: 2,
// showAll: true
// },
// path: {
// color: "rgba(255,255,0,1.0)",
// width: 4,
// leadTime: 0
// }
// });
// graphicLayer.addGraphic(fixedRoute);
// fixedRoute.start();
// 1.
const currentView = window.marsMap.getCameraView();
// 2. heading0
window.marsMap.setCameraView({
lat: currentView.lat,
lng: currentView.lng,
alt: currentView.alt,
heading: 0, //
pitch: currentView.pitch,
roll: currentView.roll
});
}
}
};