new BoxClip(map [, options])
场景剖切构造函数
Parameters:
| Name | Type | Argument | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
map |
Glodon.CIMCube | CIMCube实例 | |||||||||||||
options |
Object |
<optional> |
可选配置参数
Properties
|
Members
-
UI
-
获取组件UI。
Methods
-
clear()
-
清空场景
-
clip(target)
-
执行剖切;
Parameters:
Name Type Description targetclippableTarget 裁剪对象,参见文档,全局模式不需要该参数; -
clipEx(posA, posB, height, offset, arrTarget)
-
执行剖切,扩展版,支持指定多个图层的剖切,支持自定义区域;
Parameters:
Name Type Description posAObject 经纬(角度) Properties
Name Type Description lonNumber 经度(角度) latNumber 纬度(角度) posBObject 经纬(角度) Properties
Name Type Description lonNumber 经度(角度) latNumber 纬度(角度) heightNumber 盒体高度(米); offsetNumber = 0 盒体距离地表的高度(米),默认0米,表示贴地; arrTargetclippableTarget | Array.<clippableTarget> | undefined = undefined 要裁剪对象的数组,undefined表示全部图层,也可传入单个图层(非数组),默认undefined; -
dispose()
-
销毁组件
-
getState()
-
设置当前剖切盒状态(位置,颜色,显隐);
Returns:
状态- Type
- Object
-
off(type, listener)
-
移除事件监听
Parameters:
Name Type Description typeString 事件类型 listenerfunction 事件处理函数 -
on(type, listener, thisArg)
-
添加事件监听
Parameters:
Name Type Description typeString 事件类型 listenerfunction 事件处理函数 thisArgObject 事件处理函数的this对象 Returns:
事件监听器- Type
- Object
-
pickOff()
-
关闭拾取功能。
-
pickOn()
-
开启拾取,只有LAYER模式才支持拾取具体图层。
-
setState(state)
-
获取当前剖切盒状态(位置,颜色,显隐);
Parameters:
Name Type Description stateObject 状态 Properties
Name Type Description uiObject 状态.ui Properties
Name Type Description colorString 状态.ui.color alphaNumber 状态.ui.alpha visibilityBoolean 状态.ui.visibility paramObject 状态.param Properties
Name Type Description posAObject 状态.param.posA Properties
Name Type Description lonNumber 状态.param.posA.lon latNumber 状态.param.posA.lat posBObject 状态.param.posB Properties
Name Type Description lonNumber 状态.param.posB.lon latNumber 状态.param.posB.lat heightNumber 状态.param.height offsetNumber 状态.param.offset targetObject 状态.param.target