Class: PointWithMeasure

SuperMap.PointWithMeasure

路由点类。路由点是指具有线性度量值 (Measure) 的二维地理坐标点。

new SuperMap.PointWithMeasure(options)

common/iServer/PointWithMeasure.js, line 8
Name Type Description
options Object

参数。

Name Type Description
measure number

度量值,即路由对象属性值 M。

x number

获取当前点对象在地理坐标系下的 X 坐标值。

y number

获取当前点对象在地理坐标系下的 Y 坐标值。

Extends

Members

几何对象的范围。

idstring

此几何对象的唯一标示符。

measurenumber

度量值,即路由对象属性值 M。

This is set when a Geometry is added as component of another geometry

SRIDinterger

投影坐标参数。通过该参数,服务器判断 Geometry 对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。

Example
var geometry= new SuperMap.Geometry();
  geometry. SRID=4326;

tagstring

用来存储额外的属性,比如差值分析中的 Z 值。

xfloat

横坐标。

yfloat

纵坐标。

Methods

SuperMap.PointWithMeasure.fromJson(jsonObject){SuperMap.PointWithMeasure}

common/iServer/PointWithMeasure.js, line 81

将 JSON 对象转换为SuperMap.PointWithMeasure 对象。

Name Type Description
jsonObject Object

JSON 对象表示的路由点。

Returns:
Type Description
SuperMap.PointWithMeasure 转化后的 PointWithMeasure 对象。

inherited calculateBounds()

common/commontypes/geometry/Point.js, line 69

计算点对象的范围。

inherited clearBounds()

common/commontypes/Geometry.js, line 85

清除几何对象的 bounds。 如果该对象有父类,也会清除父类几何对象的 bounds。

inherited clone(){SuperMap.Geometry.Point}

common/commontypes/geometry/Point.js, line 53

克隆点对象。

Returns:
Type Description
SuperMap.Geometry.Point 克隆后的点对象。

destroy()

common/iServer/PointWithMeasure.js, line 70

释放资源,将引用资源的属性置空。

equals(geom){boolean}

common/iServer/PointWithMeasure.js, line 36

判断两个路由点对象是否相等。如果两个路由点对象具有相同的坐标以及度量值,则认为是相等的。

Name Type Description
geom SuperMap.PointWithMeasure

需要判断的路由点对象。

Returns:
Type Description
boolean 两个路由点对象是否相等(true 为相等,false 为不等)。

inherited extendBounds(newBounds)

common/commontypes/Geometry.js, line 98

Extend the existing bounds to include the new bounds. If geometry's bounds is not yet set, then set a new Bounds.

Name Type Description
newBounds SuperMap.Bounds

范围。

inherited getArea(){float}

common/commontypes/Geometry.js, line 147

计算几何对象的面积 ,此方法需要在子类中定义。

Returns:
Type Description
float The area of the collection by summing its parts

inherited getBounds(){SuperMap.Bounds}

common/commontypes/Geometry.js, line 115

获得几何图形的边界。如果没有设置边界,可通过计算获得。

Returns:
Type Description
SuperMap.Bounds 返回的几何对象的边界。

inherited getVertices(nodes){Array}

common/commontypes/geometry/Point.js, line 129

返回点对象的所有顶点的列表。

Name Type Description
nodes boolean 可选

对于点对象此参数不起作用,直接返回点。

Returns:
Type Description
Array 几何图形的顶点列表。

inherited move(x, y)

common/commontypes/geometry/Point.js, line 98

沿着 x、y 轴的正方向上按照给定的位移移动点对象,move 不仅改变了几何对象的位置并且清理了边界缓存。

Name Type Description
x float

x 轴正方向上的偏移量。

y float

y 轴正方向上偏移量。

inherited setBounds(bounds)

common/commontypes/Geometry.js, line 73

设置此几何对象的 bounds。

Name Type Description
bounds SuperMap.Bounds

范围。

toJson()

common/iServer/PointWithMeasure.js, line 54

转换为 JSON 对象。

inherited toShortString(){string}

common/commontypes/geometry/Point.js, line 110
Returns:
Type Description
string 字符串代表点对象。(ex. "5, 42")