new InstanceLayer(options)
InstanceLayer图层构造函数
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 图层配置参数
Properties
|
Extends
Members
-
alpha :Number
-
图层透明度 0.0~1.0
Type:
- Number
- Inherited From:
- Overrides:
- Default Value:
-
- 1.0
-
boundingSphere :BoundingSphere
-
图层包围球
Type:
- BoundingSphere
-
cacheable :Boolean
-
是否可缓存
Type:
- Boolean
- Inherited From:
- Overrides:
-
canHighlight :Boolean
-
可否高亮
Type:
- Boolean
- Inherited From:
- Overrides:
-
canSelected :Boolean
-
可否被选中
Type:
- Boolean
- Inherited From:
- Overrides:
-
doubleSided :Boolean
-
图层是否使用双面材质
Type:
- Boolean
-
enableMouseMove :Boolean
-
是否可以触发鼠标移动事件
Type:
- Boolean
- Inherited From:
- Overrides:
- Default Value:
-
- true
-
enableRealisticRendering :Boolean
-
图层是否使用真实渲染
Type:
- Boolean
-
glowColor :String
-
发光颜色
Type:
- String
- Inherited From:
- Overrides:
-
glowTimeInterval :number
-
闪烁的时间间隔
Type:
- number
- Inherited From:
- Overrides:
-
是否对图层树接口隐藏
Type:
- Boolean
- Inherited From:
- Overrides:
-
<readonly> id :String
-
id
Type:
- String
- Inherited From:
- Overrides:
-
isPipeline :Boolean
-
数据是否是管线类型
Type:
- Boolean
- Inherited From:
- Overrides:
-
matrix :Object
-
图层偏移
Type:
- Object
- Inherited From:
- Overrides:
-
name :String
-
图层名称
Type:
- String
- Inherited From:
- Overrides:
-
origin :Array
-
图层原点,数组中分别指定经度、纬度、高度
Type:
- Array
-
phongLighting :Boolean
-
图层是否使用一般的光照模型(冯氏光照)
Type:
- Boolean
-
pickable :Boolean
-
pickable
Type:
- Boolean
- Inherited From:
- Overrides:
-
<readonly> ready :Boolean
-
数据是否已经加载
Type:
- Boolean
- Inherited From:
- Overrides:
-
rotationPointOffset :Cartesian3
-
图层指定的旋转点,模型坐标系下基于原点的偏移点,默认是包围盒中心点
Type:
- Cartesian3
- Inherited From:
- Overrides:
-
selectedColor :String
-
选中颜色
Type:
- String
- Inherited From:
- Overrides:
-
show :Boolean
-
图层是否显示
Type:
- Boolean
- Overrides:
-
<readonly> type :String
-
图层类型
Type:
- String
- Inherited From:
- Overrides:
-
<readonly> url :String
-
图层url地址
Type:
- String
- Inherited From:
- Overrides:
Methods
-
addDragHandle(options)
-
在场景中添加操作句柄
Parameters:
Name Type Description optionsObject [optional], 配置参数 Properties
Name Type Description dragModelTipUIDragModelTipUI [optional], 自定义的tip ui实例 tipsString [optional] default:'单击鼠标左键选择需要操作的模型', 提示字符 showTipsBoolean [optional] default true, 是否显示提示字符 dragModelUIDragModelUI [optional], 自定义的模型实例; enableTranslationXBoolean [optional] default: true, // X轴平移 enableTranslationYBoolean [optional] default: true, // Y轴平移 enableTranslationZBoolean [optional] default: true, // Z轴平移 enableTranslationXYBoolean [optional] default: true, // XOY面平移 enableTranslationYZBoolean [optional] default: true, // YOZ面平移 enableTranslationXZBoolean [optional] default: true, // XOZ面平移 enableRotationXBoolean [optional] default: true, // X轴旋转 enableRotationYBoolean [optional] default: true, // X轴旋转 enableRotationZBoolean [optional] default: true, // X轴旋转 enableScaleXBoolean [optional] default: false, // X缩放 enableScaleYBoolean [optional] default: false, // Y缩放 enableScaleZBoolean [optional] default: false, // Z缩放 targetScaleRangeArray.<Number> [optional] default: [0.1, +infinity], axisTranslationYColorString [optional] default: red axisTranslationXColorString [optional] default: green axisTranslationZColorString [optional] default: blue axisTranslationXYColorString [optional] default: red axisTranslationYZColorString [optional] default: green axisTranslationXZColorString [optional] default: blue axisRotationXColorString [optional] default: red axisRotationYColorString [optional] default: green axisRotationZColorString [optional] default: blue axisScaleXColorString [optional] default: red axisScaleYColorString [optional] default: green axisScaleZColorString [optional] default: blue continueEditBoolean [optional] default: false, 是否持续编辑,即点击下个对象将会让组件转移到其上; UIScalingNumber [optional] default: 1.0, 缩放UI的系数,engine会忽略小于等于0的数字; noUIBoolean [optional] default: false, 是否不创建UI instanceIdNumber | String 指定InstanceLayer的instanceId - Overrides:
- Glodon.CIMCube.Layer.BaseLayer#addDragHandle
-
addModel(url, id)
-
给实例化图层添加模型,为后续具体的实例提供几何模型数据;
Parameters:
Name Type Description urlString 模型路径; idNumber 指定模型的唯一编号,用于查询、删除该模型; -
addTo(map)
-
将图层添加到图层管理器中
Parameters:
Name Type Description mapGlodon.CIMCube 地图实例 - Inherited From:
- Overrides:
-
dispatchEvent(event)
-
在此事件派发器上派发事件.
Parameters:
Name Type Description eventObject 待派发的事件. - Inherited From:
- Overrides:
-
dispose()
-
释放资源
-
flyTo()
-
飞行定位
-
getInstance(id)
-
按实例 id 查找实例,不存在则返回 undefined
Parameters:
Name Type Description idNumber | String 实例编号 Returns:
- Type
- InstanceLayerInstance | undefined
-
getModel(id)
-
获取模型对象,不存在的话返回undefined;
Parameters:
Name Type Description idNumber 模型的唯一编号; -
getParentId()
-
获取父节点ID
- Inherited From:
- Overrides:
Returns:
父节点ID- Type
- String
-
removeDragHandle()
-
在场景中移除操作句柄
- Inherited From:
- Overrides:
-
removeModel(id)
-
删除模型对象
Parameters:
Name Type Description idNumber 模型的唯一编号;