Bounds
Extends:
leaflet~L.Bounds → Bounds
以像素为单位表示一个矩形区域
Constructor Summary
Public Constructor | ||
public |
constructor(topLeft: Point, bottomRight: Point) 构造函数 |
Method Summary
Public Methods | ||
public |
如果矩形区域包含给定对象则返回true |
|
public |
扩展矩形区域,使之能容纳点 |
|
public |
返回矩形区域的左下角点 |
|
public |
返回矩形区域的中心点 |
|
public |
返回矩形区域的大小 |
|
public |
getTopRight(): Point 返回矩形区域的右上角点 |
|
public |
intersects(otherBounds: Bounds): Boolean 如果矩形区域与给定的矩形区域相交则返回true。如果它们有一个点相交就会被判定为相交。 |
|
public |
如果矩形区域与给定的矩形区域重叠则返回true。两块区域如果相交的是一块区域则被判定为重叠。 |
Public Constructors
Public Methods
public extend(point: Point): Bounds source
扩展矩形区域,使之能容纳点
Params:
Name | Type | Attribute | Description |
point | Point | 扩展区域 |
public getCenter(isRound: Boolean): Point source
返回矩形区域的中心点
Params:
Name | Type | Attribute | Description |
isRound | Boolean |
|
如果是true,则进行四舍五入 |