Rectangle Class

Rectangle(xmin, xmax, ymin, ymax, option)

矩形几何对象

Fx构造函数

# new Rectangle(xmin, xmax, ymin, ymax, option)

矩形几何对象

参数:
名称 类型 描述
xmin Number

x最小值

xmax Number

x最大值

ymin Number

y最小值

ymax Number

y最大值

option Object

属性键值对,拓展属性

查看源代码 service/common/Rectangle.js, line 5

继承关系

成员变量

方法

# convertToBound() → {ol.extent}

将本对象转换为一个OpenLayers.Bound对象

查看源代码 service/common/Rectangle.js, line 86

返回一个字符串来表示此矩形

ol.extent

# getGeometryType() → {String}

获取几何类型名称

Overrides:

查看源代码 service/common/Rectangle.js, line 77

rect

String

# intersectsBounds(bounds, options)

判断是否和另一个矩形相交

参数:
名称 类型 属性 默认值 描述
bounds ol.extent
options String

判断参数

inclusive Boolean <optional>
true

是否精准计算

查看源代码 service/common/Rectangle.js, line 96

# setByOL(openlayersRect)

使用一个由Openlayers定义的矩形来构造本对象

参数:
名称 类型 描述
openlayersRect ol.extent

由OpenLayers定义的矩形对象

Overrides:

查看源代码 service/common/Rectangle.js, line 53

# toString() → {String}

对象转化为字符串

Overrides:

查看源代码 service/common/Rectangle.js, line 68

返回一个字符串来表示此矩形

String

# Trim(str, is_globalopt)

1.去除字符串前后所有空格 2.去除字符串中所有空格(包括中间空格,需要设置第2个参数为:g)

参数:
名称 类型 属性 默认值 描述
str String
is_global String <optional>
g

值为 g 的时候去除字符串中所有空格

Inherited From:

查看源代码 service/common/Tangram.js, line 44