Class: FMGroup

FMGroup

楼层对象,只读,不可实例化。

Members

readonlygroupAlias

楼层别名

Properties:
Name Type Description
groupAlias string

获取当前楼层的别名

readonlygroupDesc

楼层描述

Properties:
Name Type Description
groupDesc string

获取当前楼层的描述

readonlygroupHeight

楼层高度

Properties:
Name Type Description
groupHeight number

获取当前楼层离地面高度

readonlygroupName

楼层名称

Properties:
Name Type Description
groupName string

获取当前楼层名称

readonlylayers

楼层内图层集合

Properties:
Name Type Description
layers array

获取当前楼层中的图层集合

readonlymapCoord

中心坐标

Properties:
Name Type Description
楼层中心点坐标 json

Methods

addLayer(layer)

添加一个图层

Name Type Description
layer object

图层对象

applyHeatMap(heatmap)

热力图绑定到group上

Name Type Description
heatmap fengmap.FMHeatMap

热力图对象。

See:

clearExtentImage()

清除地板图片

getFirstLayer(alias){object}

返回同别名alias第一个

Name Type Description
alias string

layer的别名: "imageMarker", "textMarker"

Returns:
Type Description
object 根据别名找到的第一个layer对象

getLayer(alias){array.<object>|object}

返回与指定 layer别名 层或所有层, 如要只有一个层与之相符则会将此层返回, 如果有两个层与之相符则会以数组的形式返回所有

Name Type Description
alias string

layer的别名: "imageMarker", "textMarker"

Returns:
Type Description
array.<object> | object [layer] 或者 Layer

getOrCreateLayer(layerAlias){Object}

获取或者创建layer

Name Type Description
layerAlias string

layer的别名: "imageMarker", "textMarker","polygonMarker","storeImage"

Returns:
Type Description
Object 返回已有或新创建的layer对象。

initLayers()

初始化渲染层数组

initLayersByData(data)

初始化渲染层数据

Name Type Description
data Object

地图数据

removeHeatMap()

移除当前楼层的热力图

removeLayer(layer)

删除一个图层

Name Type Description
layer object

图层对象

setExtentImage(img)

给地板设置一张图片

Name Type Description
img image | string

图片url或者image对象

traverse(back)

遍历所有layer图层

Name Type Description
back function

遍历图层回调函数

traverseByAlias(alias, back, onlyLayer)

遍历别名数组所有node

Name Type Description
alias array

别名数组

back function

回调函数 回调函数返回地图node对象以及别名 function(node ,alias){}

onlyLayer

是否仅遍历layer