# deprecated.js

Summary

deprecated.js |
Deprecated | The deprecated.js script includes all methods, properties, and constructors that are not supported as part of the long-term API.
OpenLayers.Class |
Properties |
isPrototype | Deprecated.
Functions |
OpenLayers.create | Deprecated.
inherit | Deprecated.
OpenLayers.Util |
Functions |
clearArray | Deprecated.
setOpacity | Deprecated.
safeStopPropagation | Deprecated.
getArgs | Deprecated.
OpenLayers.Ajax |
Functions |
OpenLayers.nullHandler | @param {} request
OpenLayers.loadURL | Background load a document.
OpenLayers.parseXMLString | Parse XML into a doc structure
emptyFunction |
getTransport | {Object} Transport mechanism for whichever browser we’re in, or false if none available.
Properties |
activeRequestCount | {Integer}
OpenLayers.Ajax.Responders | {Object}
Properties |
responders | {Array}
Functions |
register |
unregister |
dispatch |
onCreate |
onComplete |
OpenLayers.Ajax.Base |
Constructor |
OpenLayers.Ajax.Base |
OpenLayers.Ajax.Request | Deprecated.
Properties |
_complete | {Boolean}
Constructor |
OpenLayers.Ajax.Request |
Functions |
request |
onStateChange |
setRequestHeaders |
success | {Boolean} -
getStatus |
respondToReadyState |
getHeader |
dispatchException | If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException.
Properties |
Events | {Array(String)}
OpenLayers.Ajax.Response |
Properties |
status | {Integer}
statusText | {String}
Constructor |
OpenLayers.Ajax.Response |
Functions |
getStatus |
getStatustext |
getHeader |
getResponseHeader |
getElementsByTagNameNS |
serializeXMLToString | Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari.
OpenLayers.Element |
Functions |
hide | Deprecated.
show | Deprecated.
getDimensions | Deprecated.
String.startsWith | Deprecated.
String.contains | Deprecated.
String.trim | Deprecated.
String.camelize | Deprecated.
Function.bind | Deprecated.
Function.bindAsEventListener | Deprecated.
OpenLayers.Tile |
Functions |
getBoundsFromBaseLayer | Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.
OpenLayers.Control.MouseDefaults | This class is DEPRECATED in 2.4 and will be removed by 3.0.
Properties |
performedDrag | {Boolean}
wheelObserver | {Function}
Constructor |
OpenLayers.Control.MouseDefaults |
Functions |
destroy |
draw |
registerWheelEvents |
defaultClick |
defaultDblClick |
defaultMouseDown |
defaultMouseMove |
defaultMouseUp |
defaultMouseOut |
defaultWheelUp | User spun scroll wheel up
defaultWheelDown | User spun scroll wheel down
zoomBoxEnd | Zoombox function.
removeZoomBox | Remove the zoombox from the screen and nullify our reference to it.
onWheelEvent | Catch the wheel event and handle it xbrowserly
OpenLayers.Control.MouseToolbar | This class is DEPRECATED in 2.4 and will be removed by 3.0.
Properties |
mode |
buttons |
direction | {String} ‘vertical’ or ‘horizontal’
buttonClicked | {String}
Constructor |
OpenLayers.Control.MouseToolbar |
Functions |
destroy |
draw |
_addButton |
buttonDown |
buttonUp |
defaultDblClick |
defaultMouseDown |
switchModeTo |
leaveMode |
defaultMouseMove |
defaultMouseUp |
defaultMouseOut |
defaultClick |
OpenLayers.Layer.Grid |
Functions |
getGridBounds | Deprecated.
OpenLayers.Format.XML |
Functions |
concatChildValues | Deprecated.
OpenLayers.Layer.WMS.Post | Instances of OpenLayers.Layer.WMS.Post are used to retrieve data from OGC Web Mapping Services via HTTP-POST (application/x-www-form-urlencoded).
Properties |
unsupportedBrowsers | {Array} Array with browsers, which should use the HTTP-GET protocol instead of HTTP-POST for fetching tiles from a WMS .
SUPPORTED_TRANSITIONS | {Array} no supported transitions for this type of layer, because it is not possible to modify the initialized tiles (iframes)
usePost | {Boolean}
Constructor |
OpenLayers.Layer.WMS.Post | Creates a new WMS layer object.
Functions |
addTile | addTile creates a tile, initializes it and adds it as iframe to the layer div.
OpenLayers.Layer.WMS.Untiled | Deprecated.
Properties |
singleTile | {singleTile} Always true for untiled.
Constructor |
OpenLayers.Layer.WMS.Untiled |
Functions |
clone | Create a clone of this layer
OpenLayers.Layer.MapServer.Untiled | Deprecated.
Properties |
singleTile | {singleTile} Always true for untiled.
Constructor |
OpenLayers.Layer.MapServer.Untiled |
Functions |
clone | Create a clone of this layer
OpenLayers.Tile.WFS | Instances of OpenLayers.Tile.WFS are used to manage the image tiles used by various layers.
Properties |
features | {Array(OpenLayers.Feature)} list of features in this tile
url | {String}
request | {OpenLayers.Request.XMLHttpRequest}
Functions |
destroy | nullify references to prevent circular references and memory leaks
clear | Clear the tile of any bounds/position-related data so that it can be reused in a new location.
draw | Check that a tile should be drawn, and load features for it.
loadFeaturesForRegion | Abort any pending requests and issue another request for data.
requestSuccess | Called on return from request succcess.
addResults | Construct new feature via layer featureClass constructor, and add to this.features.
destroyAllFeatures | Iterate through and call destroy() on each feature, removing it from the local array
OpenLayers.Feature.WFS | WFS handling class, for use as a featureClass on the WFS layer for handling ‘point’ WFS types.
Constructor |
OpenLayers.Feature.WFS | Create a WFS feature.
Functions |
destroy | nullify references to prevent circular references and memory leaks
processXMLNode | When passed an xmlNode, parses it for a GML point, and passes back an object describing that point.
OpenLayers.Layer.WFS | Deprecated.
Properties |
isBaseLayer | {Boolean} WFS layer is not a base layer by default.
tile | {OpenLayers.Tile.WFS}
ratio | {Float} The ratio property determines the size of the serverside query relative to the map viewport size.
DEFAULT_PARAMS | {Object} Hashtable of default key/value parameters
featureClass | {OpenLayers.Feature} If featureClass is defined, an old-style markers based WFS layer is created instead of a new-style vector layer.
format | {OpenLayers.Format} The format you want the data to be parsed with.
formatObject | {OpenLayers.Format} Internally created/managed format object, used by the Tile to parse data.
formatOptions | {Object} Hash of options which should be passed to the format when it is created.
vectorMode | {Boolean} Should be calculated automatically.
encodeBBOX | {Boolean} Should the BBOX commas be encoded?
extractAttributes | {Boolean} Should the WFS layer parse attributes from the retrieved GML?
Constructor |
OpenLayers.Layer.WFS |
Functions |
destroy |
setMap |
moveTo |
addTileMonitoringHooks | This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tile (making sure to check that the tile is always the layer’s current tile before taking any action).
removeTileMonitoringHooks | This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()
onMapResize | Call the onMapResize method of the appropriate parent class.
display | Call the display method of the appropriate parent class.
mergeNewParams | Modify parameters for the layer and redraw.
clone |
getFullRequestString | combine the layer’s url with its params and these newParams.
commit | Write out the data to a WFS server.
commitSuccess | Called when the Ajax request returns a response
commitFailure | Called when the Ajax request fails
commitReport | Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.
refresh | Refreshes all the features of the layer
getDataExtent | Calculates the max extent which includes all of the layer data.
setOpacity | Call the setOpacity method of the appropriate parent class to set the opacity.
OpenLayers.Layer.VirtualEarth | Deprecated.
Constants |
MIN_ZOOM_LEVEL | {Integer} 1
MAX_ZOOM_LEVEL | {Integer} 19
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection
Properties |
type | {VEMapType}
wrapDateLine | {Boolean} Allow user to pan forever east/west.
sphericalMercator | {Boolean} Should the map act as a mercator-projected map?
animationEnabled | {Boolean} If set to true, the transition between zoom levels will be animated.
Constructor |
OpenLayers.Layer.VirtualEarth | Creates a new instance of a OpenLayers.Layer.VirtualEarth.
Functions |
loadMapObject |
onMapResize |
getWarningHTML | {String} String with information on why layer is broken, how to get it working.
setMapObjectCenter | Set the mapObject to the specified center and zoom
getMapObjectCenter | {Object} The mapObject’s current center in Map Object format
dragPanMapObject |
getMapObjectZoom | {Integer} The mapObject’s current zoom, in Map Object format
getMapObjectLonLatFromMapObjectPixel |
getMapObjectPixelFromMapObjectLonLat |
getLongitudeFromMapObjectLonLat |
getLatitudeFromMapObjectLonLat |
getMapObjectLonLatFromLonLat |
getXFromMapObjectPixel |
getYFromMapObjectPixel |
getMapObjectPixelFromXY |
OpenLayers.Protocol.SQL | Abstract SQL protocol class.
Properties |
databaseName | {String}
tableName | Name of the database table into which Features should be saved.
postReadFiltering | {Boolean} Whether the filter (if there’s one) must be applied after the features have been read from the database; for example the BBOX strategy passes the read method a BBOX spatial filter, if postReadFiltering is true every feature read from the database will go through the BBOX spatial filter, which can be costly; defaults to true.
Constructor |
OpenLayers.Protocol.SQL |
Functions |
destroy | Clean up the protocol.
supported | This should be overridden by specific subclasses
evaluateFilter | If postReadFiltering is true evaluate the filter against the feature and return the result of the evaluation, otherwise return true.
OpenLayers.Protocol.SQL.Gears | This Protocol stores feature in the browser via the Gears Database module http://code.google.com/apis/gears/api_database.html.
Properties |
FID_PREFIX | {String}
NULL_GEOMETRY | {String}
NULL_FEATURE_STATE | {String}
jsonParser | {OpenLayers.Format.JSON}
wktParser | {OpenLayers.Format.WKT}
fidRegExp | {RegExp} Regular expression to know whether a feature was created in offline mode.
saveFeatureState | {Boolean} Whether to save the feature state (<OpenLayers.State>) into the database, defaults to true.
typeOfFid | {String} The type of the feature identifier, either “number” or “string”, defaults to “string”.
db | {GearsDatabase}
Constructor |
OpenLayers.Protocol.SQL.Gears |
Functions |
initializeDatabase |
destroy | Clean up the protocol.
supported | Determine whether a browser supports Gears
read | Read all features from the database and return a OpenLayers.Protocol.Response instance.
unfreezeFeature |
extractFidFromField |
create | Create new features into the database.
update | Construct a request updating modified feature.
createOrUpdate | Construct a request for updating or creating features in the database.
freezeFeature |
getFeatureStateForFreeze | Get the state of the feature to store into the database.
delete | Delete features from the database.
createdOffline | Returns true if the feature had a feature id when it was created in the Gears database, false otherwise; this is determined by checking the form of the feature’s fid value.
commit | Go over the features and for each take action based on the feature state.
clear | Removes all rows of the table.
callUserCallback | This method is called from within commit each time a request is made to the database, it is responsible for calling the user-supplied callbacks.
OpenLayers.Layer.Yahoo |
Constants |
MIN_ZOOM_LEVEL | {Integer} 0
MAX_ZOOM_LEVEL | {Integer} 17
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection
Properties |
type | {YahooMapType}
wrapDateLine | {Boolean} Allow user to pan forever east/west.
sphericalMercator | {Boolean} Should the map act as a mercator-projected map?
Constructor |
OpenLayers.Layer.Yahoo |
Functions |
loadMapObject |
onMapResize |
setMap | Overridden from EventPane because we need to remove this yahoo event pane which prohibits our drag and drop, and we can only do this once the map has been loaded and centered.
fixYahooEventPane | The map has been centered, so the mysterious yahoo eventpane has been added.
getWarningHTML | {String} String with information on why layer is broken, how to get it working.
getOLZoomFromMapObjectZoom |
getMapObjectZoomFromOLZoom |
setMapObjectCenter | Set the mapObject to the specified center and zoom
getMapObjectCenter | {Object} The mapObject’s current center in Map Object format
dragPanMapObject |
getMapObjectZoom | {Integer} The mapObject’s current zoom, in Map Object format
getMapObjectLonLatFromMapObjectPixel |
getMapObjectPixelFromMapObjectLonLat |
getLongitudeFromMapObjectLonLat |
getLatitudeFromMapObjectLonLat |
getMapObjectLonLatFromLonLat |
getXFromMapObjectPixel |
getYFromMapObjectPixel |
getMapObjectPixelFromXY |
getMapObjectSizeFromOLSize |
OpenLayers.Layer.GML | Create a vector layer by parsing a GML file.
Properties |
loaded | {Boolean} Flag for whether the GML data has been loaded yet.
format | {OpenLayers.Format} The format you want the data to be parsed with.
formatOptions | {Object} Hash of options which should be passed to the format when it is created.
Constructor |
OpenLayers.Layer.GML | Load and parse a single file on the web, according to the format provided via the ‘format’ option, defaulting to GML.
Functions |
setVisibility | Set the visibility flag for the layer and hide/show&redraw accordingly.
moveTo | If layer is visible and GML has not been loaded, load GML, then load GML and call OpenLayers.Layer.Vector.moveTo() to redraw at the new location.
loadGML |
setUrl | Change the URL and reload the GML
requestSuccess | Process GML after it has been loaded.
requestFailure | Process a failed loading of GML.
OpenLayers.Geometry.Rectangle | This class is not supported, and probably isn’t what you’re looking for.
Properties |
x | {Float}
y | {Float}
width | {Float}
height | {Float}
Constructor |
OpenLayers.Geometry.Rectangle |
Functions |
calculateBounds | Recalculate the bounds for the geometry.
getLength | {Float} The length of the geometry
getArea | {Float} The area of the geometry
OpenLayers.Renderer.NG |
Constants |
labelNodeType | {String} The node type for text label containers.
Constructor |
OpenLayers.Renderer.NG |
Functions |
updateDimensions |
resize |
drawFeature | Draw the feature.
drawText | Function for drawing text labels.
OpenLayers.Renderer.SVG2 |
Properties |
xmlns | {String}
xlinkns | {String}
symbolMetrics | {Object} Cache for symbol metrics according to their svg coordinate space.
Constants |
labelNodeType | {String} The node type for text label containers.
Constructor |
OpenLayers.Renderer.SVG2 |
Functions |
supported | {Boolean} Whether or not the browser supports the SVG renderer
updateDimensions |
getNodeType |
setStyle | Use to set all the style attributes to a SVG node.
dashStyle |
createNode |
nodeTypeCompare |
createRenderRoot | {DOMElement} The specific render engine’s root element
createRoot |
createDefs | {DOMElement} The element to which we’ll add the symbol definitions
drawPoint | This method is only called by the renderer itself.
drawCircle | This method is only called by the renderer itself.
drawLineString | This method is only called by the renderer itself.
drawLinearRing | This method is only called by the renderer itself.
drawPolygon | This method is only called by the renderer itself.
drawRectangle | This method is only called by the renderer itself.
drawText | Function for drawing text labels.
getComponentString |
getShortString |
importSymbol | add a new symbol definition from the rendererer’s symbol hash
getFeatureIdFromEvent |
Constants |
OpenLayers.Renderer.SVG2.LABEL_ALIGN | {Object}
OpenLayers.Renderer.SVG2.LABEL_VSHIFT | {Object}
OpenLayers.Renderer.SVG2.LABEL_VFACTOR | {Object}
Functions |
OpenLayers.Renderer.SVG2.preventDefault | Used to prevent default events (especially opening images in a new tab on ctrl-click) from being executed for externalGraphic and graphicName symbols

