获取当前的相机位置信息
获取当前相机的信息
Javascript
var oPos=viewer.camera.position;
var oDirection=viewer.camera.direction;
var oUp=viewer.camera.up;
定位指定位置
Javascript
viewer.camera.flyTo({
duration:1.5,//时长
destination: new LSGlobe.Cartesian3(oPos.x, oPos.y, oPos.z),
orientation: {
direction: new LSGlobe.Cartesian3(oDirection.x, oDirection.y,oDirection.z),
up: new LSGlobe.Cartesian3(oUp.x, oUp.y, oUp.z)
}
})