// 直接定位
viewer.flyTo(entitys);
viewer.zoomTo(entitys);
//根据经纬度定位
viewer.scene.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(
111,
32,
1000
),
});
//根据边界定位
const boundingSphere = Cesium.BoundingSphere.fromPoints(position);
viewer.camera.flyToBoundingSphere(boundingSphere, {
duration: 3,
offset: new Cesium.HeadingPitchRange(0, -Math.PI / 4, boundingSphere.radius * 5.0), // 相机偏移量
maximumHeight: 1000, // 最大高度
});
cesium 定位到实体
最新推荐文章于 2024-03-22 15:20:07 发布