### Deprecated

The deprecated.js script includes all methods, properties, and constructors that are not supported as part of the long-term API. If you use any of these, you have to explicitly include this script in your application.

#### For example

>     <script src="deprecated.js" type="text/javascript"></script>

You are strongly encouraged to avoid using deprecated functionality. The documentation here should point you to the supported alternatives.

## OpenLayers.Class

Summary

Properties |
isPrototype | Deprecated.
Functions |
OpenLayers.create | Deprecated.
inherit | Deprecated.

### Properties

### isPrototype

Deprecated. This is no longer needed and will be removed at 3.0.

### Functions

### OpenLayers.create

Deprecated. Old method to create an OpenLayers style class. Use the OpenLayers.Class constructor instead.

#### Returns

An OpenLayers class

### inherit

> OpenLayers.Class.inherit = function ( | P | )

Deprecated. Old method to inherit from one or more OpenLayers style classes. Use the OpenLayers.Class constructor instead.

#### Parameters

class | One or more classes can be provided as arguments

#### Returns

An object prototype

## OpenLayers.Util

Summary

Functions |
clearArray | Deprecated.
setOpacity | Deprecated.
safeStopPropagation | Deprecated.
getArgs | Deprecated.

### Functions

### clearArray

> OpenLayers.Util.clearArray = function( | array | )

Deprecated. This function will disappear in 3.0. Please use “array.length = 0” instead.

#### Parameters

array | {Array}

### setOpacity

> OpenLayers.Util.setOpacity = function( | element,
> | opacity | )

Deprecated. This function has been deprecated. Instead, please use <OpenLayers.Util.modifyDOMElement> or <OpenLayers.Util.modifyAlphaImageDiv>

Set the opacity of a DOM Element Note that for this function to work in IE, elements must “have layout” according to: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/haslayout.asp

#### Parameters

element | {DOMElement} Set the opacity on this DOM element
opacity | {Float} Opacity value (0.0 - 1.0)

### safeStopPropagation

> OpenLayers.Util.safeStopPropagation = function( | evt | )

Deprecated. This function has been deprecated. Please use directly OpenLayers.Event.stop passing ‘true’ as the 2nd argument (preventDefault)

Safely stop the propagation of an event without preventing the default browser action from occurring.

#### Parameters

evt | {Event}

### getArgs

> OpenLayers.Util.getArgs = function( | url | )

Deprecated. Will be removed in 3.0. Please use instead <OpenLayers.Util.getParameters>

#### Parameters

url | {String} Optional url used to extract the query string. If null, query string is taken from page location.

#### Returns

{Object} An object of key/value pairs from the query string.

## OpenLayers.Ajax

Summary

Functions |
OpenLayers.nullHandler | @param {} request
OpenLayers.loadURL | Background load a document.
OpenLayers.parseXMLString | Parse XML into a doc structure
emptyFunction |
getTransport | {Object} Transport mechanism for whichever browser we’re in, or false if none available.
Properties |
activeRequestCount | {Integer}

### Functions

### OpenLayers.nullHandler

> OpenLayers.nullHandler = function( | request | )

@param {} request

### OpenLayers.loadURL

> OpenLayers.loadURL = function( | uri,
> | params,
> | caller,
> | onComplete,
> | onFailure | )

Background load a document. Deprecated. Use OpenLayers.Request.GET method instead.

#### Parameters

uri | {String} URI of source doc
params | {String} or {Object} GET params. Either a string in the form “?hello=world&foo=bar” (do not forget the leading question mark) or an object in the form {‘hello’: ‘world’, ‘foo’: ‘bar}
caller | {Object} object which gets callbacks
onComplete | {Function} Optional callback for success. The callback will be called with this set to caller and will receive the request object as an argument. Note that if you do not specify an onComplete function, OpenLayers.nullHandler will be called (which pops up a user friendly error message dialog).
onFailure | {Function} Optional callback for failure. In the event of a failure, the callback will be called with this set to caller and will receive the request object as an argument. Note that if you do not specify an onComplete function, OpenLayers.nullHandler will be called (which pops up a user friendly error message dialog).

#### Returns

{OpenLayers.Request.XMLHttpRequest} The request object. To abort loading, call request.abort().

### OpenLayers.parseXMLString

> OpenLayers.parseXMLString = function( | text | )

Parse XML into a doc structure

#### Parameters

text | {String}

#### Returns

{?} Parsed AJAX Responsev

### emptyFunction

> emptyFunction: function ()

### getTransport

> getTransport: function()

#### Returns

{Object} Transport mechanism for whichever browser we’re in, or false if none available.

### Properties

### activeRequestCount

{Integer}

## OpenLayers.Ajax.Responders

{Object}

Summary

Properties |
responders | {Array}
Functions |
register |
unregister |
dispatch |
onCreate |
onComplete |

### Properties

### responders

{Array}

### Functions

### register

> register: function( | responderToAdd | )

#### Parameters

responderToAdd | {?}

### unregister

> unregister: function( | responderToRemove | )

#### Parameters

responderToRemove | {?}

### dispatch

> dispatch: function( | callback,
> | request,
> | transport | )

#### Parameters

callback | {?}
request | {?}
transport | {?}

### onCreate

> onCreate: function()

### onComplete

> onComplete: function()

## OpenLayers.Ajax.Base

Summary

Constructor |
OpenLayers.Ajax.Base |

### Constructor

### OpenLayers.Ajax.Base

#### Parameters

options | {Object}

## OpenLayers.Ajax.Request

Deprecated. Use OpenLayers.Request method instead.

#### Inherit

- OpenLayers.Ajax.Base

Summary

Properties |
_complete | {Boolean}
Constructor |
OpenLayers.Ajax.Request |
Functions |
request |
onStateChange |
setRequestHeaders |
success | {Boolean} -
getStatus |
respondToReadyState |
getHeader |
dispatchException | If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException.
Properties |
Events | {Array(String)}

### Properties

### _complete

{Boolean}

### Constructor

### OpenLayers.Ajax.Request

#### Parameters

url | {String}
options | {Object}

### Functions

### request

> request: function( | url | )

#### Parameters

url | {String}

### onStateChange

> onStateChange: function()

### setRequestHeaders

> setRequestHeaders: function()

### success

> success: function()

#### Returns

{Boolean} -

### getStatus

> getStatus: function()

#### Returns

{Integer} | Status

### respondToReadyState

> respondToReadyState: function( | readyState | )

#### Parameters

readyState | {?}

### getHeader

> getHeader: function( | name | )

#### Parameters

name | {String} Header name

#### Returns

{?} | response header for the given name

### dispatchException

> dispatchException: function( | exception | )

If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException.

If no optional onException function is set, we suspect that the user may have also not used OpenLayers.Ajax.Responders.register to register a listener for the onException call. To make sure that something gets done with this exception, only dispatch the call if there are listeners.

If you explicitly want to swallow exceptions, set request.options.onException to an empty function (function(){}) or register an empty function with OpenLayers.Ajax.Responders for onException.

