fix:首页数据
This commit is contained in:
parent
b9a2d069e2
commit
145b971fdd
|
@ -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
Loading…
Reference in New Issue