Class: FMGroup

FMGroup

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

Members

readonlygroupAlias

楼层别名

Properties:
Name Type Description
groupAlias string

获取当前楼层的别名

readonlygroupDesc

楼层描述

Properties:
Name Type Description
groupDesc string

获取当前楼层的描述

readonlygroupHeight

楼层高度

Properties:
Name Type Description
groupHeight number

获取当前楼层离地面高度

groupID

楼层id

Properties:
Name Type Description
groupID number

楼层id

readonlygroupName

楼层名称

Properties:
Name Type Description
groupName string

获取当前楼层名称

height

高度

Properties:
Name Type Description
height number

高度

readonlylayers

楼层内图层集合

Properties:
Name Type Description
layers array

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

readonlymapCoord

中心坐标

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

readonlynodeType

地图元素对象类型

Properties:
Name Type Description
nodeType fengmap.FMNodeType

地图元素对象类型

show

地图元素的显示/隐藏

Properties:
Name Type Description
show bool

【true】: 显示,【false】: 隐藏

Methods

addLayer(layer)

添加一个图层

Name Type Description
layer object

图层对象

inherited alwaysShow()

是否一直显示。

applyHeatMap(heatmap)

热力图绑定到group上

Name Type Description
heatmap fengmap.FMHeatMap

热力图对象。

See:

inherited avoid(value)

图层内或单个元素与同一图层内的其他元素在同一位置有相互遮盖时,是否自动避让。FMImageMarker FMTextMarker有效。

Name Type Description
value bool

【true】: 需避让,【false】: 不避让。注意:avoid方法与show属性不能同时使用,使用avoid方法会自动更新show属性的值。

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对象。

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)

遍历别名数组所有node

Name Type Description
alias array

别名数组

back function

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