#### Parameters

exception | {?}

### Properties

### Events

{Array(String)}

## OpenLayers.Ajax.Response

Summary

Properties |
status | {Integer}
statusText | {String}
Constructor |
OpenLayers.Ajax.Response |
Functions |
getStatus |
getStatustext |
getHeader |
getResponseHeader |
getElementsByTagNameNS |
serializeXMLToString | Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari.

### Properties

### status

{Integer}

### statusText

{String}

### Constructor

### OpenLayers.Ajax.Response

#### Parameters

request | {Object}

### Functions

### getStatus

### getStatustext

#### Returns

{String} | statusText

### getHeader

### getResponseHeader

> getResponseHeader: function( | name | )

#### Returns

{?} | response header for given name

### getElementsByTagNameNS

> OpenLayers.Ajax.getElementsByTagNameNS = function( | parentnode,
> | nsuri,
> | nsprefix,
> | tagname | )

#### Parameters

parentnode | {?}
nsuri | {?}
nsprefix | {?}
tagname | {?}

#### Returns

{?}

### serializeXMLToString

> OpenLayers.Ajax.serializeXMLToString = function( | xmldom | )

Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari. We need to come up with a way to serialize in those browser: for now, these browsers will just fail. #535, #536

#### Parameters

xmldom {XMLNode} xml dom to serialize

#### Returns

{?}

## OpenLayers.Element

Summary

Functions |
hide | Deprecated.
show | Deprecated.
getDimensions | Deprecated.
String.startsWith | Deprecated.
String.contains | Deprecated.
String.trim | Deprecated.
String.camelize | Deprecated.
Function.bind | Deprecated.
Function.bindAsEventListener | Deprecated.

### Functions

### hide

> hide: function()

Deprecated. Hide element(s) passed in

#### Parameters

element | {DOMElement} Actually user can pass any number of elements

### show

> show: function()

Deprecated. Show element(s) passed in

#### Parameters

element | {DOMElement} Actually user can pass any number of elements

### getDimensions

> getDimensions: function( | element | )

Deprecated. Returns dimensions of the element passed in.

#### Parameters

element | {DOMElement}

#### Returns

{Object} Object with ‘width’ and ‘height’ properties which are the dimensions of the element passed in.

### String.startsWith

Deprecated. Whether or not a string starts with another string.

#### Parameters

sStart | {String} The string we’re testing for.

#### Returns

{Boolean} Whether or not this string starts with the string passed in.

### String.contains

Deprecated. Whether or not a string contains another string.

#### Parameters

str | {String} The string that we’re testing for.

#### Returns

{Boolean} Whether or not this string contains with the string passed in.

### String.trim

Deprecated. Removes leading and trailing whitespace characters from a string.

#### Returns

{String} A trimmed version of the string | all leading and trailing spaces removed

### String.camelize

Deprecated. Camel-case a hyphenated string. Ex. “chicken-head” becomes “chickenHead”, and “-chicken-head” becomes “ChickenHead”.

#### Returns

{String} The string, camelized

### Function.bind

Deprecated. Bind a function to an object. Method to easily create closures with ‘this’ altered.

#### Parameters

object | {Object} the this parameter

#### Returns

{Function} A closure with ‘this’ altered to the first argument.

### Function.bindAsEventListener

Deprecated. Bind a function to an object, and configure it to receive the event object as first parameter when called.

#### Parameters

object | {Object} A reference to this.

#### Returns

{Function}

## OpenLayers.Tile

Summary

Functions |
getBoundsFromBaseLayer | Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.

### Functions

### getBoundsFromBaseLayer

> getBoundsFromBaseLayer: function( | position | )

Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.

#### Parameters

position | {OpenLayers.Pixel}

#### Returns

bounds | {OpenLayers.Bounds}

## OpenLayers.Control.MouseDefaults

This class is DEPRECATED in 2.4 and will be removed by 3.0. If you need this functionality, use OpenLayers.Control.Navigation instead!!!

#### Inherits from

- OpenLayers.Control

Summary

Properties |
performedDrag | {Boolean}
wheelObserver | {Function}
Constructor |
OpenLayers.Control.MouseDefaults |
Functions |
destroy |
draw |
registerWheelEvents |
defaultClick |
defaultDblClick |
defaultMouseDown |
defaultMouseMove |
defaultMouseUp |
defaultMouseOut |
defaultWheelUp | User spun scroll wheel up
defaultWheelDown | User spun scroll wheel down
zoomBoxEnd | Zoombox function.
removeZoomBox | Remove the zoombox from the screen and nullify our reference to it.
onWheelEvent | Catch the wheel event and handle it xbrowserly

### Properties

### performedDrag

{Boolean}

### wheelObserver

{Function}

### Constructor

### OpenLayers.Control.MouseDefaults

### Functions

### destroy

> destroy: function()

### draw

> draw: function()

### registerWheelEvents

> registerWheelEvents: function()

### defaultClick

> defaultClick: function ( | evt | )

#### Parameters

evt | {Event}

#### Returns

{Boolean}

### defaultDblClick

> defaultDblClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultMouseDown

> defaultMouseDown: function ( | evt | )

#### Parameters

evt | {Event}

### defaultMouseMove

> defaultMouseMove: function ( | evt | )

#### Parameters

evt | {Event}

### defaultMouseUp

> defaultMouseUp: function ( | evt | )

#### Parameters

evt | {OpenLayers.Event}

### defaultMouseOut

> defaultMouseOut: function ( | evt | )

#### Parameters

evt | {Event}

### defaultWheelUp

> defaultWheelUp: function( | evt | )

User spun scroll wheel up

### defaultWheelDown

> defaultWheelDown: function( | evt | )

User spun scroll wheel down

### zoomBoxEnd

> zoomBoxEnd: function( | evt | )

Zoombox function.

### removeZoomBox

> removeZoomBox: function()

Remove the zoombox from the screen and nullify our reference to it.

### onWheelEvent

> onWheelEvent: function( | e | )

Catch the wheel event and handle it xbrowserly

#### Parameters

e | {Event}

## OpenLayers.Control.MouseToolbar

This class is DEPRECATED in 2.4 and will be removed by 3.0. If you need this functionality, use OpenLayers.Control.NavToolbar instead!!!

Summary

Properties |
mode |
buttons |
direction | {String} ‘vertical’ or ‘horizontal’
buttonClicked | {String}
Constructor |
OpenLayers.Control.MouseToolbar |
Functions |
destroy |
draw |
_addButton |
buttonDown |
buttonUp |
defaultDblClick |
defaultMouseDown |
switchModeTo |
leaveMode |
defaultMouseMove |
defaultMouseUp |
defaultMouseOut |
defaultClick |

### Properties

### mode

### buttons

### direction

{String} ‘vertical’ or ‘horizontal’

### buttonClicked

{String}

### Constructor

### OpenLayers.Control.MouseToolbar

#### Parameters

position | {OpenLayers.Pixel}
direction | {String}

### Functions

### destroy

> destroy: function()

### draw

> draw: function()

### _addButton

> _addButton:function( | id,
> | img,
> | activeImg,
> | xy,
> | sz,
> | title | )

### buttonDown

> buttonDown: function( | evt | )

#### Parameters

evt | {Event}

### buttonUp

> buttonUp: function( | evt | )

#### Parameters

evt | {Event}

### defaultDblClick

> defaultDblClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultMouseDown

> defaultMouseDown: function ( | evt | )

#### Parameters

evt | {Event}

### switchModeTo

> switchModeTo: function( | mode | )

#### Parameters

mode | {String}

### leaveMode

> leaveMode: function()

### defaultMouseMove

> defaultMouseMove: function ( | evt | )

#### Parameters

evt | {Event}

### defaultMouseUp

> defaultMouseUp: function ( | evt | )

#### Parameters

evt | {Event}

### defaultMouseOut

> defaultMouseOut: function ( | evt | )

#### Parameters

evt | {Event}

### defaultClick

> defaultClick: function ( | evt | )

#### Parameters

evt | {Event}

## OpenLayers.Layer.Grid

Summary

Functions |
getGridBounds | Deprecated.

### Functions

### getGridBounds

> getGridBounds: function()

Deprecated. This function will be removed in 3.0. Please use getTilesBounds() instead.

#### Returns

{OpenLayers.Bounds} A Bounds object representing the bounds of all the currently loaded tiles (including those partially or not at all seen onscreen)

## OpenLayers.Format.XML

Summary

Functions |
concatChildValues | Deprecated.

### Functions

### concatChildValues

> concatChildValues: function( | node,
> | def | )

Deprecated. Use getChildValue instead.

Concatenate the value of all child nodes if any exist, or return an optional default string. Returns an empty string if no children exist and no default value is supplied. Not optimized for large numbers of child nodes.

#### Parameters

node | {DOMElement} The element used to look for child values.
def | {String} Optional string to return in the event that no child exist.

#### Returns

{String} The concatenated value of all child nodes of the given node.

## OpenLayers.Layer.WMS.Post

Instances of OpenLayers.Layer.WMS.Post are used to retrieve data from OGC Web Mapping Services via HTTP-POST (application/x-www-form-urlencoded). Create a new WMS layer with the OpenLayers.Layer.WMS.Post constructor.

Deprecated. Instead of this layer, use OpenLayers.Layer.WMS with OpenLayers.Tile.Image.maxGetUrlLength configured in the layer’s <OpenLayers.Layer.WMS.tileOptions>.

#### Inherits from

- OpenLayers.Layer.WMS

Summary

Properties |
unsupportedBrowsers | {Array} Array with browsers, which should use the HTTP-GET protocol instead of HTTP-POST for fetching tiles from a WMS .
SUPPORTED_TRANSITIONS | {Array} no supported transitions for this type of layer, because it is not possible to modify the initialized tiles (iframes)
usePost | {Boolean}
Constructor |
OpenLayers.Layer.WMS.Post | Creates a new WMS layer object.
Functions |
addTile | addTile creates a tile, initializes it and adds it as iframe to the layer div.

### Properties

### unsupportedBrowsers

{Array} Array with browsers, which should use the HTTP-GET protocol instead of HTTP-POST for fetching tiles from a WMS . Defaults to [“mozilla”, “firefox”, “opera”], because Opera is not able to show transparent images in IFrames and Firefox/Mozilla has some ugly effects of viewport-shaking when panning the map. Both browsers, Opera and Firefox/Mozilla, have no problem with long urls, which is the reason for using POST instead of GET. The strings to pass to this array are the ones returned by <OpenLayers.BROWSER_NAME>.

### SUPPORTED_TRANSITIONS

{Array} no supported transitions for this type of layer, because it is not possible to modify the initialized tiles (iframes)

### usePost

{Boolean}

### Constructor

### OpenLayers.Layer.WMS.Post

Creates a new WMS layer object.

#### Example

>     var wms = new OpenLayers.Layer.WMS.Post(
>      "NASA Global Mosaic",
>      "http://wms.jpl.nasa.gov/wms.cgi",
>      {layers: "modis, global_mosaic"});

#### Parameters

