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