OpenLayers. Class

Contains functions to create OpenLayers style classes.

Summary
Contains functions to create OpenLayers style classes.
Create an OpenLayers style class
Inherit from one or more OpenLayers style classes
This class represents a screen coordinate, in x and y coordinates
{Number} The x coordinate
{Number} The x coordinate
Create a new OpenLayers.Pixel instance
Cast this object into a string
Return a clone of this pixel object
Determine whether one pixel is equivalent to another
Instances of this class represent a width/height pair
{Number} width
{Number} height
Create an instance of OpenLayers.Size
Return the string representation of a size object
Create a clone of this size object
This class represents a longitude and latitude pair
Create a new OpenLayers.LonLat instance
Return a readable string version of the lonlat
Instances of this class represent bounding boxes.
{Number}
{Number}
{Number}
{Number}
Construct a new bounds object.
Create a cloned instance of this bounds.
Test a two bounds for equivalence
Get the opposite quadrant for a given quadrant string.

Functions

create

create: function()

Create an OpenLayers style class

Return

An OpenLayers class

inherit

inherit: function ()

Inherit from one or more OpenLayers style classes

Parameters

classOne or more classes can be provided as arguments

Return

An object prototype

OpenLayers. Pixel

This class represents a screen coordinate, in x and y coordinates

Summary
{Number} The x coordinate
{Number} The x coordinate
Create a new OpenLayers.Pixel instance
Cast this object into a string
Return a clone of this pixel object
Determine whether one pixel is equivalent to another

Properties

x

{Number} The x coordinate

x

{Number} The x coordinate

Functions

OpenLayers. Pixel

Create a new OpenLayers.Pixel instance

Parameters

x{Number} The x coordinate
y{Number} The y coordinate

Return

An instance of OpenLayers.Pixel

toString

toString:function()

Cast this object into a string

Return

{String} The string representation of Pixel. ex: “x=200.4,y=242.2”

clone

clone:function()

Return a clone of this pixel object

Return

{OpenLayers.Pixel} A clone pixel

equals

equals:function(px)

Determine whether one pixel is equivalent to another

Parameters

px{OpenLayers.Pixel}

Return

{Boolean} The point passed in as parameter is equal to this.  Note that if px passed in is null, returns false.

OpenLayers.Size

Instances of this class represent a width/height pair

Summary
{Number} width
{Number} height
Create an instance of OpenLayers.Size
Return the string representation of a size object
Create a clone of this size object

Properties

w

{Number} width

h

{Number} height

Functions

OpenLayers.Size

Create an instance of OpenLayers.Size

Parameters

w{Number} width
h{Number} height

toString

toString:function()

Return the string representation of a size object

Return

{String} The string representation of OpenLayers.Size object.  (ex.  <i>”w=55,h=66”</i>)

clone

clone:function()

Create a clone of this size object

Return

{OpenLayers.Size} A new OpenLayers.Size object with the same w and h values

OpenLayers. LonLat

This class represents a longitude and latitude pair

Summary
Create a new OpenLayers.LonLat instance
Return a readable string version of the lonlat

Functions

OpenLayers. LonLat

Create a new OpenLayers.LonLat instance

Parameters

lon{Number} The lon coordinate
lat{Number} The lat coordinate

Return

An instance of OpenLayers.LonLat

toString

toString:function()

Return a readable string version of the lonlat

Return

{String} String representation of OpenLayers.LonLat object.  (ex.  <i>”lon=5,lat=42”</i>)

OpenLayers. Bounds

Instances of this class represent bounding boxes.  Data stored as left, bottom, right, top floats

Summary
{Number}
{Number}
{Number}
{Number}
Construct a new bounds object.
Create a cloned instance of this bounds.
Test a two bounds for equivalence
Get the opposite quadrant for a given quadrant string.

Properties

left

{Number}

bottom

{Number}

right

{Number}

top

{Number}

Functions

OpenLayers. Bounds

Construct a new bounds object.

Parameters

left{Number} The left bounds of the box.  Note that for width calculations, this is assumed to be less than the right value.
bottom{Number} The bottom bounds of the box.  Note that for height calculations, this is assumed to be more than the top value.
right{Number} The right bounds.
top{Number} The top bounds.

Return

{OpenLayers.Bounds} A new bounds instance.

clone

clone:function()

Create a cloned instance of this bounds.

Return

{OpenLayers.Bounds} A fresh copy of the bounds

equals

equals:function(bounds)

Test a two bounds for equivalence

Parameters

bounds{OpenLayers.Bounds}

Return

{Boolean} The passed-in OpenLayers.Bounds object has the same left, right, top, bottom components as this.  Note that if bounds passed in is null, returns false.

oppositeQuadrant

OpenLayers.Bounds.oppositeQuadrant = function(quadrant)

Get the opposite quadrant for a given quadrant string.

Parameters

quadrant{String} two character quadrant shortstring

Return

{String} The opposing quadrant (“br” “tr” “tl” “bl”).  For Example, if you pass in “bl” it returns “tr”, if you pass in “br” it returns “tl”, etc.

create: function()
Create an OpenLayers style class
inherit: function ()
Inherit from one or more OpenLayers style classes
toString:function()
Cast this object into a string
clone:function()
Return a clone of this pixel object
equals:function(px)
Determine whether one pixel is equivalent to another
toString:function()
Return the string representation of a size object
clone:function()
Create a clone of this size object
toString:function()
Return a readable string version of the lonlat
clone:function()
Create a cloned instance of this bounds.
equals:function(bounds)
Test a two bounds for equivalence
OpenLayers.Bounds.oppositeQuadrant = function(quadrant)
Get the opposite quadrant for a given quadrant string.
Construct a new bounds object.