Class: PointWithMeasure

SuperMap.PointWithMeasure

The PointWithMeasure class. The route point is the 2D geographic coordinate with the linear measurement value (Measure).

new SuperMap.PointWithMeasure(options)

PointWithMeasure.js, line 5
Name Type Description
options Object

The parameters.

Name Type Description
measure number

The measurement value, that is, the rout object attribute value M.

x number

Gets the x coordinates of the current point in the geographic coordinate system.

y number

Gets the y coordinates of the current point in the geographic coordinate system.

Extends

Members

Bounds of the geometric object.

idstring

The unique identifier of the geometric object.

measurenumber

The measurement value, that is, the rout object attribute value M.

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

SRIDinterger

Projection coordinate parameter. By this parameter, server will determine whether the geometry object's coordinate reference is as the same as dataset, if not, then change projection before adding into database.

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

tagstring

It used to store the additional attributes, such as the z value in differential analysis.

xfloat

x-coordinate.

yfloat

y-coordinate.

Methods

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

PointWithMeasure.js, line 78

Transform the JSON object to the SuperMap.PointWithMeasure.

Name Type Description
jsonObject Object

Routing points represented by JSON objects.

Returns:
Type Description
SuperMap.PointWithMeasure The PointWithMeasure object.

inherited calculateBounds()

Point.js, line 65

Calculate the bounds of the point object.

inherited clearBounds()

Geometry.js, line 82

clear bounds of the geometric object. If the object has a parent class, it also clears the bounds of the parent class geometry object.

inherited clone(){SuperMap.Geometry.Point}

Point.js, line 49

Clone a point objects.

Returns:
Type Description
SuperMap.Geometry.Point The cloned point object.

destroy()

PointWithMeasure.js, line 67

Disposes the resource. The property that references resource is set to null.

equals(geom){boolean}

PointWithMeasure.js, line 33

Determine whether another route point object is equivalent to this one.

Name Type Description
geom SuperMap.PointWithMeasure

The route point that needs to judge.

Returns:
Type Description
boolean The supplied route point is equivalent to this geometry.

inherited extendBounds(newBounds)

Geometry.js, line 95

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

New bounds.

inherited getArea(){float}

Geometry.js, line 144

Calculating the area of the geometric object. This method needs to be realized in the subclass.

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

inherited getBounds(){SuperMap.Bounds}

Geometry.js, line 112

Gets the boundary of the geometric graphic. If not set, it can be acquired through computing.

Returns:
Type Description
SuperMap.Bounds Returns the bounds of the geometry.

inherited getVertices(nodes){Array}

Point.js, line 125

Return a list of all points in this geometry.

Name Type Description
nodes boolean optional

This parameter does not work for point objects and returns directly to the point.

Returns:
Type Description
Array A list of all vertices in the geometry.

inherited move(x, y)

Point.js, line 94

Moves a geometry by the given displacement along positive x and y axes

Name Type Description
x float

Distance to move geometry in positive x direction.

y float

Distance to move geometry in positive y direction.

inherited setBounds(bounds)

Geometry.js, line 70

Set bounds of the geometric object.

Name Type Description
bounds SuperMap.Bounds

bounds.

toJson()

PointWithMeasure.js, line 51

Turned to the JSON object.

inherited toShortString(){string}

Point.js, line 106
Returns:
Type Description
string The string represents the point object (ex. "5, 42").