name | {String} A name for the layer
url | {String} Base url for the WMS (e.g. http://wms.jpl.nasa.gov/wms.cgi)
params | {Object} An object with key/value pairs representing the GetMap query string parameters and parameter values.
options | {Object} Hashtable of extra options to tag onto the layer.

### Functions

### addTile

> addTile: function( | bounds,
> | position | )

addTile creates a tile, initializes it and adds it as iframe to the layer div.

#### Parameters

bounds | {OpenLayers.Bounds}
position | {OpenLayers.Pixel}

#### Returns

{OpenLayers.Tile.Image.IFrame} The added OpenLayers.Tile.Image.IFrame

## OpenLayers.Layer.WMS.Untiled

Deprecated. To be removed in 3.0. Instead use OpenLayers.Layer.WMS and pass the option ‘singleTile’ as true.

#### Inherits from

- OpenLayers.Layer.WMS

Summary

Properties |
singleTile | {singleTile} Always true for untiled.
Constructor |
OpenLayers.Layer.WMS.Untiled |
Functions |
clone | Create a clone of this layer

### Properties

### singleTile

{singleTile} Always true for untiled.

### Constructor

### OpenLayers.Layer.WMS.Untiled

#### Parameters

name | {String}
url | {String}
params | {Object}
options | {Object}

### Functions

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

{OpenLayers.Layer.WMS.Untiled} An exact clone of this layer

## OpenLayers.Layer.MapServer.Untiled

Deprecated. To be removed in 3.0. Instead use OpenLayers.Layer.MapServer and pass the option ‘singleTile’ as true.

#### Inherits from

- OpenLayers.Layer.MapServer

Summary

Properties |
singleTile | {singleTile} Always true for untiled.
Constructor |
OpenLayers.Layer.MapServer.Untiled |
Functions |
clone | Create a clone of this layer

### Properties

### singleTile

{singleTile} Always true for untiled.

### Constructor

### OpenLayers.Layer.MapServer.Untiled

#### Parameters

name | {String}
url | {String}
params | {Object}
options | {Object}

### Functions

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

{OpenLayers.Layer.MapServer.Untiled} An exact clone of this layer

## OpenLayers.Tile.WFS

Instances of OpenLayers.Tile.WFS are used to manage the image tiles used by various layers. Create a new image tile with the OpenLayers.Tile.WFS constructor.

#### Inherits from

- OpenLayers.Tile

Summary

Properties |
features | {Array(OpenLayers.Feature)} list of features in this tile
url | {String}
request | {OpenLayers.Request.XMLHttpRequest}
Functions |
destroy | nullify references to prevent circular references and memory leaks
clear | Clear the tile of any bounds/position-related data so that it can be reused in a new location.
draw | Check that a tile should be drawn, and load features for it.
loadFeaturesForRegion | Abort any pending requests and issue another request for data.
requestSuccess | Called on return from request succcess.
addResults | Construct new feature via layer featureClass constructor, and add to this.features.
destroyAllFeatures | Iterate through and call destroy() on each feature, removing it from the local array

### Properties

### features

{Array(OpenLayers.Feature)} list of features in this tile

### url

{String}

### request

{OpenLayers.Request.XMLHttpRequest}

### Functions

### destroy

> destroy: function()

nullify references to prevent circular references and memory leaks

### clear

> clear: function()

Clear the tile of any bounds/position-related data so that it can be reused in a new location.

### draw

> draw:function()

Check that a tile should be drawn, and load features for it.

### loadFeaturesForRegion

> loadFeaturesForRegion:function( | success,
> | failure | )

Abort any pending requests and issue another request for data.

Input are function pointers for what to do on success and failure.

#### Parameters

success | {function}
failure | {function}

### requestSuccess

> requestSuccess:function( | request | )

Called on return from request succcess. Adds results via layer.addFeatures in vector mode, addResults otherwise.

#### Parameters

request | {OpenLayers.Request.XMLHttpRequest}

### addResults

> addResults: function( | results | )

Construct new feature via layer featureClass constructor, and add to this.features.

#### Parameters

results | {Object}

### destroyAllFeatures

> destroyAllFeatures: function()

Iterate through and call destroy() on each feature, removing it from the local array

## OpenLayers.Feature.WFS

WFS handling class, for use as a featureClass on the WFS layer for handling ‘point’ WFS types. Good for subclassing when creating a custom WFS like XML application.

#### Inherits from

- OpenLayers.Feature

Summary

Constructor |
OpenLayers.Feature.WFS | Create a WFS feature.
Functions |
destroy | nullify references to prevent circular references and memory leaks
processXMLNode | When passed an xmlNode, parses it for a GML point, and passes back an object describing that point.

### Constructor

### OpenLayers.Feature.WFS

Create a WFS feature.

#### Parameters

layer | {OpenLayers.Layer}
xmlNode | {XMLNode}

### Functions

### destroy

> destroy: function()

nullify references to prevent circular references and memory leaks

### processXMLNode

> processXMLNode: function( | xmlNode | )

When passed an xmlNode, parses it for a GML point, and passes back an object describing that point.

For subclasses of Feature.WFS, this is the feature to change.

#### Parameters

xmlNode | {XMLNode}

#### Returns

{Object} Data Object with ‘id’, ‘lonlat’, and private properties set

## OpenLayers.Layer.WFS

Deprecated. To be removed in 3.0. Instead use OpenLayers.Layer.Vector with a Protocol.WFS and one or more Strategies.

#### Inherits from

- OpenLayers.Layer.Vector
- OpenLayers.Layer.Markers

Summary

Properties |
isBaseLayer | {Boolean} WFS layer is not a base layer by default.
tile | {OpenLayers.Tile.WFS}
ratio | {Float} The ratio property determines the size of the serverside query relative to the map viewport size.
DEFAULT_PARAMS | {Object} Hashtable of default key/value parameters
featureClass | {OpenLayers.Feature} If featureClass is defined, an old-style markers based WFS layer is created instead of a new-style vector layer.
format | {OpenLayers.Format} The format you want the data to be parsed with.
formatObject | {OpenLayers.Format} Internally created/managed format object, used by the Tile to parse data.
formatOptions | {Object} Hash of options which should be passed to the format when it is created.
vectorMode | {Boolean} Should be calculated automatically.
encodeBBOX | {Boolean} Should the BBOX commas be encoded?
extractAttributes | {Boolean} Should the WFS layer parse attributes from the retrieved GML?
Constructor |
OpenLayers.Layer.WFS |
Functions |
destroy |
setMap |
moveTo |
addTileMonitoringHooks | This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tile (making sure to check that the tile is always the layer’s current tile before taking any action).
removeTileMonitoringHooks | This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()
onMapResize | Call the onMapResize method of the appropriate parent class.
display | Call the display method of the appropriate parent class.
mergeNewParams | Modify parameters for the layer and redraw.
clone |
getFullRequestString | combine the layer’s url with its params and these newParams.
commit | Write out the data to a WFS server.
commitSuccess | Called when the Ajax request returns a response
commitFailure | Called when the Ajax request fails
commitReport | Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.
refresh | Refreshes all the features of the layer
getDataExtent | Calculates the max extent which includes all of the layer data.
setOpacity | Call the setOpacity method of the appropriate parent class to set the opacity.

### Properties

### isBaseLayer

{Boolean} WFS layer is not a base layer by default.

### tile

{OpenLayers.Tile.WFS}

### ratio

{Float} The ratio property determines the size of the serverside query relative to the map viewport size. By default, we load an area twice as big as the map, to allow for panning without immediately reload. Setting this to 1 will cause the area of the WFS request to match the map area exactly. It is recommended to set this to some number at least slightly larger than 1, otherwise accidental clicks can cause a data reload, by moving the map only 1 pixel.

### DEFAULT_PARAMS

{Object} Hashtable of default key/value parameters

### featureClass

{OpenLayers.Feature} If featureClass is defined, an old-style markers based WFS layer is created instead of a new-style vector layer. If sent, this should be a subclass of OpenLayers.Feature

### format

{OpenLayers.Format} The format you want the data to be parsed with. Must be passed in the constructor. Should be a class, not an instance. This option can only be used if no featureClass is passed / vectorMode is false: if a featureClass is passed, then this parameter is ignored.

### formatObject

{OpenLayers.Format} Internally created/managed format object, used by the Tile to parse data.

### formatOptions

{Object} Hash of options which should be passed to the format when it is created. Must be passed in the constructor.

### vectorMode

{Boolean} Should be calculated automatically. Determines whether the layer is in vector mode or marker mode.

### encodeBBOX

{Boolean} Should the BBOX commas be encoded? The WMS spec says ‘no’, but some services want it that way. Default false.

### extractAttributes

{Boolean} Should the WFS layer parse attributes from the retrieved GML? Defaults to false. If enabled, parsing is slower, but attributes are available in the attributes property of layer features.

### Constructor

### OpenLayers.Layer.WFS

#### Parameters

name | {String}
url | {String}
params | {Object}
options | {Object} Hashtable of extra options to tag onto the layer

### Functions

### destroy

> destroy: function()

### setMap

> setMap: function( | map | )

#### Parameters

map | {OpenLayers.Map}

### moveTo

> moveTo:function( | bounds,
> | zoomChanged,
> | dragging | )

#### Parameters

bounds | {OpenLayers.Bounds}
zoomChanged | {Boolean}
dragging | {Boolean}

### addTileMonitoringHooks

> addTileMonitoringHooks: function( | tile | )

This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tile (making sure to check that the tile is always the layer’s current tile before taking any action).

#### Parameters

tile | {OpenLayers.Tile}

### removeTileMonitoringHooks

> removeTileMonitoringHooks: function( | tile | )

This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()

#### Parameters

tile | {OpenLayers.Tile}

### onMapResize

> onMapResize: function()

Call the onMapResize method of the appropriate parent class.

### display

> display: function()

Call the display method of the appropriate parent class.

### mergeNewParams

> mergeNewParams:function( | newParams | )

Modify parameters for the layer and redraw.

#### Parameters

newParams | {Object}

### clone

> clone: function ( | obj | )

#### Parameters

obj | {Object}

#### Returns

{OpenLayers.Layer.WFS} An exact clone of this OpenLayers.Layer.WFS

### getFullRequestString

> getFullRequestString:function( | newParams,
> | altUrl | )

combine the layer’s url with its params and these newParams.

Add the SRS parameter from ‘projection’ -- this is probably more eloquently done via a setProjection() method, but this works for now and always.

#### Parameters

newParams | {Object}
altUrl | {String} Use this as the url instead of the layer’s url

### commit

> commit: function()

Write out the data to a WFS server.

### commitSuccess

> commitSuccess: function( | request | )

Called when the Ajax request returns a response

#### Parameters

response | {XmlNode} from server

### commitFailure

> commitFailure: function( | request | )

Called when the Ajax request fails

#### Parameters

response | {XmlNode} from server

### commitReport

> commitReport: function( | string,
> | response | )

Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter. Override this function to provide custom transaction reporting.

string | {String} reporting string
response | {String} full XML response

### refresh

> refresh: function()

Refreshes all the features of the layer

### getDataExtent

> getDataExtent: function ()

Calculates the max extent which includes all of the layer data.

#### Returns

{OpenLayers.Bounds}

### setOpacity

> setOpacity: function ( | opacity | )

Call the setOpacity method of the appropriate parent class to set the opacity.

#### Parameters

opacity | {Float}

## OpenLayers.Layer.VirtualEarth

Deprecated. Use OpenLayers.Layer.Bing instead.

Instances of OpenLayers.Layer.VirtualEarth are used to display the data from the Bing Maps AJAX Control OpenLayers.Layer.VirtualEarth constructor.

#### Inherits from

- OpenLayers.Layer.EventPane
- OpenLayers.Layer.FixedZoomLevels

Summary

Constants |
MIN_ZOOM_LEVEL | {Integer} 1
MAX_ZOOM_LEVEL | {Integer} 19
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection
Properties |
type | {VEMapType}
wrapDateLine | {Boolean} Allow user to pan forever east/west.
sphericalMercator | {Boolean} Should the map act as a mercator-projected map?
animationEnabled | {Boolean} If set to true, the transition between zoom levels will be animated.
Constructor |
OpenLayers.Layer.VirtualEarth | Creates a new instance of a OpenLayers.Layer.VirtualEarth.
Functions |
loadMapObject |
onMapResize |
getWarningHTML | {String} String with information on why layer is broken, how to get it working.
setMapObjectCenter | Set the mapObject to the specified center and zoom
getMapObjectCenter | {Object} The mapObject’s current center in Map Object format
dragPanMapObject |
getMapObjectZoom | {Integer} The mapObject’s current zoom, in Map Object format
getMapObjectLonLatFromMapObjectPixel |
getMapObjectPixelFromMapObjectLonLat |
getLongitudeFromMapObjectLonLat |
getLatitudeFromMapObjectLonLat |
getMapObjectLonLatFromLonLat |
getXFromMapObjectPixel |
getYFromMapObjectPixel |
getMapObjectPixelFromXY |

### Constants

### MIN_ZOOM_LEVEL

{Integer} 1

### MAX_ZOOM_LEVEL

{Integer} 19

### RESOLUTIONS

{Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection

### Properties

### type

{VEMapType}

### wrapDateLine

{Boolean} Allow user to pan forever east/west. Default is true. Setting this to false only restricts panning if sphericalMercator is true.

### sphericalMercator

{Boolean} Should the map act as a mercator-projected map? This will cause all interactions with the map to be in the actual map projection, which allows support for vector drawing, overlaying other maps, etc.

### animationEnabled

{Boolean} If set to true, the transition between zoom levels will be animated. Set to false to match the zooming experience of other layer types. Default is true.

### Constructor

### OpenLayers.Layer.VirtualEarth

Creates a new instance of a OpenLayers.Layer.VirtualEarth. If you use an instance of OpenLayers.Layer.VirtualEarth in you map, you should set the OpenLayers.Map option restrictedExtent to a meaningful value, e.g.:

>     var map = new OpenLayers.Map( 'map', {
>         // other map options
>         restrictedExtent : OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508)
>     } );

>     var veLayer = new OpenLayers.Layer.VirtualEarth (
>         "Virtual Earth Layer"
>     );

>     map.addLayer( veLayer );

#### Parameters

name | {String}
options | {Object}

### Functions

### loadMapObject

> loadMapObject:function()

### onMapResize

> onMapResize: function()

### getWarningHTML

> getWarningHTML:function()

#### Returns

{String} String with information on why layer is broken, how to get it working.

### setMapObjectCenter

> setMapObjectCenter: function( | center,
> | zoom | )

Set the mapObject to the specified center and zoom

#### Parameters

center | {Object} MapObject LonLat format
zoom | {int} MapObject zoom format

### getMapObjectCenter

> getMapObjectCenter: function()

#### Returns

{Object} The mapObject’s current center in Map Object format

### dragPanMapObject

> dragPanMapObject: function( | dX,
> | dY | )

#### Parameters

dX | {Integer}
dY | {Integer}

### getMapObjectZoom

> getMapObjectZoom: function()

#### Returns

{Integer} The mapObject’s current zoom, in Map Object format

### getMapObjectLonLatFromMapObjectPixel

> getMapObjectLonLatFromMapObjectPixel: function( | moPixel | )

#### Parameters

moPixel | {Object} MapObject Pixel format

#### Returns

{Object} MapObject LonLat translated from MapObject Pixel

### getMapObjectPixelFromMapObjectLonLat

> getMapObjectPixelFromMapObjectLonLat: function( | moLonLat | )

#### Parameters

moLonLat | {Object} MapObject LonLat format

#### Returns

{Object} MapObject Pixel transtlated from MapObject LonLat

### getLongitudeFromMapObjectLonLat

> getLongitudeFromMapObjectLonLat: function( | moLonLat | )

#### Parameters

moLonLat | {Object} MapObject LonLat format

#### Returns

{Float} Longitude of the given MapObject LonLat

### getLatitudeFromMapObjectLonLat

> getLatitudeFromMapObjectLonLat: function( | moLonLat | )

#### Parameters

moLonLat | {Object} MapObject LonLat format

#### Returns

{Float} Latitude of the given MapObject LonLat

### getMapObjectLonLatFromLonLat

> getMapObjectLonLatFromLonLat: function( | lon,
> | lat | )

#### Parameters

lon | {Float}
lat | {Float}

#### Returns

{Object} MapObject LonLat built from lon and lat params

### getXFromMapObjectPixel

> getXFromMapObjectPixel: function( | moPixel | )

#### Parameters

moPixel | {Object} MapObject Pixel format

#### Returns

{Integer} X value of the MapObject Pixel

### getYFromMapObjectPixel

> getYFromMapObjectPixel: function( | moPixel | )

#### Parameters

moPixel | {Object} MapObject Pixel format

#### Returns

{Integer} Y value of the MapObject Pixel

### getMapObjectPixelFromXY

> getMapObjectPixelFromXY: function( | x,
> | y | )

#### Parameters

x | {Integer}
y | {Integer}

#### Returns

{Object} MapObject Pixel from x and y parameters

## OpenLayers.Protocol.SQL

Abstract SQL protocol class. Not to be instantiated directly. Use one of the SQL protocol subclasses instead.

#### Inherits from

- OpenLayers.Protocol

Summary

Properties |
databaseName | {String}
tableName | Name of the database table into which Features should be saved.
postReadFiltering | {Boolean} Whether the filter (if there’s one) must be applied after the features have been read from the database; for example the BBOX strategy passes the read method a BBOX spatial filter, if postReadFiltering is true every feature read from the database will go through the BBOX spatial filter, which can be costly; defaults to true.
Constructor |
OpenLayers.Protocol.SQL |
Functions |
destroy | Clean up the protocol.
supported | This should be overridden by specific subclasses
evaluateFilter | If postReadFiltering is true evaluate the filter against the feature and return the result of the evaluation, otherwise return true.

### Properties

### databaseName

{String}

### tableName

Name of the database table into which Features should be saved.

### postReadFiltering

{Boolean} Whether the filter (if there’s one) must be applied after the features have been read from the database; for example the BBOX strategy passes the read method a BBOX spatial filter, if postReadFiltering is true every feature read from the database will go through the BBOX spatial filter, which can be costly; defaults to true.

### Constructor

### OpenLayers.Protocol.SQL

### Functions

### destroy

> destroy: function()

Clean up the protocol.

### supported

> supported: function()

This should be overridden by specific subclasses

#### Returns

{Boolean} Whether or not the browser supports the SQL backend

### evaluateFilter

> evaluateFilter: function( | feature,
> | filter | )

If postReadFiltering is true evaluate the filter against the feature and return the result of the evaluation, otherwise return true.

#### Parameters

{OpenLayers.Feature.Vector} The feature. {OpenLayers.Filter} The filter.

#### Returns

{Boolean} true if postReadFiltering if false, the result of the filter evaluation otherwise.

## OpenLayers.Protocol.SQL.Gears

This Protocol stores feature in the browser via the Gears Database module http://code.google.com/apis/gears/api_database.html.

The main advantage is that all the read, create, update and delete operations can be done offline.

#### Inherits from

- OpenLayers.Protocol.SQL

Summary

Properties |
FID_PREFIX | {String}
NULL_GEOMETRY | {String}
NULL_FEATURE_STATE | {String}
jsonParser | {OpenLayers.Format.JSON}
wktParser | {OpenLayers.Format.WKT}
fidRegExp | {RegExp} Regular expression to know whether a feature was created in offline mode.
saveFeatureState | {Boolean} Whether to save the feature state (<OpenLayers.State>) into the database, defaults to true.
typeOfFid | {String} The type of the feature identifier, either “number” or “string”, defaults to “string”.
db | {GearsDatabase}
Constructor |
OpenLayers.Protocol.SQL.Gears |
Functions |
initializeDatabase |
destroy | Clean up the protocol.
supported | Determine whether a browser supports Gears
read | Read all features from the database and return a OpenLayers.Protocol.Response instance.
unfreezeFeature |
extractFidFromField |
create | Create new features into the database.
update | Construct a request updating modified feature.
createOrUpdate | Construct a request for updating or creating features in the database.
freezeFeature |
getFeatureStateForFreeze | Get the state of the feature to store into the database.
delete | Delete features from the database.
createdOffline | Returns true if the feature had a feature id when it was created in the Gears database, false otherwise; this is determined by checking the form of the feature’s fid value.
commit | Go over the features and for each take action based on the feature state.
clear | Removes all rows of the table.
callUserCallback | This method is called from within commit each time a request is made to the database, it is responsible for calling the user-supplied callbacks.

### Properties

### FID_PREFIX

{String}

### NULL_GEOMETRY

{String}

### NULL_FEATURE_STATE

{String}

### jsonParser

{OpenLayers.Format.JSON}

### wktParser

{OpenLayers.Format.WKT}

### fidRegExp

{RegExp} Regular expression to know whether a feature was created in offline mode.

### saveFeatureState

{Boolean} Whether to save the feature state (<OpenLayers.State>) into the database, defaults to true.

### typeOfFid

{String} The type of the feature identifier, either “number” or “string”, defaults to “string”.

### db

{GearsDatabase}

### Constructor

### OpenLayers.Protocol.SQL.Gears

### Functions

### initializeDatabase

> initializeDatabase: function()

### destroy

> destroy: function()

Clean up the protocol.

### supported

> supported: function()

Determine whether a browser supports Gears

#### Returns

{Boolean} The browser supports Gears

### read

> read: function( | options | )

Read all features from the database and return a OpenLayers.Protocol.Response instance. If the options parameter contains a callback attribute, the function is called with the response as a parameter.

#### Parameters

options | {Object} Optional object for configuring the request; it can have the {Boolean} property “noFeatureStateReset” which specifies if the state of features read from the Gears database must be reset to null, if “noFeatureStateReset” is undefined or false then each feature’s state is reset to null, if “noFeatureStateReset” is true the feature state is preserved.

#### Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object.

### unfreezeFeature

> unfreezeFeature: function( | row | )

#### Parameters

row | {ResultSet}

#### Returns

{OpenLayers.Feature.Vector}

### extractFidFromField

> extractFidFromField: function( | field | )

#### Parameters

field | {String}

Returns {String} or {Number} The fid.

### create

> create: function( | features,
> | options | )

Create new features into the database.

#### Parameters

features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features to create in the database.
options | {Object} Optional object for configuring the request.

#### Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object.

### update

> update: function( | features,
> | options | )

Construct a request updating modified feature.

#### Parameters

features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features to update in the database.
options | {Object} Optional object for configuring the request.

#### Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object.

### createOrUpdate

> createOrUpdate: function( | features | )

Construct a request for updating or creating features in the database.

#### Parameters

features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The feature to create or update in the database.

#### Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object.

### freezeFeature

> freezeFeature: function( | feature | )

#### Parameters

feature | {OpenLayers.Feature.Vector}
state | {String} The feature state to store in the database.

#### Returns

{Array}

### getFeatureStateForFreeze

> getFeatureStateForFreeze: function( | feature | )

Get the state of the feature to store into the database.

#### Parameters

feature | {OpenLayers.Feature.Vector} The feature.

Returns {String} The state

### delete

> "delete": function( | features,
> | options | )

Delete features from the database.

#### Parameters

features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector}
options | {Object} Optional object for configuring the request. This object is modified and should not be reused.

#### Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object.

### createdOffline

> createdOffline: function( | feature | )

Returns true if the feature had a feature id when it was created in the Gears database, false otherwise; this is determined by checking the form of the feature’s fid value.

#### Parameters

feature | {OpenLayers.Feature.Vector}

#### Returns

{Boolean}

### commit

> commit: function( | features,
> | options | )

Go over the features and for each take action based on the feature state. Possible actions are create, update and delete.

#### Parameters

features | {Array({OpenLayers.Feature.Vector})}
options | {Object} Object whose possible keys are “create”, “update”, “delete”, “callback” and “scope”, the values referenced by the first three are objects as passed to the “create”, “update”, and “delete” methods, the value referenced by the “callback” key is a function which is called when the commit operation is complete using the scope referenced by the “scope” key.

#### Returns

{Array({OpenLayers.Protocol.Response})} An array of OpenLayers.Protocol.Response objects, one per request made to the database.

### clear

> clear: function()

Removes all rows of the table.

### callUserCallback

> callUserCallback: function( | options,
> | resp | )

This method is called from within commit each time a request is made to the database, it is responsible for calling the user-supplied callbacks.

#### Parameters

options | {Object} The map of options passed to the commit call.
resp | {OpenLayers.Protocol.Response}

## OpenLayers.Layer.Yahoo

