Constructor
new CameraRotation(options)
Example
//1.绕某点旋转
var options = {
viewer : mainControl.viewer,
pitch : -30,
distance : 10,
duration : 10,
position : new GeoPosition(113.6570762373732890,34.8625017438331710,100000)
}
var rotation = new CameraRotation(options);
rotation.start();
//2.原地旋转
var options = {
viewer : mainControl.viewer,
pitch : -30,
distance : 0,
duration : 10,
position : new GeoPosition(113.6570762373732890,34.8625017438331710,100000)
}
var rotation = new CameraRotation(options);
rotation.start();
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 此对象具有下列属性:
Properties
|
Throws:
-
必须指定Viewer实例。
- Type
- Cesium.DeveloperError
Members
distance :Number
- Default Value:
- 5000
获取或设置视点到被观察点位置。单位为米。
Type:
- Number
duration :Number
- Default Value:
- 10
获取或设置转一周所需时间,单位为秒。
Type:
- Number
pitch :Number
- Default Value:
- -30
获取或设置视点的俯仰角,单位为度。
Type:
- Number
position :GeoPosition
获取或设置被观察点位置。
Type:
Methods
start()
开始旋转
stop()
停止旋转