Constructor
- Description:
- 量算控制类,通过此类对象,可进行不同类型的量算操作,而不用多次new 不同类型的量算对象。
Parameters:
Name |
Type |
Description |
viewer |
Cesium.viewer
|
地图viewer对象 |
obj |
Object
|
基础配置 |
Members
canEdit
Properties:
Name |
Type |
Attributes |
Default |
Description |
canEdit |
Boolean
|
<optional>
|
true
|
测量对象是否可编辑 |
intoEdit
Properties:
Name |
Type |
Attributes |
Default |
Description |
intoEdit |
Boolean
|
<optional>
|
true
|
绘制完成后,是否进入编辑状态(当canEdit==true,才起作用) |
measureObjArr
Properties:
Name |
Type |
Description |
measureObjArr |
Array
|
测量对象数组 |
nowDrawMeasureObj
Properties:
Name |
Type |
Description |
nowDrawMeasureObj |
Object
|
当前测量对象 |
nowDrawMeasureObj
Properties:
Name |
Type |
Description |
nowDrawMeasureObj |
Object
|
当前绘制对象,绘制完成后为undifined |
nowEditMeasureObj
Properties:
Name |
Type |
Description |
nowEditMeasureObj |
Object
|
当前编辑对象,编辑完成后为undifined |
Methods
bindEdit()
- Description:
changeCursor(isopen)
- Description:
Parameters:
Name |
Type |
Description |
isopen |
Boolean
|
false为默认鼠标样式 |
clear()
- Description:
destroy()
- Description:
done()
- Description:
endEdit()
- Description:
getMeasureObjById(id) → {Object}
- Description:
Parameters:
Name |
Type |
Description |
id |
*
|
|
Returns:
measureObj为图层对象,index为图层对象在数组中位置
-
Type
-
Object
getMeasureObjByObjId(id) → {Object}
- Description:
Parameters:
Name |
Type |
Description |
id |
*
|
|
Returns:
measureObj为图层对象,index为图层对象在数组中位置
-
Type
-
Object
on(type, fun)
- Description:
Parameters:
Name |
Type |
Description |
type |
String
|
事件类型(startEdit 开始编辑时 / endEdit 编辑结束时 / end 创建完成后) |
fun |
function
|
绑定函数 |
removeOne(measureObj)
- Description:
Parameters:
Name |
Type |
Description |
measureObj |
Object
|
|
setUnit()
- Description:
start(opt)
- Description:
Parameters:
Name |
Type |
Description |
opt |
Object
|
Properties
Name |
Type |
Description |
type |
Number
|
量算类型(1~空间距离测量/2~贴地距离测量/3~空间面积测量/4~高度测量/5~三角测量/6~坐标量算/7~方位角测量/8~剖面测量/9~单点坡度) |
|