点的处理
Members
(static) aroundPoint
固定点 向四周旋转
(static) windingPoint
绕点 环绕飞行
(inner) cart2Pos
获取相机可视区域
Methods
(static) addPositionsHeight(positions, height) → {Array}
在坐标基础海拔上增加指定的海拔高度值
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array | Cartesian3类型的数组 |
height |
Number | 高度值 |
Returns:
Cartesian3类型的数组
- Type
- Array
(static) cart3Equals(left, right, precisionopt) → {Boolean}
判断两个点是否相等
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
left |
Cartesian3 | 左点 |
||
right |
Cartesian3 | 右点 |
||
precision |
Number |
<optional> |
0
|
误差范围 |
Returns:
误差范围内是否相等
- Type
- Boolean
(static) centerOfMass(positions, height) → {Cesium.Cartesian3}
Turf求面的中心点
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array | Cesium.Cartesians3 数组 |
height |
Number | 高度 |
Returns:
- Type
- Cesium.Cartesian3
(static) formatNum(num, digits) → {Number}
格式化 数字 小数位数
Parameters:
Name | Type | Description |
---|---|---|
num |
Number | 要格式化的数字 |
digits |
Number | 小数位数 |
Returns:
- Type
- Number
(static) formatPosition(position) → {Object}
格式化坐标点为可显示的可理解格式(如:经度x:123.345345、纬度y:31.324324、高度z:123.1)。
Parameters:
Name | Type | Description |
---|---|---|
position |
Cesium.Cartesian3 | 位置信息 |
Returns:
- Type
- Object
(static) formatRectangle(rectangle) → {Object}
格式化Rectangle
Parameters:
Name | Type | Description |
---|---|---|
rectangle |
Cesium.Rectangle |
Returns:
- Type
- Object
(static) getCameraView(viewer, isToWgs) → {Object}
提取相机视角范围参数
Parameters:
Name | Type | Description |
---|---|---|
viewer |
viewer | 视图 |
isToWgs |
Boolean | 是否需要转换wgs |
Returns:
- Type
- Object
(static) getCenter(viewer, isToWgs) → {Object}
提取屏幕中心点坐标
Parameters:
Name | Type | Description |
---|---|---|
viewer |
* | |
isToWgs |
* |
Returns:
- Type
- Object
(static) getCurrentMousePosition(scene, position, noPickEntity)
获取鼠标当前的屏幕坐标位置的三维Cesium坐标
Parameters:
Name | Type | Description |
---|---|---|
scene |
Cesium.Scene | |
position |
Cesium.Cartesian2 | 二维屏幕坐标位置 |
noPickEntity |
Cesium.Entity | 排除的对象(主要用于绘制中,排除对自己本身的拾取) |
(static) getExtent(target, opts) → {Object}
提取地球视域边界
Parameters:
Name | Type | Description |
---|---|---|
target |
* | |
opts |
* |
Returns:
- Type
- Object
(static) getMaxHeight(positions, defaultVal)
获取坐标数组中最高高程值
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array | Array |
defaultVal |
Number | 默认高程值 |
(static) getPositionValue(position) → {Cesium.Cartesian3}
/获取position的最终value值,因为cesium经常属性或绑定一层,通过该方法可以内部去判断是否有getValue或_value进行取最终value值。
Parameters:
Name | Type | Description |
---|---|---|
position |
Cesium.Cartesian3 | 位置信息 |
Returns:
- Type
- Cesium.Cartesian3
(static) getRectangle(positions, isFormat) → {Cesium.Rectangle}
获取坐标的边界
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array | 点数组 |
isFormat |
Boolean | 是否需要格式化 |
Returns:
- Type
- Cesium.Rectangle
(static) getSurface3DTilesHeight()
获取坐标的 贴模型高度
opts支持: 是否异步 asyn:true 异步回调方法calback返回“新高度”和“原始的Cartographic坐标”
(static) getSurfaceHeight()
获取坐标的贴地(或贴模型)高度
opts支持: 是否在has3dtiles:true , 是否异步 asyn:true 异步回调方法calback
(static) getSurfaceTerrainHeight()
获取坐标的 贴地高度
opts支持: 是否异步 asyn:true 异步回调方法calback
(static) isInPoly(position, entity) → {Boolean}
点 是否在 entity(面、圆、多边形)内
Parameters:
Name | Type | Description |
---|---|---|
position |
Cesium.Cartesian3 | 点信息 |
entity |
Object | 实体对象 |
Returns:
是否在内
- Type
- Boolean
(static) isPolygonIntersect(ptArray1, ptArray1) → {Boolean}
判断两个多边形是否相交
Parameters:
Name | Type | Description |
---|---|---|
ptArray1 |
Array | 经纬度点组1 点格式[119.28695,33.5704] |
ptArray1 |
Array | 经纬度点组2 |
Returns:
是否相交
- Type
- Boolean
(static) pickCenterPoint(scene) → {Cesium.Cartesian3}
取屏幕中心点坐标
Parameters:
Name | Type | Description |
---|---|---|
scene |
* |
Returns:
- Type
- Cesium.Cartesian3
(static) setPositionsHeight(positions, height) → {Array}
设置坐标中海拔高度为指定的高度值
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array | Cartesian3类型的数组 |
height |
Number | 高度值 |
Returns:
Cartesian3类型的数组
- Type
- Array
(static) setPositionSurfaceHeight()
设置坐标中海拔高度为贴地或贴模型的高度
opts支持: 是否在has3dtiles:true , 是否异步 asyn:true 异步回调方法calback