#### Inherits from

- OpenLayers.Layer.EventPane
- OpenLayers.Layer.FixedZoomLevels

Summary

Constants |
MIN_ZOOM_LEVEL | {Integer} 0
MAX_ZOOM_LEVEL | {Integer} 17
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection
Properties |
type | {YahooMapType}
wrapDateLine | {Boolean} Allow user to pan forever east/west.
sphericalMercator | {Boolean} Should the map act as a mercator-projected map?
Constructor |
OpenLayers.Layer.Yahoo |
Functions |
loadMapObject |
onMapResize |
setMap | Overridden from EventPane because we need to remove this yahoo event pane which prohibits our drag and drop, and we can only do this once the map has been loaded and centered.
fixYahooEventPane | The map has been centered, so the mysterious yahoo eventpane has been added.
getWarningHTML | {String} String with information on why layer is broken, how to get it working.
getOLZoomFromMapObjectZoom |
getMapObjectZoomFromOLZoom |
setMapObjectCenter | Set the mapObject to the specified center and zoom
getMapObjectCenter | {Object} The mapObject’s current center in Map Object format
dragPanMapObject |
getMapObjectZoom | {Integer} The mapObject’s current zoom, in Map Object format
getMapObjectLonLatFromMapObjectPixel |
getMapObjectPixelFromMapObjectLonLat |
getLongitudeFromMapObjectLonLat |
getLatitudeFromMapObjectLonLat |
getMapObjectLonLatFromLonLat |
getXFromMapObjectPixel |
getYFromMapObjectPixel |
getMapObjectPixelFromXY |
getMapObjectSizeFromOLSize |

### Constants

### MIN_ZOOM_LEVEL

{Integer} 0

### MAX_ZOOM_LEVEL

{Integer} 17

### RESOLUTIONS

{Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection

### Properties

### type

{YahooMapType}

### wrapDateLine

{Boolean} Allow user to pan forever east/west. Default is true. Setting this to false only restricts panning if sphericalMercator is true.

### sphericalMercator

{Boolean} Should the map act as a mercator-projected map? This will cause all interactions with the map to be in the actual map projection, which allows support for vector drawing, overlaying other maps, etc.

### Constructor

### OpenLayers.Layer.Yahoo

#### Parameters

name | {String}
options | {Object}

### Functions

### loadMapObject

> loadMapObject:function()

### onMapResize

> onMapResize: function()

### setMap

> setMap: function( | map | )

Overridden from EventPane because we need to remove this yahoo event pane which prohibits our drag and drop, and we can only do this once the map has been loaded and centered.

#### Parameters

map | {OpenLayers.Map}

### fixYahooEventPane

> fixYahooEventPane: function()

The map has been centered, so the mysterious yahoo eventpane has been added. we remove it so that it doesnt mess with our event pane.

### getWarningHTML

> getWarningHTML:function()

#### Returns

{String} String with information on why layer is broken, how to get it working.

### getOLZoomFromMapObjectZoom

> getOLZoomFromMapObjectZoom: function( | moZoom | )

#### Parameters

gZoom | {Integer}

#### Returns

{Integer} An OpenLayers Zoom level, translated from the passed in gZoom Returns null if null value is passed in.

### getMapObjectZoomFromOLZoom

> getMapObjectZoomFromOLZoom: function( | olZoom | )

#### Parameters

olZoom | {Integer}

#### Returns

{Integer} A MapObject level, translated from the passed in olZoom Returns null if null value is passed in

### setMapObjectCenter

> setMapObjectCenter: function( | center,
> | zoom | )

Set the mapObject to the specified center and zoom

#### Parameters

center | {Object} MapObject LonLat format
zoom | {int} MapObject zoom format

### getMapObjectCenter

> getMapObjectCenter: function()

#### Returns

{Object} The mapObject’s current center in Map Object format

### dragPanMapObject

> dragPanMapObject: function( | dX,
> | dY | )

#### Parameters

dX | {Integer}
dY | {Integer}

### getMapObjectZoom

> getMapObjectZoom: function()

#### Returns

{Integer} The mapObject’s current zoom, in Map Object format

### getMapObjectLonLatFromMapObjectPixel

> getMapObjectLonLatFromMapObjectPixel: function( | moPixel | )

#### Parameters

moPixel | {Object} MapObject Pixel format

#### Returns

{Object} MapObject LonLat translated from MapObject Pixel

### getMapObjectPixelFromMapObjectLonLat

> getMapObjectPixelFromMapObjectLonLat: function( | moLonLat | )

#### Parameters

moLonLat | {Object} MapObject LonLat format

#### Returns

{Object} MapObject Pixel transtlated from MapObject LonLat

### getLongitudeFromMapObjectLonLat

> getLongitudeFromMapObjectLonLat: function( | moLonLat | )

#### Parameters

moLonLat | {Object} MapObject LonLat format

#### Returns

{Float} Longitude of the given MapObject LonLat

### getLatitudeFromMapObjectLonLat

> getLatitudeFromMapObjectLonLat: function( | moLonLat | )

#### Parameters

moLonLat | {Object} MapObject LonLat format

#### Returns

{Float} Latitude of the given MapObject LonLat

### getMapObjectLonLatFromLonLat

> getMapObjectLonLatFromLonLat: function( | lon,
> | lat | )

#### Parameters

lon | {Float}
lat | {Float}

#### Returns

{Object} MapObject LonLat built from lon and lat params

### getXFromMapObjectPixel

> getXFromMapObjectPixel: function( | moPixel | )

#### Parameters

moPixel | {Object} MapObject Pixel format

#### Returns

{Integer} X value of the MapObject Pixel

### getYFromMapObjectPixel

> getYFromMapObjectPixel: function( | moPixel | )

#### Parameters

moPixel | {Object} MapObject Pixel format

#### Returns

{Integer} Y value of the MapObject Pixel

### getMapObjectPixelFromXY

> getMapObjectPixelFromXY: function( | x,
> | y | )

#### Parameters

x | {Integer}
y | {Integer}

#### Returns

{Object} MapObject Pixel from x and y parameters

### getMapObjectSizeFromOLSize

> getMapObjectSizeFromOLSize: function( | olSize | )

#### Parameters

olSize | {OpenLayers.Size}

#### Returns

{Object} MapObject Size from olSize parameter

## OpenLayers.Layer.GML

Create a vector layer by parsing a GML file. The GML file is passed in as a parameter. Deprecated. To be removed in 3.0. Instead use OpenLayers.Layer.Vector with Protocol.HTTP and Strategy.Fixed. Provide the protocol with a format parameter to get the parser you want for your data.

#### Inherits from

- OpenLayers.Layer.Vector

Summary

Properties |
loaded | {Boolean} Flag for whether the GML data has been loaded yet.
format | {OpenLayers.Format} The format you want the data to be parsed with.
formatOptions | {Object} Hash of options which should be passed to the format when it is created.
Constructor |
OpenLayers.Layer.GML | Load and parse a single file on the web, according to the format provided via the ‘format’ option, defaulting to GML.
Functions |
setVisibility | Set the visibility flag for the layer and hide/show&redraw accordingly.
moveTo | If layer is visible and GML has not been loaded, load GML, then load GML and call OpenLayers.Layer.Vector.moveTo() to redraw at the new location.
loadGML |
setUrl | Change the URL and reload the GML
requestSuccess | Process GML after it has been loaded.
requestFailure | Process a failed loading of GML.

### Properties

### loaded

{Boolean} Flag for whether the GML data has been loaded yet.

### format

{OpenLayers.Format} The format you want the data to be parsed with.

### formatOptions

{Object} Hash of options which should be passed to the format when it is created. Must be passed in the constructor.

### Constructor

### OpenLayers.Layer.GML

Load and parse a single file on the web, according to the format provided via the ‘format’ option, defaulting to GML.

#### Parameters

name | {String}
url | {String} URL of a GML file.
options | {Object} Hashtable of extra options to tag onto the layer.

### Functions

### setVisibility

> setVisibility: function( | visibility,
> | noEvent | )

Set the visibility flag for the layer and hide/show&redraw accordingly. Fire event unless otherwise specified GML will be loaded if the layer is being made visible for the first time.

#### Parameters

visible | {Boolean} Whether or not to display the layer (if in range)
noEvent | {Boolean}

### moveTo

> moveTo:function( | bounds,
> | zoomChanged,
> | minor | )

If layer is visible and GML has not been loaded, load GML, then load GML and call OpenLayers.Layer.Vector.moveTo() to redraw at the new location.

#### Parameters

bounds | {Object}
zoomChanged | {Object}
minor | {Object}

### loadGML

> loadGML: function()

### setUrl

> setUrl:function( | url | )

Change the URL and reload the GML

#### Parameters

url | {String} URL of a GML file.

### requestSuccess

> requestSuccess:function( | request | )

Process GML after it has been loaded. Called by initialize() and loadUrl() after the GML has been loaded.

#### Parameters

request | {String}

### requestFailure

> requestFailure: function( | request | )

Process a failed loading of GML. Called by initialize() and loadUrl() if there was a problem loading GML.

#### Parameters

request | {String}

## OpenLayers.Geometry.Rectangle

This class is not supported, and probably isn’t what you’re looking for. Instead, most users probably want something like:

>     var poly = new OpenLayers.Bounds(0,0,10,10).toGeometry();

This will create a rectangular Polygon geometry.

#### Inherits

- OpenLayers.Geometry

Summary

Properties |
x | {Float}
y | {Float}
width | {Float}
height | {Float}
Constructor |
OpenLayers.Geometry.Rectangle |
Functions |
calculateBounds | Recalculate the bounds for the geometry.
getLength | {Float} The length of the geometry
getArea | {Float} The area of the geometry

### Properties

### x

{Float}

### y

{Float}

### width

{Float}

### height

{Float}

### Constructor

### OpenLayers.Geometry.Rectangle

#### Parameters

points | {Array(OpenLayers.Geometry.Point)}

### Functions

### calculateBounds

> calculateBounds: function()

Recalculate the bounds for the geometry.

### getLength

> getLength: function()

#### Returns

{Float} The length of the geometry

### getArea

> getArea: function()

#### Returns

{Float} The area of the geometry

## OpenLayers.Renderer.NG

#### Inherits from

- OpenLayers.Renderer.Elements

Summary

Constants |
labelNodeType | {String} The node type for text label containers.
Constructor |
OpenLayers.Renderer.NG |
Functions |
updateDimensions |
resize |
drawFeature | Draw the feature.
drawText | Function for drawing text labels.

### Constants

### labelNodeType

{String} The node type for text label containers. To be defined by subclasses.

### Constructor

### OpenLayers.Renderer.NG

#### Parameters

containerID | {String}
options | {Object} options for this renderer. Supported options are:

- yOrdering - {Boolean} Whether to use y-ordering
- zIndexing - {Boolean} Whether to use z-indexing. Will be ignored if yOrdering is set to true.

### Functions

### updateDimensions

> updateDimensions: function( | zoomChanged | )

To be extended by subclasses | here we set positioning related styles on HTML elements, subclasses have to do the same for renderer specific elements (e.g. viewBox, width and height of the rendererRoot)

#### Parameters

zoomChanged | {Boolean} Has the zoom changed? If so, subclasses may have to update feature styles/dimensions.

### resize

### drawFeature

> drawFeature: function( | feature,
> | style | )

Draw the feature. The optional style argument can be used to override the feature’s own style. This method should only be called from layer.drawFeature().

#### Parameters

feature | {OpenLayers.Feature.Vector}
style | {<Object>}

#### Returns

{Boolean} true if the feature has been drawn completely, false if not, undefined if the feature had no geometry

### drawText

> drawText: function( | featureId,
> | style,
> | location | )

Function for drawing text labels. This method is only called by the renderer itself.

#### Parameters

featureId | {String|DOMElement}
style | {Object}
location | {OpenLayers.Geometry.Point}, will be modified inline

#### Returns

{DOMElement} container holding the text label (to be populated by subclasses)

## OpenLayers.Renderer.SVG2

#### Inherits from

- OpenLayers.Renderer.NG

Summary

Properties |
xmlns | {String}
xlinkns | {String}
symbolMetrics | {Object} Cache for symbol metrics according to their svg coordinate space.
Constants |
labelNodeType | {String} The node type for text label containers.
Constructor |
OpenLayers.Renderer.SVG2 |
Functions |
supported | {Boolean} Whether or not the browser supports the SVG renderer
updateDimensions |
getNodeType |
setStyle | Use to set all the style attributes to a SVG node.
dashStyle |
createNode |
nodeTypeCompare |
createRenderRoot | {DOMElement} The specific render engine’s root element
createRoot |
createDefs | {DOMElement} The element to which we’ll add the symbol definitions
drawPoint | This method is only called by the renderer itself.
drawCircle | This method is only called by the renderer itself.
drawLineString | This method is only called by the renderer itself.
drawLinearRing | This method is only called by the renderer itself.
drawPolygon | This method is only called by the renderer itself.
drawRectangle | This method is only called by the renderer itself.
drawText | Function for drawing text labels.
getComponentString |
getShortString |
importSymbol | add a new symbol definition from the rendererer’s symbol hash
getFeatureIdFromEvent |
Constants |
OpenLayers.Renderer.SVG2.LABEL_ALIGN | {Object}
OpenLayers.Renderer.SVG2.LABEL_VSHIFT | {Object}
OpenLayers.Renderer.SVG2.LABEL_VFACTOR | {Object}
Functions |
OpenLayers.Renderer.SVG2.preventDefault | Used to prevent default events (especially opening images in a new tab on ctrl-click) from being executed for externalGraphic and graphicName symbols

### Properties

### xmlns

{String}

### xlinkns

{String}

### symbolMetrics

{Object} Cache for symbol metrics according to their svg coordinate space. This is an object keyed by the symbol’s id, and values are an object with size, x and y properties.

### Constants

### labelNodeType

{String} The node type for text label containers.

### Constructor

### OpenLayers.Renderer.SVG2

#### Parameters

containerID | {String}

### Functions

### supported

> supported: function()

#### Returns

{Boolean} Whether or not the browser supports the SVG renderer

### updateDimensions

> updateDimensions: function( | zoomChanged | )

#### Parameters

zoomChanged | {Boolean}

### getNodeType

> getNodeType: function( | geometry,
> | style | )

#### Parameters

geometry | {OpenLayers.Geometry}
style | {Object}

#### Returns

{String} The corresponding node type for the specified geometry

### setStyle

> setStyle: function( | node,
> | style,
> | options | )

Use to set all the style attributes to a SVG node.

Takes care to adjust stroke width and point radius to be resolution-relative

#### Parameters

node | {SVGDomElement} An SVG element to decorate
style | {Object}
options | {Object} Currently supported options include ‘isFilled’ {Boolean} and ‘isStroked’ {Boolean}

### dashStyle

> dashStyle: function( | style,
> | widthFactor | )

#### Parameters

style | {Object}
widthFactor | {Number}

#### Returns

{String} A SVG compliant ‘stroke-dasharray’ value

### createNode

> createNode: function( | type,
> | id | )

#### Parameters

type | {String} Kind of node to draw
id | {String} Id for node

#### Returns

{DOMElement} A new node of the given type and id

### nodeTypeCompare

> nodeTypeCompare: function( | node,
> | type | )

#### Parameters

node | {SVGDomElement} An SVG element
type | {String} Kind of node

#### Returns

{Boolean} Whether or not the specified node is of the specified type

### createRenderRoot

> createRenderRoot: function()

#### Returns

{DOMElement} The specific render engine’s root element

### createRoot

> createRoot: function( | suffix | )

#### Parameters

suffix | {String} suffix to append to the id

#### Returns

{DOMElement}

### createDefs

> createDefs: function()

#### Returns

{DOMElement} The element to which we’ll add the symbol definitions

### drawPoint

> drawPoint: function( | node,
> | geometry | )

This method is only called by the renderer itself.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}

