Polygon

LM. Polygon

多边形标注,覆盖物的一种。

Constructor

new Polygon(options)

Description:
  • 构造方法。

Parameters:
Name Type Description
options object
Properties
Name Type Description
ring array.<object>

外圈坐标数组。

Properties
Name Type Description
x number

X坐标。

y number

Y坐标。

holes array.<array.<object>>

孔洞坐标数组的数组。

Properties
Name Type Description
x number

X坐标。

y number

Y坐标。

options.style object

样式。

Properties
Name Type Description
color string

颜色,未设置为'#FFFFFF'。

opacity number

不透明度,未设置为1.0。

border object

描边样式,不设置时无描边。

Properties
Name Type Description
color string

颜色。

width number

描边宽度。

Members

(readonly) type :LM.Type

Description:
  • 元素类型。

元素类型。

Type:

(readonly) visible

Description:
  • 可见性。

可见性。

Methods

addTo(楼层。)

Description:
  • 添加。

Parameters:
Name Type Description
楼层。 LM.Floor

contain(point)

Description:
  • 包含判断。

Parameters:
Name Type Description
point object

点位。

Properties
Name Type Description
x number

X坐标。

y number

Y坐标。

remove()

Description:
  • 移除。

setVisible(visible)

Description:
  • 设置可见性。

Parameters:
Name Type Description
visible boolean

true-显示 false-隐藏。