Classes
- BaseLayerCollection
- BigBuildingLayer
- BigLineLayer
- BigPointLayer
- EarthCompass
- FeatureLayer
- GeoBuilding
- GeoBuildingLayerRenderer
- GeoBuildingRenderer
- GeoFlyLine
- GeoHeatMap
- GeoHeatMapLayerRenderer
- GeoHeatMapRenderer
- GeoLine
- GeoLineLayerRenderer
- GeoLineRenderer
- GeoObject
- GeoODLine
- GeoPoint
- GeoPointLayerRenderer
- GeoPointRenderer
- GeoPolygon
- GeoPolygonLayerRenderer
- GeoPolygonRenderer
- GeoWater
- GeoWaterLayerRenderer
- GeoWaterRenderer
- InfoWindow
- Label
- Layer
- LayerCollection
- LayerInfoWindow
- LayerLabel
- Map
- MapStyle
- TerrainLayer
- ThingLayer
- TileLayer
- TileLayerStyle
- UserLayerCollection
- Util
Members
(static) VERSION :String
获取Uearth版本信息
Type:
Methods
(static) earthCameraRotateByTime(param)
相机根据时间和角度旋转(自身旋转)
Parameters:
Name |
Type |
Description |
param |
Object
|
Properties
Name |
Type |
Description |
angle |
Number
|
旋转角度 |
time |
Number
|
旋转总时间 |
clockwise |
Boolean
|
是否顺时针 默认true 如果是false则逆时针旋转 |
complete |
function
|
回调函数 |
|
Example
//摄影机在10秒钟转360度
app.camera.earthCameraRotateByTime({
time:10000,
angle:360,
complete:function(){
console.log('earthCameraRotateByTimeFinished');
});
(static) earthFlyRotateBySpeed(param)
地球上根据目标点 时间 旋转角度绕点旋转
Parameters:
Name |
Type |
Description |
param |
Object
|
旋转参数
Properties
Name |
Type |
Description |
speed |
Number
|
旋转速度 |
target |
Array
|
目标点世界坐标 |
disablePick |
Boolean
|
是否关闭pick 默认true |
clockwise |
Boolean
|
是否顺时针 默认true 如果是false则逆时针旋转 |
complete |
function
|
回调函数 |
|
Example
//摄影机绕目的地旋转 速度为1 停止旋转请使用app.camera.stopEarthFly();
app.camera.earthFlyRotateBySpeed({
target:[2226621.946229113, 4056906.8892574753, 4388911.615628255],
speed:1,
complete: function () {
console.log('earthFlyRotateBySpeedFinished');
}
});
(static) earthFlyRotateByTime(param)
地球上根据目标点 时间 旋转角度绕点旋转
Parameters:
Name |
Type |
Description |
param |
Object
|
旋转参数
Properties
Name |
Type |
Description |
target |
Array
|
目标点世界坐标 |
angle |
Number
|
旋转角度 单位 角度 |
time |
Number
|
旋转总时间 单位 毫秒 |
disablePick |
Boolean
|
是否关闭pick 默认true |
clockwise |
Boolean
|
是否顺时针 默认true 如果是false则逆时针旋转 |
complete |
function
|
回调函数 |
|
Example
//摄影机绕目的地旋转 10秒钟旋转360度 旋转完毕后会停止
app.camera.earthFlyRotateByTime({
target:[2226621.946229113, 4056906.8892574753, 4388911.615628255],
time:10000,
angle:360,
complete: function () {
console.log('earthFlyRotateByTimeFinished');
}
});
(static) earthFlyTo(param) → {void}
地球上的飞
Parameters:
Name |
Type |
Description |
param |
Object
|
参数列表
Properties
Name |
Type |
Description |
time |
Number
|
飞行时间 ms |
object |
Object
|
飞到对象 如果传入param,object 则param.lonlat失效 |
heading |
Number
|
水平角(方位角) 单位度 |
pitch |
Number
|
垂直角(俯仰角) 单位度 |
lonlat |
Array
|
要飞到的目标点的经纬度 |
disablePick |
Boolean
|
是否关闭pick 默认true |
height |
Number
|
摄影机离地高度 |
directFly |
Boolean
|
是否沿着直线飞行,不优化路线(可能穿地球而过) 默认false |
complete |
function
|
回调函数 |
|
Returns:
-
Type
-
void
Example
//飞到指定位置
app.camera.earthFlyTo({
time: 3000,
lonlat: [116.39, 39.96],
height: 5000,
heading: 90,
pitch: 45,
complete: function () {
console.log('earth fly finished');
}
});
//飞到物体
let geoPolygon = app.query('.GeoPolygon')[0];
app.camera.earthFlyTo({
time: 3000,
object: geoPolygon,
complete: function () {
console.log('earth fly finished');
}
});
(static) getCurrentMap() → {CMAP.Map}
获取当前map对象
Returns:
-
Type
-
CMAP.Map
(static) stopEarthFly()
停止地球上的飞行和旋转动作 停止后会自动恢复飞行或旋转前的pick状态
Example
//停止地球上的飞行和旋转动作
app.camera.stopEarthFly();