#### Returns

{DOMElement} or false if the renderer could not draw the point

### drawCircle

> drawCircle: function( | node,
> | geometry,
> | radius | )

This method is only called by the renderer itself.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}
radius | {Float}

#### Returns

{DOMElement} or false if the renderer could not draw the circle

### drawLineString

> drawLineString: function( | node,
> | geometry | )

This method is only called by the renderer itself.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}

#### Returns

{DOMElement} or null if the renderer could not draw all components of the linestring, or false if nothing could be drawn

### drawLinearRing

> drawLinearRing: function( | node,
> | geometry | )

This method is only called by the renderer itself.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}

#### Returns

{DOMElement} or null if the renderer could not draw all components of the linear ring, or false if nothing could be drawn

### drawPolygon

> drawPolygon: function( | node,
> | geometry | )

This method is only called by the renderer itself.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}

#### Returns

{DOMElement} or null if the renderer could not draw all components of the polygon, or false if nothing could be drawn

### drawRectangle

> drawRectangle: function( | node,
> | geometry | )

This method is only called by the renderer itself.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}

#### Returns

{DOMElement} or false if the renderer could not draw the rectangle

### drawText

> drawText: function( | featureId,
> | style,
> | location | )

Function for drawing text labels. This method is only called by the renderer itself.

#### Parameters

featureId | {String|DOMElement}
style | {Object}
location | {OpenLayers.Geometry.Point}, will be modified inline

#### Returns

{DOMElement} container holding the text label

### getComponentString

#### Parameters

components | {Array(OpenLayers.Geometry.Point)} Array of points
separator | {String} character between coordinate pairs. Defaults to “,”

#### Returns

