Point2D Class

Point2D(xopt, yopt, option)

点类型

Fx构造函数

# new Point2D(xopt, yopt, option)

点类型

参数:
名称 类型 属性 默认值 描述
x Number <optional>
null

坐标x

y Number <optional>
null

坐标y

option Object

属性键值对

nearDis Number <optional>
null

容差半径,只在做点查询时需赋值

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

继承关系

成员变量

Number

# nearDis

容差半径,只在做点查询时需赋值

Default Value:
  • null

查看源代码 service/common/Point2D.js, line 36

Number

# x

坐标x

Default Value:
  • null

查看源代码 service/common/Point2D.js, line 20

Number

# y

坐标y

Default Value:
  • null

查看源代码 service/common/Point2D.js, line 28

方法

# getGeometryType() → {String}

获取几何类型名称

Overrides:

查看源代码 service/common/Point2D.js, line 46

point

String

# setByOL(point)

通过传入Openlayers的ol.geom.Point类型来设置参数

参数:
名称 类型 描述
point ol.geom.Point

Openlayers定义的点类型

Overrides:

查看源代码 service/common/Point2D.js, line 55

# toString() → {String}

对象转化为字符串

Overrides:

查看源代码 service/common/Point2D.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