fix:首页数据

This commit is contained in:
shijing 2024-04-03 17:07:45 +08:00
parent b9a2d069e2
commit 145b971fdd
2 changed files with 1259 additions and 947 deletions

View File

@ -421,8 +421,10 @@ export default {
// 88.64349, // 88.64349,
// 42.72285, // 42.72285,
var position = Cesium.Cartesian3.fromDegrees( var position = Cesium.Cartesian3.fromDegrees(
88.69159, 88.64349,
42.73185, 42.72285,
// 88.69159,
// 42.73185,
height height
); );
var heading = Cesium.Math.toRadians(191); //310 var heading = Cesium.Math.toRadians(191); //310
@ -447,13 +449,29 @@ export default {
maximumScale: 20000, //minimumPixelSize maximumScale: 20000, //minimumPixelSize
}, },
}); });
// that.setTrees(viewer, orientation); var destination_tree = Cesium.Cartesian3.fromDegrees(
viewer.trackedEntity = modelEntity; // 88.64349,
// 42.72285,
viewer.zoomTo( 900
modelEntity,
new Cesium.HeadingPitchRange(0.3, -0.5, 900)
); );
var roll_tree = Cesium.Math.toRadians(-100);
var hpr_tree = new Cesium.HeadingPitchRoll(heading, pitch, roll_tree);
var orientation_camer = Cesium.Transforms.headingPitchRollQuaternion(
destination_tree,
hpr_tree
);
viewer.camera.setView({
destination: destination_tree,
orientation: orientation_camer,
});
// that.setTrees(viewer, orientation);
// viewer.trackedEntity = modelEntity; //
// //
// viewer.zoomTo(
// modelEntity,
// new Cesium.HeadingPitchRange(0.3, -0.5, 900)
// );
that.getEquipmentList(); that.getEquipmentList();
// //
var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas); var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
@ -820,10 +838,9 @@ export default {
}, },
beforeUnmount() { beforeUnmount() {
// viewer.destroy(); // viewer.destroy();
this.viewer.entities.removeAll() this.viewer.entities.removeAll();
this.viewer = null; this.viewer = null;
}, },
}; };
</script> </script>
<style> <style>

File diff suppressed because it is too large Load Diff