OpenLayers. Geometry. Point

Point geometry class.

Inherits from

Summary
OpenLayers. Geometry. PointPoint geometry class.
Properties
x{float}
y{float}
Constructor
OpenLayers. Geometry. PointConstruct a point geometry.
Functions
clone{OpenLayers.Geometry.Point} An exact clone of this OpenLayers.Geometry.Point
calculateBoundsCreate a new Bounds based on the lon/lat
distanceTo
equals
toShortString{String} Shortened String representation of Point object.
moveMoves a point in place
rotateRotate a point around another.
resizeResize a point relative to some origin.
intersectsDetermine if the input geometry intersects this one.
transformTranslate the x,y properties of the point from source to dest.

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,
ratio)

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
ratio{Float} Optional x:y ratio for resizing.  Default ratio is 1.

intersects

intersects: function(geometry)

Determine if the input geometry intersects this one.

Parameters

geometry{OpenLayers.Geometry} Any type of geometry.

Returns

{Boolean} The input geometry intersects this one.

transform

transform: function(source,
dest)

Translate the x,y properties of the point from source to dest.

Parameters

source{OpenLayers.Projection}
dest{OpenLayers.Projection}

Returns

{OpenLayers.Geometry}

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,
ratio)
Resize a point relative to some origin.
intersects: function(geometry)
Determine if the input geometry intersects this one.
transform: function(source,
dest)
Translate the x,y properties of the point from source to dest.
A Geometry is a description of a geographic object.
Class for coordinate transforms between coordinate systems.
Close