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