1. FeatureInfo
1.1. new FeatureInfo(event, [options])
显示被点击实体的属性信息,包括标记、BIM模型等。 标记弹框会一直跟随标记显示在标记上方,模型信息弹框则显示在鼠标点击的地方
Param | Type | Description |
---|---|---|
event | Event |
事件 |
[options] | Object |
属性配置 |
options.showAttribute | Boolean |
显示属性信息 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
1.2. 方法
1.2.1. featureInfo.onClick(windowCoord) ⇒ Object
全局点击事件监听,点击模型和实体对象后显示属性信息
Returns : Object
-
属性信息对象
Param | Type | Description |
---|---|---|
windowCoord | Cartesian2 |
屏幕坐标 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.onClick(windowCoord);
1.2.2. featureInfo.onPostRender()
全局事件监听,更新属性列表中的内容
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.onPostRender();
1.2.3. featureInfo.showMarkInfoPanel(position, type, entity) ⇒ Object
显示图标信息
Returns : Object
-
图标信息
Param | Type | Description |
---|---|---|
position | Cartesian3 |
三维笛卡尔坐标 |
type | FeatureType | 对象类型 |
entity | Object |
entity对象 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showMarkInfoPanel(position, type, entity);
1.2.4. featureInfo.showPrimitiveInfoPanel(windowCoord, type, primitive) ⇒ ObjectObject
显示primitive对象信息
Returns : Object
-
primitive对象信息
Param | Type | Description |
---|---|---|
windowCoord | Cartesian2 |
二维屏幕坐标 |
type | FeatureType |
对象类型 |
primitive | Object |
Primitive对象 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showPrimitiveInfoPanel(position, type, primitive);
1.3. featureInfo.showEntityPanel(windowCoord, type, entity) ⇒ Object
显示entity信息
Returns : Object
-
属性信息
Param | Type | Description |
---|---|---|
windowCoord | Cartesian2 |
二维屏幕坐标 |
type | FeatureType | 对象类型 |
entity | Object |
entity对象 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showEntityPanel(windowCoord, type, entity);
1.3.1. featureInfo.showBimInfoPanel(feature, windowCoord) ⇒ String
显示BIM模型信息
Returns : String
-
模型信息
Param | Type | Description |
---|---|---|
feature | Object |
被选中的模型要素 |
windowCoord | Cartesian2 |
二维屏幕坐标 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showBimInfoPanel(feature, windowCoord);
1.3.2. featureInfo.showTilesInfoPanel(feature, windowCoord) ⇒ Object
显示3DTiles模型属性信息
Returns : Object
-
模型属性信息
Param | Type | Description |
---|---|---|
feature | Object |
被选中的模型要素 |
windowCoord | Cartesian2 |
二维屏幕坐标 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showTilesInfoPanel(feature, windowCoord);
1.4. featureInfo.showShellInfoPanel(primitive, windowCoord) ⇒ Object
获取gltf模型加载时传入的自定义属性信息
Returns: Object
-
模型属性信息
Param | Type | Description |
---|---|---|
primitive | Object |
被选中的模型要素 |
windowCoord | Cartesian2 |
二维屏幕坐标 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showShellInfoPanel(primitive, windowCoord);
1.4.1. featureInfo.showWhiteModelInfoPanel(feature, windowCoord)
显示白模属性信息
Param | Type | Description |
---|---|---|
feature | Object |
被选中的模型要素 |
windowCoord | Cartesian2 |
二维屏幕坐标 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.showWhiteModelInfoPanel(feature, windowCoord);
1.4.2. featureInfo.hide()
隐藏信息框
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.hide();
1.4.3. featureInfo.close()
关闭信息框
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.close();
1.5. featureInfo.setFeatureName(type, table)
设置中英文名称对应
Param | Type | Description |
---|---|---|
type | FeatureType | 模型或实体类型 |
table | Object |
表格 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.setFeatureName(type, table);
1.5.1. featureInfo.setText(val)
设置按钮文字和点击事件
Param | Type | Description |
---|---|---|
val | String |
文本内容 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.setText(val);
1.5.2. featureInfo.setClick(text, callback)
传入文字和按钮点击事件
Param | Type | Description |
---|---|---|
text | String |
文本内容 |
callback | CallableFunction |
回调函数 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.setClick(text, callback);
1.5.3. featureInfo.setCollectionUrl(collection, url)
设置图标url
Param | Type | Description |
---|---|---|
collection | Object |
图标集合 |
url | URL |
连接地址 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.setCollectionUrl(collection, url);
1.5.4. featureInfo.resetBillboard()
重置选中的图标
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.resetBillboard();
1.5.5. featureInfo.flyToFeature(val)
设置点击是否飞行
Param | Type | Description |
---|---|---|
val | Boolean |
是否飞行,默认为true |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.flyToFeature(val);
1.5.6. featureInfo.setFlyto(longitude, latitude, height, orientation, complete)
重新制定飞行角度
Param | Type | Description |
---|---|---|
longitude | Number |
经度 |
latitude | Number |
纬度 |
height | Number |
相机高度 |
orientation | Object |
方位,{heading,pitch,roll},分别代表偏航角、俯仰角、翻滚角,单位为度, 取值范围分别为-180≤heading≤180、-90≤pitch≤90、-180≤roll≤180 |
complete | function |
相机停止移动之后的回调函数 |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.setFlyto(longitude, latitude, height, orientation, complete);
1.5.7. featureInfo.setContent(attributes, type)
重置信息框内容
Param | Type | Description |
---|---|---|
attributes | Array |
属性数组 |
type | String |
模型类型,[mark, bim] |
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.setContent(attributes, type);
1.5.8. featureInfo.reset()
恢复初始状态
Example
let info = new BOSGeo.FeatureInfo(event, options);
info.reset();