Constructor
new Glodon.Bimface.Layer.EntityLayer(config)
Parameters:
Name | Type | Description |
---|---|---|
config | Object | 图层配置 |
Methods
addEntity(entity)
添加自定义图元
Parameters:
Name | Type | Description |
---|---|---|
entity | Object |
destroy()
销毁图层
getAllEntities()
获取所有自定义图元
Returns:
Type | Description |
---|---|
Map |
entities 所有图层 |
getEntityById(id)
获取指定图元
Parameters:
Name | Type | Description |
---|---|---|
id | String |
Returns:
Type | Description |
---|---|
Object |
entity 自定义图元 |
getId()
获取图层id
Returns:
Type | Description |
---|---|
Number |
id 图层id |
hide()
获取图层id
Returns:
Type | Description |
---|---|
Number |
id 图层id |
parseGeoJson(geojson)
解析自定义图元文件,创建自定义图元
Parameters:
Name | Type | Description |
---|---|---|
geojson | String | 自定义图元json文件 |
removeEntity(id)
删除指定自定义图元
Parameters:
Name | Type | Description |
---|---|---|
id | String |
show()
显示图层