{Object} hash with properties “path” (the string created from the components and “complete” (false if the renderer was unable to draw all components)

### getShortString

> getShortString: function( | point | )

#### Parameters

point | {OpenLayers.Geometry.Point}

#### Returns

{String} or false if point is outside the valid range

### importSymbol

> importSymbol: function ( | graphicName | )

add a new symbol definition from the rendererer’s symbol hash

#### Parameters

graphicName | {String} name of the symbol to import

#### Returns

{DOMElement} | the imported symbol

### getFeatureIdFromEvent

> getFeatureIdFromEvent: function( | evt | )

#### Parameters

evt | {Object} An OpenLayers.Event object

#### Returns

{String} A feature id or undefined.

### Constants

### OpenLayers.Renderer.SVG2.LABEL_ALIGN

{Object}

### OpenLayers.Renderer.SVG2.LABEL_VSHIFT

{Object}

### OpenLayers.Renderer.SVG2.LABEL_VFACTOR

{Object}

### Functions

### OpenLayers.Renderer.SVG2.preventDefault

> OpenLayers.Renderer.SVG2.preventDefault = function( | e | )

Used to prevent default events (especially opening images in a new tab on ctrl-click) from being executed for externalGraphic and graphicName symbols

> OpenLayers.Class.inherit = function ( | P | )

Deprecated.

> OpenLayers.Util.clearArray = function( | array | )

Deprecated.

> OpenLayers.Util.setOpacity = function( | element,
> | opacity | )

Deprecated.

> OpenLayers.Util.safeStopPropagation = function( | evt | )

Deprecated.

> OpenLayers.Util.getArgs = function( | url | )

Deprecated.

> OpenLayers.nullHandler = function( | request | )

@param {} request

> OpenLayers.loadURL = function( | uri,
> | params,
> | caller,
> | onComplete,
> | onFailure | )

Background load a document.

> OpenLayers.parseXMLString = function( | text | )

Parse XML into a doc structure

> emptyFunction: function ()

> getTransport: function()

{Object} Transport mechanism for whichever browser we’re in, or false if none available.

> register: function( | responderToAdd | )

> unregister: function( | responderToRemove | )

> dispatch: function( | callback,
> | request,
> | transport | )

> onCreate: function()

> onComplete: function()

> request: function( | url | )

> onStateChange: function()

> setRequestHeaders: function()

> success: function()

{Boolean} -

> getStatus: function()

> respondToReadyState: function( | readyState | )

> getHeader: function( | name | )

> dispatchException: function( | exception | )

If the optional onException function is set, execute it and then dispatch the call to any other listener registered for onException.

> getResponseHeader: function( | name | )

> OpenLayers.Ajax.getElementsByTagNameNS = function( | parentnode,
> | nsuri,
> | nsprefix,
> | tagname | )

> OpenLayers.Ajax.serializeXMLToString = function( | xmldom | )

Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari.

> hide: function()

Deprecated.

> show: function()

Deprecated.

> getDimensions: function( | element | )

Deprecated.

> getBoundsFromBaseLayer: function( | position | )

Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.

> destroy: function()

> draw: function()

> registerWheelEvents: function()

> defaultClick: function ( | evt | )

> defaultDblClick: function ( | evt | )

> defaultMouseDown: function ( | evt | )

> defaultMouseMove: function ( | evt | )

> defaultMouseUp: function ( | evt | )

> defaultMouseOut: function ( | evt | )

> defaultWheelUp: function( | evt | )

User spun scroll wheel up

> defaultWheelDown: function( | evt | )

User spun scroll wheel down

> zoomBoxEnd: function( | evt | )

Zoombox function.

> removeZoomBox: function()

Remove the zoombox from the screen and nullify our reference to it.

> onWheelEvent: function( | e | )

Catch the wheel event and handle it xbrowserly

> destroy: function()

> draw: function()

> _addButton:function( | id,
> | img,
> | activeImg,
> | xy,
> | sz,
> | title | )

> buttonDown: function( | evt | )

> buttonUp: function( | evt | )

> defaultDblClick: function ( | evt | )

> defaultMouseDown: function ( | evt | )

> switchModeTo: function( | mode | )

> leaveMode: function()

> defaultMouseMove: function ( | evt | )

> defaultMouseUp: function ( | evt | )

> defaultMouseOut: function ( | evt | )

> defaultClick: function ( | evt | )

> getGridBounds: function()

Deprecated.

> concatChildValues: function( | node,
> | def | )

Deprecated.

> addTile: function( | bounds,
> | position | )

addTile creates a tile, initializes it and adds it as iframe to the layer div.

> clone: function ( | obj | )

Create a clone of this layer

> clone: function ( | obj | )

Create a clone of this layer
Features are combinations of geography and attributes.
Standard-compliant (W3C) cross-browser implementation of the XMLHttpRequest object.

> destroy: function()

nullify references to prevent circular references and memory leaks

> clear: function()

Clear the tile of any bounds/position-related data so that it can be reused in a new location.

> draw:function()

Check that a tile should be drawn, and load features for it.

> loadFeaturesForRegion:function( | success,
> | failure | )

Abort any pending requests and issue another request for data.

> requestSuccess:function( | request | )

Called on return from request succcess.

> addResults: function( | results | )

Construct new feature via layer featureClass constructor, and add to this.features.

> destroyAllFeatures: function()

Iterate through and call destroy() on each feature, removing it from the local array

> destroy: function()

nullify references to prevent circular references and memory leaks

> processXMLNode: function( | xmlNode | )

When passed an xmlNode, parses it for a GML point, and passes back an object describing that point.
Instances of OpenLayers.Tile.WFS are used to manage the image tiles used by various layers.
Base class for format reading/writing a variety of formats.

> destroy: function()

> setMap: function( | map | )

> moveTo:function( | bounds,
> | zoomChanged,
> | dragging | )

> addTileMonitoringHooks: function( | tile | )

This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tile (making sure to check that the tile is always the layer’s current tile before taking any action).

> removeTileMonitoringHooks: function( | tile | )

This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()

> onMapResize: function()

Call the onMapResize method of the appropriate parent class.

> display: function()

Call the display method of the appropriate parent class.

> mergeNewParams:function( | newParams | )

Modify parameters for the layer and redraw.

> clone: function ( | obj | )

> getFullRequestString:function( | newParams,
> | altUrl | )

combine the layer’s url with its params and these newParams.

> commit: function()

Write out the data to a WFS server.

> commitSuccess: function( | request | )

Called when the Ajax request returns a response

> commitFailure: function( | request | )

Called when the Ajax request fails

> commitReport: function( | string,
> | response | )

Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.

> refresh: function()

Refreshes all the features of the layer

> getDataExtent: function ()

Calculates the max extent which includes all of the layer data.

> setOpacity: function ( | opacity | )

Call the setOpacity method of the appropriate parent class to set the opacity.

> loadMapObject:function()

> onMapResize: function()

> getWarningHTML:function()

{String} String with information on why layer is broken, how to get it working.

> setMapObjectCenter: function( | center,
> | zoom | )

Set the mapObject to the specified center and zoom

> getMapObjectCenter: function()

{Object} The mapObject’s current center in Map Object format

> dragPanMapObject: function( | dX,
> | dY | )

> getMapObjectZoom: function()

{Integer} The mapObject’s current zoom, in Map Object format

> getMapObjectLonLatFromMapObjectPixel: function( | moPixel | )

> getMapObjectPixelFromMapObjectLonLat: function( | moLonLat | )

> getLongitudeFromMapObjectLonLat: function( | moLonLat | )

> getLatitudeFromMapObjectLonLat: function( | moLonLat | )

> getMapObjectLonLatFromLonLat: function( | lon,
> | lat | )

> getXFromMapObjectPixel: function( | moPixel | )

> getYFromMapObjectPixel: function( | moPixel | )

> getMapObjectPixelFromXY: function( | x,
> | y | )

> destroy: function()

Clean up the protocol.

> supported: function()

This should be overridden by specific subclasses

> evaluateFilter: function( | feature,
> | filter | )

If postReadFiltering is true evaluate the filter against the feature and return the result of the evaluation, otherwise return true.
A parser to read/write JSON safely.
Class for reading and writing Well-Known Text.

> initializeDatabase: function()

> destroy: function()

Clean up the protocol.

> supported: function()

Determine whether a browser supports Gears

> read: function( | options | )

Read all features from the database and return a OpenLayers.Protocol.Response instance.
Protocols return Response objects to their users.

> unfreezeFeature: function( | row | )

> extractFidFromField: function( | field | )

> create: function( | features,
> | options | )

Create new features into the database.

> update: function( | features,
> | options | )

Construct a request updating modified feature.

> createOrUpdate: function( | features | )

Construct a request for updating or creating features in the database.

> freezeFeature: function( | feature | )

> getFeatureStateForFreeze: function( | feature | )

Get the state of the feature to store into the database.

> "delete": function( | features,
> | options | )

Delete features from the database.

> createdOffline: function( | feature | )

Returns true if the feature had a feature id when it was created in the Gears database, false otherwise; this is determined by checking the form of the feature’s fid value.

> commit: function( | features,
> | options | )

Go over the features and for each take action based on the feature state.

> clear: function()

Removes all rows of the table.

> callUserCallback: function( | options,
> | resp | )

This method is called from within commit each time a request is made to the database, it is responsible for calling the user-supplied callbacks.

> loadMapObject:function()

> onMapResize: function()

> setMap: function( | map | )

Overridden from EventPane because we need to remove this yahoo event pane which prohibits our drag and drop, and we can only do this once the map has been loaded and centered.

> fixYahooEventPane: function()

The map has been centered, so the mysterious yahoo eventpane has been added.

> getWarningHTML:function()

{String} String with information on why layer is broken, how to get it working.

> getOLZoomFromMapObjectZoom: function( | moZoom | )

> getMapObjectZoomFromOLZoom: function( | olZoom | )

> setMapObjectCenter: function( | center,
> | zoom | )

Set the mapObject to the specified center and zoom

> getMapObjectCenter: function()

{Object} The mapObject’s current center in Map Object format

> dragPanMapObject: function( | dX,
> | dY | )

> getMapObjectZoom: function()

{Integer} The mapObject’s current zoom, in Map Object format

> getMapObjectLonLatFromMapObjectPixel: function( | moPixel | )

> getMapObjectPixelFromMapObjectLonLat: function( | moLonLat | )

> getLongitudeFromMapObjectLonLat: function( | moLonLat | )

> getLatitudeFromMapObjectLonLat: function( | moLonLat | )

> getMapObjectLonLatFromLonLat: function( | lon,
> | lat | )

> getXFromMapObjectPixel: function( | moPixel | )

> getYFromMapObjectPixel: function( | moPixel | )

> getMapObjectPixelFromXY: function( | x,
> | y | )

> getMapObjectSizeFromOLSize: function( | olSize | )

> setVisibility: function( | visibility,
> | noEvent | )

Set the visibility flag for the layer and hide/show&redraw accordingly.

> moveTo:function( | bounds,
> | zoomChanged,
> | minor | )

If layer is visible and GML has not been loaded, load GML, then load GML and call OpenLayers.Layer.Vector.moveTo() to redraw at the new location.

> loadGML: function()

> setUrl:function( | url | )

Change the URL and reload the GML

> requestSuccess:function( | request | )

Process GML after it has been loaded.

> requestFailure: function( | request | )

Process a failed loading of GML.

> calculateBounds: function()

Recalculate the bounds for the geometry.

> getLength: function()

{Float} The length of the geometry

> getArea: function()

{Float} The area of the geometry

> updateDimensions: function( | zoomChanged | )

> drawFeature: function( | feature,
> | style | )

Draw the feature.

> drawText: function( | featureId,
> | style,
> | location | )

Function for drawing text labels.

> supported: function()

{Boolean} Whether or not the browser supports the SVG renderer

> updateDimensions: function( | zoomChanged | )

> getNodeType: function( | geometry,
> | style | )

> setStyle: function( | node,
> | style,
> | options | )

Use to set all the style attributes to a SVG node.

> dashStyle: function( | style,
> | widthFactor | )

> createNode: function( | type,
> | id | )

> nodeTypeCompare: function( | node,
> | type | )

> createRenderRoot: function()

{DOMElement} The specific render engine’s root element

> createRoot: function( | suffix | )

> createDefs: function()

{DOMElement} The element to which we’ll add the symbol definitions

> drawPoint: function( | node,
> | geometry | )

This method is only called by the renderer itself.

> drawCircle: function( | node,
> | geometry,
> | radius | )

This method is only called by the renderer itself.

> drawLineString: function( | node,
> | geometry | )

This method is only called by the renderer itself.

> drawLinearRing: function( | node,
> | geometry | )

This method is only called by the renderer itself.

> drawPolygon: function( | node,
> | geometry | )

This method is only called by the renderer itself.

> drawRectangle: function( | node,
> | geometry | )

This method is only called by the renderer itself.

> drawText: function( | featureId,
> | style,
> | location | )

Function for drawing text labels.

> getShortString: function( | point | )

> importSymbol: function ( | graphicName | )

add a new symbol definition from the rendererer’s symbol hash

> getFeatureIdFromEvent: function( | evt | )

> OpenLayers.Renderer.SVG2.preventDefault = function( | e | )

Used to prevent default events (especially opening images in a new tab on ctrl-click) from being executed for externalGraphic and graphicName symbols

> stop: function( | event,
> | allowDefault | )

Stops an event from propagating.

> GET: function( | config | )

Send an HTTP GET request.
The OpenLayers.Request namespace contains convenience methods for working with XMLHttpRequests.
{Object}
This class represents a screen coordinate, in x and y coordinates
Instances of this class represent bounding boxes.
The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel).
Controls affect the display or behavior of the map.
Utility functions for event handling.
This Toolbar is an alternative to the Navigation control that displays the state of the control, and provides a UI for changing state to use the zoomBox via a Panel control.

> getChildValue: function( | node,
> | def | )

Get the textual value of the node if it exists, or return an optional default string.
Creates a new WMS layer object.
Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services.
{Number} If set, requests that would result in GET urls with more characters than the number provided will be made using form-encoded HTTP POST.
Mixin for tiles that use form-encoded POST requests to get images from remote services.
Instances of OpenLayers.Layer.MapServer are used to display data from a MapServer CGI instance.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Bing layer using direct tile access as provided by Bing Maps REST Services.
Creates a new instance of a OpenLayers.Layer.VirtualEarth.
Base class for 3rd party layers, providing a DOM element which isolates the 3rd-party layer from mouse events.
Some Layers will already have established zoom levels (like google or ve).
{Boolean} Should the map act as a mercator-projected map?
Abstract vector layer protocol class.
Vector features use the OpenLayers.Geometry classes as geometry description.
This class represents an OGC Filter.
Abstract SQL protocol class.
{Boolean} Should the map act as a mercator-projected map?
Instances of this class represent a width/height pair
A Geometry is a description of a geographic object.
Point geometry class.
This is another virtual class in that it should never be instantiated by itself as a Renderer.
Close