OpenLayers. Geometry. Point

Point geometry class.

Inherits from

Summary
Point geometry class.
{float}
{float}
Construct a point geometry.
{OpenLayers.Geometry.Point} An exact clone of this OpenLayers.Geometry.Point
Create a new Bounds based on the lon/lat
{String} Shortened String representation of Point object.
Moves a point in place
Rotate a point around another.
Resize a point relative to some origin.

Properties

x

{float}

y

{float}

Constructor

OpenLayers. Geometry. Point

Construct a point geometry.

Parameters

x{float}
y{float}

Functions

clone

clone: function(obj)

Returns

{OpenLayers.Geometry.Point} An exact clone of this OpenLayers.Geometry.Point

calculateBounds

calculateBounds: function ()

Create a new Bounds based on the lon/lat

distanceTo

distanceTo: function(point)

Parameters

point{OpenLayers.Geometry.Point}

equals

equals:function(geom)

Parameters

xy{OpenLayers.Geometry}

Returns

{Boolean} Boolean value indicating whether the passed-in {OpenLayers.Geometry} object has the same components as this note that if ll passed in is null, returns false

toShortString

toShortString: function()

Returns

{String} Shortened String representation of Point object.  (ex.  <i>”5, 42”</i>)

move

move: function(x,
y)

Moves a point in place

Parameters

x{Float}
y{Float}

rotate

rotate: function(angle,
origin)

Rotate a point around another.

Parameters

angle{Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis)
origin{OpenLayers.Geometry.Point} Center point for the rotation

resize

resize: function(scale,
origin)

Resize a point relative to some origin.  For points, this has the effect of scaling a vector (from the origin to the point).  This method is more useful on geometry collection subclasses.

Parameters

scale{Float} Ratio of the new distance from the origin to the old distance from the origin.  A scale of 2 doubles the distance between the point and origin.
origin{OpenLayers.Geometry.Point} Point of origin for resizing
clone: function(obj)
{OpenLayers.Geometry.Point} An exact clone of this OpenLayers.Geometry.Point
Construct a point geometry.
calculateBounds: function ()
Create a new Bounds based on the lon/lat
distanceTo: function(point)
equals:function(geom)
toShortString: function()
{String} Shortened String representation of Point object.
move: function(x,
y)
Moves a point in place
rotate: function(angle,
origin)
Rotate a point around another.
resize: function(scale,
origin)
Resize a point relative to some origin.
A Geometry is a description of a geographic object.