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

@ -418,11 +418,13 @@ export default {
var url = "photon_tree.glb";
var height = 0;
viewer.entities.removeAll(); //entity
// 88.64349,
// 88.64349,
// 42.72285,
var position = Cesium.Cartesian3.fromDegrees(
88.69159,
42.73185,
88.64349,
42.72285,
// 88.69159,
// 42.73185,
height
);
var heading = Cesium.Math.toRadians(191); //310
@ -447,13 +449,29 @@ export default {
maximumScale: 20000, //minimumPixelSize
},
});
// that.setTrees(viewer, orientation);
viewer.trackedEntity = modelEntity; //
//
viewer.zoomTo(
modelEntity,
new Cesium.HeadingPitchRange(0.3, -0.5, 900)
var destination_tree = Cesium.Cartesian3.fromDegrees(
88.64349,
42.72285,
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();
//
var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
@ -820,10 +838,9 @@ export default {
},
beforeUnmount() {
// viewer.destroy();
this.viewer.entities.removeAll()
this.viewer.entities.removeAll();
this.viewer = null;
},
};
</script>
<style>

File diff suppressed because it is too large Load Diff