# OpenLayers.js

Summary

OpenLayers.js |
Constants |
VERSION_NUMBER |
singleFile | TODO: remove this in 3.0 when we stop supporting build profiles that include OpenLayers.js
Functions |
_getScriptLocation | Return the path to this script.
Properties |
ImgPath | {String} Set this to the path where control images are stored, a path given here must end with a slash.
Files |
OpenLayers Base Types | OpenLayers custom string, number and function functions are described here.
OpenLayers.String | Contains convenience functions for string manipulation.
Properties |
tokenRegEx | Used to find tokens in a string.
numberRegEx | Used to test strings as numbers.
OpenLayers.Number | Contains convenience functions for manipulating numbers.
Properties |
decimalSeparator | Decimal separator to use when formatting numbers.
thousandsSeparator | Thousands separator to use when formatting numbers.
Functions |
zeroPad | Create a zero padded string optionally with a radix for casting numbers.
OpenLayers.Function | Contains convenience functions for function manipulation.
OpenLayers.Array | Contains convenience functions for array manipulation.
Functions |
OpenLayers.Class | Base class used to construct all other classes.
OpenLayers.inherit |
OpenLayers.Bounds | Instances of this class represent bounding boxes.
Properties |
left | {Number} Minimum horizontal coordinate.
bottom | {Number} Minimum vertical coordinate.
right | {Number} Maximum horizontal coordinate.
top | {Number} Maximum vertical coordinate.
centerLonLat | {OpenLayers.LonLat} A cached center location.
Functions |
OpenLayers.Bounds | Construct a new bounds object.
clone | Create a cloned instance of this bounds.
equals | Test a two bounds for equivalence.
oppositeQuadrant | Get the opposite quadrant for a given quadrant string.
OpenLayers.Element |
Functions |
hasClass | Tests if an element has the given CSS class name.
addClass | Add a CSS class name to an element.
removeClass | Remove a CSS class name from an element.
toggleClass | Remove a CSS class name from an element if it exists.
OpenLayers.LonLat | This class represents a longitude and latitude pair
Functions |
OpenLayers.LonLat | Create a new map location.
toString | Return a readable string version of the lonlat
fromString | Alternative constructor that builds a new OpenLayers.LonLat from a parameter string
fromArray | Alternative constructor that builds a new OpenLayers.LonLat from an array of two numbers that represent lon- and lat-values.
OpenLayers.Pixel | This class represents a screen coordinate, in x and y coordinates
Functions |
OpenLayers.Pixel | Create a new OpenLayers.Pixel instance
toString | Cast this object into a string
OpenLayers.Size | Instances of this class represent a width/height pair
Functions |
OpenLayers.Size | Create an instance of OpenLayers.Size
toString | Return the string representation of a size object
OpenLayers.Console | The OpenLayers.Console namespace is used for debugging and error logging.
OpenLayers.Lang | Internationalization namespace.
Properties |
code | {String} Current language code to use in OpenLayers.
Util |
Functions and Properties |
getElement | This is the old $() from prototype
isElement | A cross-browser implementation of “e instanceof Element”.
isArray | Tests that the provided object is an array.
removeItem | Remove an object from an array.
indexOf | Seems to exist already in FF, but not in MOZ.
dotless | {RegExp} Compiled regular expression to match dots (“.”
modifyDOMElement | Modifies many properties of a DOM element all at once.
createDiv | Creates a new div and optionally set some standard attributes.
createImage | Creates an img element with specific attribute values.
IMAGE_RELOAD_ATTEMPTS | {Integer} How many times should we try to reload an image before giving up?
alphaHackNeeded | {Boolean} true if the png alpha hack is necessary and possible, false otherwise.
alphaHack | Checks whether it’s necessary (and possible) to use the png alpha hack which allows alpha transparency for png images under Internet Explorer.
modifyAlphaImageDiv |
createAlphaImageDiv |
upperCaseObject | Creates a new hashtable and copies over all the keys from the passed-in object, but storing them under an uppercased version of the key at which they were stored.
applyDefaults | Takes an object and copies any properties that don’t exist from another properties, by analogy with OpenLayers.Util.extend() from Prototype.js.
getParameterString |
urlAppend | Appends a parameter string to a url.
getImagesLocation | {String} The fully formatted image location string
getImageLocation | {String} The fully formatted location string for a specified image
Try | Execute functions until one of them doesn’t throw an error.
getXmlNodeValue |
mouseLeft |
precision | {Number} The number of significant digits to retain to avoid floating point precision errors.
toFloat | Convenience method to cast an object to a Number, rounded to the desired floating point precision.
rad |
deg |
VincentyConstants | {Object} Constants for Vincenty functions.
getParameters | Parse the parameters from a URL or from the current page itself into a JavaScript Object.
lastSeqID | {Integer} The ever-incrementing count variable.
createUniqueID | Create a unique identifier for this session.
Constants |
INCHES_PER_UNIT | {Object} Constant inches per unit -- borrowed from MapServer mapscale.c derivation of nautical miles from http://en.wikipedia.org/wiki/Nautical_mile Includes the full set of units supported by CS-MAP (http://trac.osgeo.org/csmap/) and PROJ.4 (http://trac.osgeo.org/proj/) The hardcoded table is maintain in a CS-MAP source code module named CSdataU.c The hardcoded table of PROJ.4 units are in pj_units.c.
DOTS_PER_INCH | {Integer} 72 (A sensible default)
Functions |
normalizeScale |
getResolutionFromScale |
getScaleFromResolution |
pagePosition | Calculates the position of an element on the page | getViewportElement | Returns die viewport element of the document.
isEquivalentUrl | Test two URLs for equivalence.
createUrlObject |
removeTail | Takes a url and removes everything after the ?
Constants |
IS_GECKO | {Boolean} True if the userAgent reports the browser to use the Gecko engine
CANVAS_SUPPORTED | {Boolean} True if canvas 2d is supported.
BROWSER_NAME | {String} A substring of the navigator.userAgent property.
Functions |
getBrowserName | {String} A string which specifies which is the current browser in which we are running.
getRenderedDimensions | Renders the contentHTML offscreen to determine actual dimensions for popup sizing.
OpenLayers.Event | Utility functions for event handling.
Properties |
observers | {Object} A hashtable cache of the event observers.
Constants |
KEY_SPACE | {int}
KEY_BACKSPACE | {int}
KEY_TAB | {int}
KEY_RETURN | {int}
KEY_ESC | {int}
KEY_LEFT | {int}
KEY_UP | {int}
KEY_RIGHT | {int}
KEY_DOWN | {int}
KEY_DELETE | {int}
Functions |
element | Cross browser event element detection.
isSingleTouch | Determine whether event was caused by a single touch
isMultiTouch | Determine whether event was caused by a multi touch
isLeftClick | Determine whether event was caused by a left click.
isRightClick | Determine whether event was caused by a right mouse click.
stop | Stops an event from propagating.
preventDefault | Cancels the event if it is cancelable, without stopping further propagation of the event.
findElement |
observe |
stopObservingElement | Given the id of an element to stop observing, cycle through the element’s cached observers, calling stopObserving on each one, skipping those entries which can no longer be removed.
_removeElementObservers |
stopObserving |
unloadCache | Cycle through all the element entries in the events cache and call stopObservingElement on each.
OpenLayers.Events |
Constants |
BROWSER_EVENTS | {Array(String)} supported events
Properties |
listeners | {Object} Hashtable of Array(Function): events listener functions
object | {Object} the code object issuing application events
element | {DOMElement} the DOM element receiving browser events
eventHandler | {Function} bound event handler attached to elements
extensionCount | {Object} Keys are event types (like in listeners), values are the number of extension listeners for each event type.
Functions |
clearMouseListener | A version of <clearMouseCache> that is bound to this instance so that it can be used with OpenLayers.Event.observe and OpenLayers.Event.stopObserving.
OpenLayers.Events | Construct an OpenLayers.Events object.
attachToElement |
remove | Remove all listeners for a given event type.
handleBrowserEvent | Basically just a wrapper to the triggerEvent() function, but takes care to set a property ‘xy’ on the event with the current mouse position.
getTouchClientXY | WebKit has a few bugs for clientX/clientY.
getMousePosition |
addMsTouchListener |
addMsTouchListenerStart |
addMsTouchListenerMove |
addMsTouchListenerEnd |
OpenLayers.Events.buttonclick | Extension event type for handling buttons on top of a dom element.
Properties |
target | {OpenLayers.Events} The events instance that the buttonclick event will be triggered on.
events | {Array} Events to observe and conditionally stop from propagating when an element with the olButton class (or its olAlphaImg child) is clicked.
startRegEx | {RegExp} Regular expression to test Event.type for events that start a buttonclick sequence.
cancelRegEx | {RegExp} Regular expression to test Event.type for events that cancel a buttonclick sequence.
completeRegEx | {RegExp} Regular expression to test Event.type for events that complete a buttonclick sequence.
startEvt | {Event} The event that started the click sequence
Functions |
OpenLayers.Events.buttonclick | Construct a buttonclick event type.
destroy |
getPressedButton | Get the pressed button, if any.
ignore | Check for event target elements that should be ignored by OpenLayers.
buttonClick | Check if a button was clicked, and fire the buttonclick event
OpenLayers.Util.vendorPrefix | A collection of utility functions to detect vendor prefixed features
Functions |
domToCss | Converts a upper camel case DOM style property name to a CSS property i.e.
OpenLayers.Animation | A collection of utility functions for executing methods that repaint a portion of the browser window.
Properties |
isNative | {Boolean} true if a native requestAnimationFrame function is available
Functions |
requestFrame | Schedule a function to be called at the next available animation frame.
start | Executes a method with requestFrame in series for some duration.
stop | Terminates an animation loop started with start.
OpenLayers.Tween |
Properties |
time | {int} Step counter
startTime | {Number} The timestamp of the first execution step.
animationId | {int} Loop id returned by OpenLayers.Animation.start
playing | {Boolean} Tells if the easing is currently playing
Functions |
OpenLayers.Tween | Creates a Tween.
play | Calls the appropriate easing method
OpenLayers.Easing | Easing Equations by Robert Penner, http://www.robertpenner.com/easing/
OpenLayers.Easing.Linear |
Functions |
easeIn |
easeOut |
easeInOut |
OpenLayers.Easing.Expo |
Functions |
easeIn |
easeOut |
easeInOut |
OpenLayers.Easing.Quad |
Functions |
easeIn |
easeOut |
easeInOut |
OpenLayers.Projection | Methods for coordinate transforms between coordinate systems.
Properties |
proj | {Object} Proj4js.Proj instance.
projCode | {String}
titleRegEx | {RegExp} regular expression to strip the title from a proj4js definition
Functions |
OpenLayers.Projection | This class offers several methods for interacting with a wrapped pro4js projection object.
toString | Convert projection to string (getCode wrapper).
equals | Test equality of two projection instances.
destroy | Destroy projection object.
Properties |
transforms | {Object} Transforms is an object, with from properties, each of which may have a to property.
OpenLayers.Map | Instances of OpenLayers.Map are interactive maps embedded in a web page.
Constants |
Z_INDEX_BASE | {Object} Base z-indexes for different classes of thing
Properties |
id | {String} Unique identifier for the map
fractionalZoom | {Boolean} For a base layer that supports it, allow the map resolution to be set to a value between one of the values in the resolutions array.
dragging | {Boolean} The map is currently being dragged.
size | {OpenLayers.Size} Size of the main div (this.div)
viewPortDiv | {HTMLDivElement} The element that represents the map viewport
layerContainerOrigin | {OpenLayers.LonLat} The lonlat at which the later container was re-initialized (on-zoom)
layerContainerDiv | {HTMLDivElement} The element that contains the layers.
popups | {Array(OpenLayers.Popup)} List of popups associated with the map
center | {OpenLayers.LonLat} The current center of the map
resolution | {Float} The resolution of the map.
zoom | {Integer} The current zoom level of the map
panRatio | {Float} The ratio of the current extent within which panning will tween.
panTween | {OpenLayers.Tween} Animated panning tween object, see panTo()
panDuration | {Integer} The number of steps to be passed to the OpenLayers.Tween.start() method when the map is panned.
zoomTween | {OpenLayers.Tween} Animated zooming tween object, see zoomTo()
zoomDuration | {Integer} The number of steps to be passed to the OpenLayers.Tween.start() method when the map is zoomed.
paddingForPopups | {OpenLayers.Bounds} Outside margin of the popup.
layerContainerOriginPx | {Object} Cached object representing the layer container origin (in pixels).
minPx | {Object} An object with a ‘x’ and ‘y’ values that is the lower left of maxExtent in viewport pixel space.
maxPx | {Object} An object with a ‘x’ and ‘y’ values that is the top right of maxExtent in viewport pixel space.
Functions |
OpenLayers.Map | Constructor for a new OpenLayers.Map instance.
unloadDestroy | Function that is called to destroy the map on page unload.
updateSizeDestroy | When the map is destroyed, we need to stop listening to updateSize events: this method stores the function we need to unregister in non-IE browsers.
setLayerZIndex |
resetLayersZIndex | Reset each layer’s z-index based on layer’s array index
addControlToMap |
getCurrentSize | {OpenLayers.Size} A new OpenLayers.Size object with the dimensions of the map div
calculateBounds |
getCachedCenter | {OpenLayers.LonLat}
moveByPx | Drag the map by pixels.
adjustZoom |
moveTo |
centerLayerContainer | This function takes care to recenter the layerContainerDiv.
isValidZoomLevel |
isValidLonLat |
getLonLatFromViewPortPx |
getZoomTargetCenter |
getGeodesicPixelSize |
getLonLatFromLayerPx |
applyTransform | Applies the given transform to the layerContainerDiv.
Constants |
TILE_WIDTH | {Integer} 256 Default tile width (unless otherwise specified)
TILE_HEIGHT | {Integer} 256 Default tile height (unless otherwise specified)
OpenLayers.Layer |
Constants |
RESOLUTION_PROPERTIES | {Array} The properties that are used for calculating resolutions information.
Properties |
alpha | {Boolean} The layer’s images have an alpha channel.
inRange | {Boolean} The current map resolution is within the layer’s min/max range.
options | {Object} An optional object whose properties will be set on the layer.
metadata | {Object} This object can be used to store additional information on a layer object.
Functions |
OpenLayers.Layer |
destroy | Destroy is a destructor: this is to alleviate cyclic references which the Javascript garbage cleaner can not take care of on its own.
clone |
getOptions | Extracts an object from the layer with the properties that were set as options, but updates them with the values currently set on the instance.
moveTo |
moveByPx | Move the layer based on pixel vector.
setMap | Set the map property for the layer.
afterAdd | Called at the end of the map.addLayer sequence.
initResolutions | This method’s responsibility is to set up the ‘resolutions’ array for the layer -- this array is what the layer will use to interface between the zoom levels of the map and the resolution display of the layer.
resolutionsFromScales | Derive resolutions from scales.
calculateResolutions | Calculate resolutions based on the provided properties.
getDataExtent | Calculates the max extent which includes all of the data for the layer.
getZIndex | {Integer} the z-index of this layer
setZIndex |
adjustBounds | This function will take a bounds, and if wrapDateLine option is set on the layer, it will return a bounds which is wrapped around the world.
OpenLayers.Layer.SphericalMercator | A mixin for layers that wraps up the pieces neccesary to have a coordinate conversion for working with commercial APIs which use a spherical mercator projection.
Functions |
getExtent | Get the map’s extent.
getLonLatFromViewPortPx | Get a map location from a pixel location
getViewPortPxFromLonLat | Get a pixel location from a map location
initMercatorParameters | Set up the mercator parameters on the layer: resolutions, projection, units.
OpenLayers.Layer.EventPane | Base class for 3rd party layers, providing a DOM element which isolates the 3rd-party layer from mouse events.
Properties |
isBaseLayer | {Boolean} EventPaned layers are always base layers, by necessity.
pane | {DOMElement} A reference to the element that controls the events.
mapObject | {Object} This is the object which will be used to load the 3rd party library in the case of the google layer, this will be of type GMap, in the case of the ve layer, this will be of type VEMap
Functions |
OpenLayers.Layer.EventPane | Create a new event pane layer
setMap | Set the map property for the layer.
loadWarningMessage | If we can’t load the map lib, then display an error message to the user and tell them where to go for help.
getWarningHTML | To be implemented by subclasses.
display | Set the display on the pane
setZIndex | Set the z-index order for the pane.
moveByPx | Move the layer based on pixel vector.
moveTo | Handle calls to move the layer.
getLonLatFromViewPortPx | Get a map location from a pixel location
getViewPortPxFromLonLat | Get a pixel location from a map location
getOLLonLatFromMapObjectLonLat | Get an OL style map location from a 3rd party style map location
getMapObjectLonLatFromOLLonLat | Get a 3rd party map location from an OL map location.
getOLPixelFromMapObjectPixel | Get an OL pixel location from a 3rd party pixel location.
getMapObjectPixelFromOLPixel | Get a 3rd party pixel location from an OL pixel location
OpenLayers.Layer.FixedZoomLevels | Some Layers will already have established zoom levels (like google or ve).
Functions |
OpenLayers.Layer.FixedZoomLevels | Create a new fixed zoom levels layer.
initResolutions | Populate the resolutions array
getZoomForResolution | Get the zoom level for a given resolution
getOLZoomFromMapObjectZoom | Get the OL zoom index from the map object zoom level
getMapObjectZoomFromOLZoom | Get the map object zoom level from the OL zoom level
OpenLayers.Layer.Google | Provides a wrapper for Google’s Maps API Normally the Terms of Use for this API do not allow wrapping, but Google have provided written consent to OpenLayers for this - see email in http://osgeo-org.1560.n6.nabble.com/Google-Maps-API-Terms-of-Use-changes-tp4910013p4911981.html
Constants |
MIN_ZOOM_LEVEL | {Integer} 0
MAX_ZOOM_LEVEL | {Integer} 21
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection
Properties |
version | {Number} The version of the Google Maps API
Functions |
OpenLayers.Layer.Google |
clone | Create a clone of this layer
moveTo |
removeGMapElements | Remove all elements added to the dom.
Properties |
OpenLayers.Layer.Google.cache | {Object} Cache for elements that should only be created once per map.
Constants |
OpenLayers.Layer.Google.v2 | Mixin providing functionality specific to the Google Maps API v2.
Properties |
termsOfUse | {DOMElement} Div for Google’s copyright and terms of use link
poweredBy | {DOMElement} Div for Google’s powered by logo and link
dragObject | {GDraggableObject} Since 2.93, Google has exposed the ability to get the maps GDraggableObject.
Functions |
loadMapObject | Load the GMap and register appropriate event listeners.
setGMapVisibility | Display the GMap container and associated elements.
getMapContainer | {DOMElement} the GMap container’s div
OpenLayers.Format | Base class for format reading/writing a variety of formats.
Properties |
options | {Object} A reference to options passed to the constructor.
Functions |
OpenLayers.Format | Instances of this class are not useful.
read | Read data from a string, and return an object whose type depends on the subclass.
write | Accept an object, and return a string.
OpenLayers.Format.XML | Read and write XML.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
namespaceAlias | {Object} Mapping of namespace URI to namespace alias.
defaultPrefix | {String} The default namespace alias for creating element nodes.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
xmldom | {XMLDom} If this browser uses ActiveX, this will be set to a XMLDOM object.
OpenLayers.Format.XML | Construct an XML parser.
setNamespace | Set a namespace alias and URI for the format.
createElementNSPlus | Shorthand for creating namespaced elements with optional attributes and child text nodes.
setAttributes | Set multiple attributes given key value pairs from an object.
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readChildNodes | Shorthand for applying the named readers to all children of a node.
writeNode | Shorthand for applying one of the named writers and appending the results to a node.
getThisOrNextEl | Return this node or the next element node.
getXMLDoc | Get an XML document for nodes that are not supported in HTML (e.g.
OpenLayers.Format.XML.document | {XMLDocument} XML document to reuse for creating non-HTML compliant nodes, like document.createCDATASection.
OpenLayers.Format.WFST | Used to create a versioned WFS protocol.
Constants |
OpenLayers.Format.WFST.DEFAULTS | {Object} Default properties for the WFST format.
OpenLayers.Feature | Features are combinations of geography and attributes.
Properties |
layer | {OpenLayers.Layer}
id | {String}
lonlat | {OpenLayers.LonLat}
data | {Object}
marker | {OpenLayers.Marker}
popup | {OpenLayers.Popup}
Functions |
OpenLayers.Feature | Constructor for features.
destroy | nullify references to prevent circular references and memory leaks
onScreen | {Boolean} Whether or not the feature is currently visible on screen (based on its ‘lonlat’ property)
createMarker | Based on the data associated with the Feature, create and return a marker object.
destroyMarker | Destroys marker.
createPopup | Creates a popup object created from the ‘lonlat’, ‘popupSize’, and ‘popupContentHTML’ properties set in this.data.
destroyPopup | Destroys the popup created via createPopup.
OpenLayers.Feature.Vector | Vector features use the OpenLayers.Geometry classes as geometry description.
Properties |
fid | {String}
bounds | {OpenLayers.Bounds} The box bounding that feature’s geometry, that property can be set by an OpenLayers.Format object when deserializing the feature, so in most cases it represents an information set by the server.
state | {String}
renderIntent | {String} rendering intent currently being used
Functions |
OpenLayers.Feature.Vector | Create a vector feature.
destroy | nullify references to prevent circular references and memory leaks
clone | Create a clone of this vector feature.
onScreen | Determine whether the feature is within the map viewport.
getVisibility | Determine whether the feature is displayed or not.
createMarker |
destroyMarker |
createPopup |
atPoint | Determins whether the feature intersects with the specified location.
destroyPopup |
move | Moves the feature and redraws it at its new location
toState | Sets the new state
Constants |
OpenLayers.Feature.Vector.style | OpenLayers features can have a number of style attributes.
OpenLayers.Style | This class represents a UserStyle obtained from a SLD, containing styling rules.
Properties |
id | {String} A unique id for this session.
title | {String} Title of this style (set if included in SLD)
description | {String} Description of this style (set if abstract is included in SLD)
rules | {Array(OpenLayers.Rule)}
defaultStyle | {Object} hash of style properties to use as default for merging rule-based style symbolizers onto.
defaultsPerSymbolizer | {Boolean} If set to true, the defaultStyle will extend the symbolizer of every rule.
propertyStyles | {Hash of Boolean} cache of style properties that need to be parsed for propertyNames.
Functions |
OpenLayers.Style | Creates a UserStyle.
createSymbolizer | creates a style by applying all feature-dependent rules to the base style.
applySymbolizer |
createLiterals | creates literals for all style properties that have an entry in <this.propertyStyles>.
findPropertyStyles | Looks into all rules for this style and the defaultStyle to collect all the style hash property names containing ${...}
addPropertyStyles |
getSymbolizerPrefix | Returns the correct symbolizer prefix according to the geometry type of the passed geometry
createLiteral | converts a style value holding a combination of PropertyName and Literal into a Literal, taking the property values from the passed features.
Constants |
OpenLayers.Style.SYMBOLIZER_PREFIXES | {Array} prefixes of the sld symbolizers.
OpenLayers.Filter | This class represents an OGC Filter.
Functions |
OpenLayers.Filter | This class represents a generic filter.
OpenLayers.Filter.Spatial | This class represents a spatial filter.
Functions |
OpenLayers.Filter.Spatial | Creates a spatial filter.
evaluate | Evaluates this filter for a specific feature.
OpenLayers.Filter.FeatureId | This class represents a ogc:FeatureId Filter, as being used for rule-based SLD styling
Properties |
type | {String} Type to identify this filter.
Functions |
OpenLayers.Filter.FeatureId | Creates an ogc:FeatureId rule.
OpenLayers.Format.WFST.v1 | Superclass for WFST parsers.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
version | {String} WFS version number.
schemaLocation | {String} Schema location for a particular minor version.
stateName | {Object} Maps feature states to node names.
OpenLayers.Format.WFST.v1 | Instances of this class are not created directly.
getSrsName |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write | Given an array of features, write a WFS transaction.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
schemaLocationAttr | Generate the xsi:schemaLocation attribute value.
setFilterProperty | Set the property of each spatial filter.
OpenLayers.Format.OGCExceptionReport | Class to read exception reports for various OGC services and versions.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
regExes | Compiled regular expressions for manipulating strings.
defaultPrefix |
OpenLayers.Format.OGCExceptionReport | Create a new parser for OGC exception reports.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
OpenLayers.Format.XML.VersionedOGC | Base class for versioned formats, i.e.
Properties |
name | {String} The name of this parser, this is the part of the CLASS_NAME except for “OpenLayers.Format.”
parser | {Object} Instance of the versioned parser.
Functions |
OpenLayers.Format.XML.VersionedOGC. | Constructor.
getVersion | Returns the version to use.
getParser | Get an instance of the cached parser if available, otherwise create one.
OpenLayers.Filter.Logical | This class represents ogc:And, ogc:Or and ogc:Not rules.
Functions |
OpenLayers.Filter.Logical | Creates a logical filter (And, Or, Not).
OpenLayers.Filter.Comparison | This class represents a comparison filter.
Properties |
matchCase | {Boolean} Force case sensitive searches for EQUAL_TO and NOT_EQUAL_TO comparisons.
Functions |
OpenLayers.Filter.Comparison | Creates a comparison rule.
regex2value | Convert the value of this rule from a regular expression string into an ogc literal string using a wildCard of *, a singleChar of ., and an escape of !.
OpenLayers.Format.Filter | Read/Write ogc:Filter.
OpenLayers.Filter.Function | This class represents a filter function.
Functions |
OpenLayers.Filter.Function | Creates a filter function.
OpenLayers.Date | Contains implementations of Date.parse and date.toISOString that match the ECMAScript 5 specification for parsing RFC 3339 dates.
OpenLayers.Format.Filter.v1 | Superclass for Filter version 1 parsers.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
schemaLocation | {String} Schema location for a particular minor version.
OpenLayers.Format.Filter.v1 | Instances of this class are not created directly.
read |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
readSpatial | Read a {OpenLayers.Filter.Spatial} filter.
writeOgcExpression | Limited support for writing OGC expressions.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
getFilterType |
filterMap | {Object} Contains a member for each filter type.
OpenLayers.Geometry | A Geometry is a description of a geographic object.
Properties |
id | {String} A unique identifier for this geometry.
parent | {OpenLayers.Geometry}This is set when a Geometry is added as component of another geometry
bounds | {OpenLayers.Bounds} The bounds of this geometry
Functions |
OpenLayers.Geometry | Creates a geometry object.
destroy | Destroy this geometry.
setBounds | Set the bounds for this Geometry.
clearBounds | Nullify this components bounds and that of its parent as well.
extendBounds | Extend the existing bounds to include the new bounds.
atPoint |
getLength | Calculate the length of this geometry.
getArea | Calculate the area of this geometry.
toString | Returns a text representation of the geometry.
OpenLayers.Geometry.fromWKT | Generate a geometry given a Well-Known Text string.
OpenLayers.Geometry.segmentsIntersect | Determine whether two line segments intersect.
OpenLayers.Geometry.distanceToSegment |
OpenLayers.Geometry.distanceSquaredToSegment | Usually the distanceToSegment function should be used.
OpenLayers.Geometry.Point | Point geometry class.
Functions |
OpenLayers.Geometry.Point | Construct a point geometry.
calculateBounds | Create a new Bounds based on the lon/lat
toShortString | {String} Shortened String representation of Point object.
OpenLayers.Geometry.Collection | A Collection is exactly what it sounds like: A collection of different Geometries.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.Collection | Creates a Geometry Collection -- a list of geoms.
getComponentsString | Get a string representing the components for this collection
addComponent | Add a new component (geometry) to the collection.
removeComponent | Remove a component from this geometry.
OpenLayers.Geometry.MultiPoint | MultiPoint is a collection of Points.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.MultiPoint | Create a new MultiPoint Geometry
OpenLayers.Geometry.Curve | A Curve is a MultiPoint, whose points are assumed to be connected.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.Curve |
OpenLayers.Geometry.LineString | A LineString is a Curve which, once two points have been added to it, can never be less than two points long.
Functions |
OpenLayers.Geometry.LineString | Create a new LineString geometry
getSortedSegments | {Array} An array of segment objects.
splitWithSegment | Split this geometry with the given segment.
split | Use this geometry (the source) to attempt to split a target geometry.
splitWith | Split this geometry (the target) with the given geometry (the source).
OpenLayers.Geometry.MultiLineString | A MultiLineString is a geometry with multiple OpenLayers.Geometry.LineString components.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.MultiLineString | Constructor for a MultiLineString Geometry.
split | Use this geometry (the source) to attempt to split a target geometry.
splitWith | Split this geometry (the target) with the given geometry (the source).
OpenLayers.Geometry.LinearRing | A Linear Ring is a special LineString which is closed.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.LinearRing | Linear rings are constructed with an array of points.
containsPoint | Test if a point is inside a linear ring.
OpenLayers.Geometry.Polygon | Polygon is a collection of Geometry.LinearRings.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.Polygon | Constructor for a Polygon geometry.
containsPoint | Test if a point is inside a polygon.
OpenLayers.Geometry.MultiPolygon | MultiPolygon is a geometry with multiple OpenLayers.Geometry.Polygon components.
Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.MultiPolygon | Create a new MultiPolygon geometry
OpenLayers.Format.GML | Read/Write GML.
Functions and Properties |
OpenLayers.Format.GML | Create a new parser for GML.
parseFeature | This function is the core of the GML parsing code in OpenLayers.
parseGeometry | Properties of this object are the functions that parse geometries based on their type.
parseGeometry.point | Given a GML node representing a point geometry, create an OpenLayers point geometry.
parseGeometry.multipoint | Given a GML node representing a multipoint geometry, create an OpenLayers multipoint geometry.
parseGeometry.linestring | Given a GML node representing a linestring geometry, create an OpenLayers linestring geometry.
parseGeometry.multilinestring | Given a GML node representing a multilinestring geometry, create an OpenLayers multilinestring geometry.
parseGeometry.polygon | Given a GML node representing a polygon geometry, create an OpenLayers polygon geometry.
parseGeometry.multipolygon | Given a GML node representing a multipolygon geometry, create an OpenLayers multipolygon geometry.
parseGeometry.box | Given a GML node representing a box geometry, create an OpenLayers.Bounds.
parseAttributes |
createFeatureXML | Accept an OpenLayers.Feature.Vector, and build a GML node for it.
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type.
buildGeometry.point | Given an OpenLayers point geometry, create a GML point.
buildGeometry.multipoint | Given an OpenLayers multipoint geometry, create a GML multipoint.
buildGeometry.linestring | Given an OpenLayers linestring geometry, create a GML linestring.
buildGeometry.multilinestring | Given an OpenLayers multilinestring geometry, create a GML multilinestring.
buildGeometry.linearring | Given an OpenLayers linearring geometry, create a GML linearring.
buildGeometry.polygon | Given an OpenLayers polygon geometry, create a GML polygon.
buildGeometry.multipolygon | Given an OpenLayers multipolygon geometry, create a GML multipolygon.
buildGeometry.bounds | Given an OpenLayers bounds, create a GML box.
buildCoordinates | builds the coordinates XmlNode
OpenLayers.Format.GML.Base | Superclass for GML parsers.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
schemaLocation | {String} Schema location for a particular minor version.
geometryTypes | {Object} Maps OpenLayers geometry class names to GML element names.
singleFeatureType | {Boolean} True if there is only 1 featureType, and not an array of featuretypes.
autoConfig | {Boolean} Indicates if the format was configured without a <featureNS>, but auto-configured <featureNS> and <featureType> during read.
regExes | Compiled regular expressions for manipulating strings.
OpenLayers.Format.GML.Base | Instances of this class are not created directly.
read |
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
setGeometryTypes | Sets the geometryTypes mapping.
OpenLayers.Format.GML.v3 | Parses GML version 3.
Properties and Functions |
schemaLocation | {String} Schema location for a particular minor version.
curve | {Boolean} Write gml:Curve instead of gml:LineString elements.
multiCurve | {Boolean} Write gml:MultiCurve instead of gml:MultiLineString.
surface | {Boolean} Write gml:Surface instead of gml:Polygon elements.
multiSurface | {Boolean} Write gml:multiSurface instead of gml:MultiPolygon.
OpenLayers.Format.GML.v3 | Create a parser for GML v3.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
setGeometryTypes | Sets the <geometryTypes> mapping.
OpenLayers.Format.Filter.v1_1_0 | Write ogc:Filter version 1.1.0.
Constants |
VERSION | {String} 1.1.0
Properties and Functions |
schemaLocation | {String} http://www.opengis.net/ogc/filter/1.1.0/filter.xsd
OpenLayers.Format.Filter.v1_1_0 | Instances of this class are not created directly.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
writeSpatial | Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.
OpenLayers.Format.OWSCommon | Read OWSCommon.
Functions |
OpenLayers.Format.OWSCommon | Create a new parser for OWSCommon.
getVersion | Returns the version to use.
OpenLayers.Format.OWSCommon.v1 | Common readers and writers for OWSCommon v1.X formats
Properties and Functions |
regExes | Compiled regular expressions for manipulating strings.
read |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
OpenLayers.Format.OWSCommon.v1_0_0 | Parser for OWS Common version 1.0.0.
Properties |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
OpenLayers.Format.WFST.v1_1_0 | A format for creating WFS v1.1.0 transactions.
Properties and Functions |
version | {String} WFS version number.
schemaLocations | {Object} Properties are namespace aliases, values are schema locations.
OpenLayers.Format.WFST.v1_1_0 | A class for parsing and generating WFS v1.1.0 transactions.
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
OpenLayers.Strategy | Abstract vector layer strategy class.
Properties |
layer | {OpenLayers.Layer.Vector} The layer this strategy belongs to.
options | {Object} Any options sent to the constructor.
active | {Boolean} The control is active.
autoActivate | {Boolean} The creator of the strategy can set autoActivate to false to fully control when the protocol is activated and deactivated.
autoDestroy | {Boolean} The creator of the strategy can set autoDestroy to false to fully control when the strategy is destroyed.
Functions |
OpenLayers.Strategy | Abstract class for vector strategies.
setLayer | Called to set the layer property.
activate | Activate the strategy.
deactivate | Deactivate the strategy.
OpenLayers.Strategy.Filter | Strategy for limiting features that get added to a layer by evaluating a filter.
Properties |
cache | {Array(OpenLayers.Feature.Vector)} List of currently cached features.
caching | {Boolean} The filter is currently caching features.
Functions |
OpenLayers.Strategy.Filter | Create a new filter strategy.
handleAdd |
handleRemove |
OpenLayers.Strategy.Save | A strategy that commits newly created or modified features.
Properties |
events | {OpenLayers.Events} Events instance for triggering this protocol events.
timer | {Number} The id of the timer.
Functions |
OpenLayers.Strategy.Save | Create a new Save strategy.
triggerSave | Registered as a listener.
onCommit | Called after protocol commit.
OpenLayers.Layer.HTTPRequest |
Constants |
URL_HASH_FACTOR | {Float} Used to hash URL param strings for multi-WMS server selection.
Properties |
url | {Array(String) or String} This is either an array of url strings or a single url string.
params | {Object} Hashtable of key/value parameters
Functions |
OpenLayers.Layer.HTTPRequest |
selectUrl | selectUrl() implements the standard floating-point multiplicative hash function described by Knuth, and hashes the contents of the given param string into a float between 0 and 1.
getFullRequestString | Combine url with layer’s params and these newParams.
OpenLayers.Tile | This is a class designed to designate a single tile, however it is explicitly designed to do relatively little.
Properties |
id | {String} null
layer | {OpenLayers.Layer} layer the tile is attached to
url | {String} url of the request.
size | {OpenLayers.Size} null
position | {OpenLayers.Pixel} Top Left pixel of the tile
isLoading | {Boolean} Is the tile loading?
Functions |
OpenLayers.Tile | Constructor for a new OpenLayers.Tile instance.
unload | Call immediately before destroying if you are listening to tile events, so that counters are properly handled if tile is still loading at destroy-time.
draw | Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn.
shouldDraw | Return whether or not the tile should actually be (re-)drawn.
setBounds | Sets the bounds on this instance
moveTo | Reposition the tile.
clear | Clear the tile of any bounds/position-related data so that it can be reused in a new location.
OpenLayers.Tile.Image | Instances of OpenLayers.Tile.Image are used to manage the image tiles used by various layers.
Properties |
imgDiv | {HTMLImageElement} The image for this tile.
frame | {DOMElement} The image element is appended to the frame.
imageReloadAttempts | {Integer} Attempts to load the image.
layerAlphaHack | {Boolean} True if the png alpha hack needs to be applied on the layer’s div.
asyncRequestId | {Integer} ID of an request to see if request is still valid.
canvasContext | {CanvasRenderingContext2D} A canvas context associated with the tile image.
Functions |
OpenLayers.Tile.Image | Constructor for a new OpenLayers.Tile.Image instance.
draw | Check that a tile should be drawn, and draw it.
renderTile | Internal function to actually initialize the image tile, position it correctly, and set its url.
positionTile | Using the properties currenty set on the layer, position the tile correctly.
clear | Remove the tile from the DOM, clear it of any image related data so that it can be reused in a new location.
getImage | Returns or creates and returns the tile image.
initImage | Creates the content for the frame on the tile.
setImgSrc | Sets the source for the tile image
getTile | Get the tile’s markup.
createBackBuffer | Create a backbuffer for this tile.
onImageLoad | Handler for the image onload event
onImageError | Handler for the image onerror event
stopLoading | Stops a loading sequence so onImageLoad won’t be executed.
Constants |
OpenLayers.Tile.Image.IMAGE | {HTMLImageElement} The image for a tile.
OpenLayers.Layer.Grid | Base class for layers that use a lattice of tiles.
Properties |
tileOriginCorner | {String} If the <tileOrigin> property is not provided, the tile origin will be derived from the layer’s <maxExtent>.
grid | {Array(Array(OpenLayers.Tile))} This is an array of rows, each row is an array of tiles.
serverResolutions | {Array(Number}} This property is documented in subclasses as an API property.
loading | {Boolean} Indicates if tiles are being loaded.
backBuffer | {DOMElement} The back buffer.
gridResolution | {Number} The resolution of the current grid.
backBufferResolution | {Number} The resolution of the current back buffer.
backBufferLonLat | {Object} The top-left corner of the current back buffer.
backBufferTimerId | {Number} The id of the back buffer timer.
gridLayout | {Object} Object containing properties tilelon, tilelat, startcol, startrow
rowSign | {Number} 1 for grids starting at the top, -1 for grids starting at the bottom.
transitionendEvents | {Array} Event names for transitionend
Functions |
OpenLayers.Layer.Grid | Create a new grid layer
initProperties | Set any properties that depend on the value of singleTile.
setMap |
removeMap | Called when the layer is removed from the map.
clearGrid | Go through and remove all tiles from the grid, calling destroy() on each of them to kill circular references
moveTo | This function is called whenever the map is moved.
getTileData | Given a map location, retrieve a tile and the pixel offset within that tile corresponding to the location.
destroyTile |
getServerResolution | Return the closest server-supported resolution.
getServerZoom | Return the zoom value corresponding to the best matching server resolution, taking into account serverResolutions and <zoomOffset>.
applyBackBuffer | Create, insert, scale and position a back buffer for the layer.
createBackBuffer | Create a back buffer.
removeBackBuffer | Remove back buffer from DOM.
moveByPx | Move the layer based on pixel vector.
initSingleTile |
calculateGridLayout | Generate parameters for the grid layout.
getTileOrigin | Determine the origin for aligning the grid of tiles.
getTileBoundsForGridIndex |
initGriddedTiles |
getMaxExtent | Get this layer’s maximum extent.
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 tiles.
removeTileMonitoringHooks | This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()
moveGriddedTiles |
shiftRow | Shifty grid work
shiftColumn | Shift grid work in the other dimension
removeExcessTiles | When the size of the map or the buffer changes, we may need to remove some excess rows and columns.
onMapResize | For singleTile layers, this will set a new tile size according to the dimensions of the map pane.
OpenLayers.Layer.XYZ | The XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.
Functions |
OpenLayers.Layer.XYZ |
getURL |
getXYZ | Calculates x, y and z for the given bounds.
OpenLayers.Layer.OSM | This layer allows accessing OpenStreetMap tiles.
Properties |
attribution | {String} The layer attribution.
sphericalMercator | {Boolean}
wrapDateLine | {Boolean}
Functions |
OpenLayers.Layer.OSM |
clone |
OpenLayers.Renderer | This is the base class for all renderers.
Properties |
container | {DOMElement}
root | {DOMElement}
extent | {OpenLayers.Bounds}
locked | {Boolean} If the renderer is currently in a state where many things are changing, the ‘locked’ property is set to true.
size | {OpenLayers.Size}
resolution | {Float} cache of current map resolution
map | {OpenLayers.Map} Reference to the map -- this is set in Vector’s setMap()
featureDx | {Number} Feature offset in x direction.
Functions |
OpenLayers.Renderer |
setExtent | Set the visible part of the layer.
setSize | Sets the size of the drawing surface.
getResolution | Uses cached copy of resolution if available to minimize computing
drawFeature | Draw the feature.
calculateFeatureDx | {Number} Calculates the feature offset in x direction.
drawGeometry | Draw a geometry.
drawText | Function for drawing text labels.
removeText | Function for removing text labels.
clear | Clear all vectors from the renderer.
getFeatureIdFromEvent | Returns a feature id from an event on the renderer.
eraseFeatures | This is called by the layer to erase features
eraseGeometry | Remove a geometry from the renderer (by id).
moveRoot | moves this renderer’s root to a (different) renderer.
getRenderLayerId | Gets the layer that this renderer’s output appears on.
applyDefaultSymbolizer |
Constants |
OpenLayers.Renderer.defaultSymbolizer | {Object} Properties from this symbolizer will be applied to symbolizers with missing properties.
OpenLayers.Renderer.symbol | Coordinate arrays for well known (named) symbols.
OpenLayers.Renderer.Canvas | A renderer based on the 2D ‘canvas’ drawing element.
Properties |
hitOverflow | {Number} The method for converting feature identifiers to color values supports 16777215 sequential values.
canvas | {Canvas} The canvas context object.
features | {Object} Internal object of feature/style pairs for use in redrawing the layer.
pendingRedraw | {Boolean} The renderer needs a redraw call to render features added while the renderer was locked.
cachedSymbolBounds | {Object} Internal cache of calculated symbol extents.
Functions |
OpenLayers.Renderer.Canvas |
setExtent | Set the visible part of the layer.
eraseGeometry | Erase a geometry from the renderer.
setSize | Sets the size of the drawing surface.
drawFeature | Draw the feature.
drawGeometry | Used when looping (in redraw) over the features; draws the canvas.
drawExternalGraphic | Called to draw External graphics.
drawNamedSymbol | Called to draw Well Known Graphic Symbol Name.
setCanvasStyle | Prepare the canvas for drawing by setting various global settings.
featureIdToHex | Convert a feature ID string into an RGB hex string.
setHitContextStyle | Prepare the hit canvas for drawing by setting various global settings.
drawPoint | 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.
renderPath | Render a path with stroke and optional fill.
drawPolygon | This method is only called by the renderer itself.
drawText | This method is only called by the renderer itself.
getLocalXY | transform geographic xy into pixel xy
clear | Clear all vectors from the renderer.
getFeatureIdFromEvent | Returns a feature id from an event on the renderer.
eraseFeatures | This is called by the layer to erase features; removes the feature from the list, then redraws the layer.
redraw | The real ‘meat’ of the function: any time things have changed, redraw() can be called to loop over all the data and (you guessed it) redraw it.
Constants |
OpenLayers.Renderer.Canvas.LABEL_ALIGN | {Object}
OpenLayers.Renderer.Canvas.LABEL_FACTOR | {Object}
OpenLayers.Renderer.Canvas.drawImageScaleFactor | {Number} Scale factor to apply to the canvas drawImage arguments.
OpenLayers.Handler | Base class to construct a higher-level handler for event sequences.
Properties |
id | {String}
map | {OpenLayers.Map}
active | {Boolean}
evt | {Event} This property references the last event handled by the handler.
touch | {Boolean} Indicates the support of touch events.
Functions |
OpenLayers.Handler | Construct a handler.
setMap |
checkModifiers | Check the keyMask on the handler.
startTouch | Start touch events, this method must be called by subclasses in “touchstart” method.
callback | Trigger the control’s named callback with the given arguments
register | register an event on the map
unregister | unregister an event from the map
setEvent | With each registered browser event, the handler sets its own evt property.
destroy | Deconstruct the handler.
Constants |
OpenLayers.Handler.MOD_NONE | If set as the <keyMask>, checkModifiers returns false if any key is down.
OpenLayers.Handler.MOD_SHIFT | If set as the <keyMask>, checkModifiers returns false if Shift is down.
OpenLayers.Handler.MOD_CTRL | If set as the <keyMask>, checkModifiers returns false if Ctrl is down.
OpenLayers.Handler.MOD_ALT | If set as the <keyMask>, checkModifiers returns false if Alt is down.
OpenLayers.Handler.MOD_META | If set as the <keyMask>, checkModifiers returns false if Cmd is down.
OpenLayers.Handler.MouseWheel | Handler for wheel up/down events.
Properties |
wheelListener | {function}
interval | {Integer} In order to increase server performance, an interval (in milliseconds) can be set to reduce the number of up/down events called.
maxDelta | {Integer} Maximum delta to collect before breaking from the current interval.
delta | {Integer} When interval is set, delta collects the mousewheel z-deltas of the events that occur within the interval.
cumulative | {Boolean} When interval is set: true to collect all the mousewheel z-deltas, false to only record the delta direction (positive or negative)
Functions |
OpenLayers.Handler.MouseWheel |
destroy |
onWheelEvent | Catch the wheel event and handle it xbrowserly
wheelZoom | Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.
activate |
deactivate |
OpenLayers.Format.JSON | A parser to read/write JSON safely.
Properties |
level | {Integer} For “pretty” printing, this is incremented/decremented during serialization.
pretty | {Boolean} Serialize with extra whitespace for structure.
nativeJSON | {Boolean} Does the browser support native json?
Functions |
OpenLayers.Format.JSON | Create a new parser for JSON.
writeIndent | Output an indentation string depending on the indentation level.
writeNewline | Output a string representing a newline if in pretty printing mode.
writeSpace | Output a string representing a space if in pretty printing mode.
Properties |
serialize | Object with properties corresponding to the serializable data types.
Functions |
serialize.object | Transform an object into a JSON string.
serialize.array | Transform an array into a JSON string.
serialize.string | Transform a string into a JSON string.
serialize.number | Transform a number into a JSON string.
serialize.boolean | Transform a boolean into a JSON string.
serialize.object | Transform a date into a JSON string.
OpenLayers.Format.GML.v2 | Parses GML version 2.
Properties and Functions |
schemaLocation | {String} Schema location for a particular minor version.
OpenLayers.Format.GML.v2 | Create a parser for GML v2.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
OpenLayers.Format.Filter.v1_0_0 | Write ogc:Filter version 1.0.0.
Constants |
VERSION | {String} 1.0.0
Properties and Functions |
schemaLocation | {String} http://www.opengis.net/ogc/filter/1.0.0/filter.xsd
OpenLayers.Format.Filter.v1_0_0 | Instances of this class are not created directly.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
writeSpatial | Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.
OpenLayers.Format.WFST.v1_0_0 | A format for creating WFS v1.0.0 transactions.
Properties and Functions |
version | {String} WFS version number.
schemaLocations | {Object} Properties are namespace aliases, values are schema locations.
OpenLayers.Format.WFST.v1_0_0 | A class for parsing and generating WFS v1.0.0 transactions.
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
OpenLayers.ElementsIndexer | This class takes care of figuring out which order elements should be placed in the DOM based on given indexing methods.
Properties |
maxZIndex | {Integer} This is the largest-most z-index value for a node contained within the indexer.
order | {Array<String>} This is an array of node id’s stored in the order that they should show up on screen.
indices | {Object} This is a hash that maps node ids to their z-index value stored in the indexer.
compare | {Function} This is the function used to determine placement of of a new node within the indexer.
Functions |
determineZIndex | Determine the z-index for the current node if there isn’t one, and set the maximum value if we’ve found a new maximum.
OpenLayers.ElementsIndexer.IndexingMethods | These are the compare methods for figuring out where a new node should be placed within the indexer.
Functions |
Z_ORDER | This compare method is used by other comparison methods.
OpenLayers.Renderer.Elements | This is another virtual class in that it should never be instantiated by itself as a Renderer.
Properties |
rendererRoot | {DOMElement}
root | {DOMElement}
vectorRoot | {DOMElement}
textRoot | {DOMElement}
xmlns | {String}
xOffset | {Number} Offset to apply to the renderer viewport translation in x direction.
rightOfDateLine | {Boolean} Keeps track of the location of the map extent relative to the date line.
Indexer | {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer created upon initialization if the zIndexing or yOrdering options passed to this renderer’s constructor are set to true.
Constants |
BACKGROUND_ID_SUFFIX | {String}
LABEL_ID_SUFFIX | {String}
LABEL_OUTLINE_SUFFIX | {String}
Functions |
OpenLayers.Renderer.Elements |
destroy |
clear | Remove all the elements from the root
setExtent | Set the visible part of the layer.
getNodeType | This function is in charge of asking the specific renderer which type of node to create for the given geometry and style.
drawGeometry | Draw the geometry, creating new nodes, setting paths, setting style, setting featureId on the node.
redrawNode |
redrawBackgroundNode | Redraws the node using special ‘background’ style properties.
drawGeometryNode | Given a node, draw a geometry on the specified layer.
postDraw | Things that have do be done after the geometry node is appended to its parent node.
drawPoint | Virtual function for drawing Point Geometry.
drawLineString | Virtual function for drawing LineString Geometry.
drawLinearRing | Virtual function for drawing LinearRing Geometry.
drawPolygon | Virtual function for drawing Polygon Geometry.
drawRectangle | Virtual function for drawing Rectangle Geometry.
drawCircle | Virtual function for drawing Circle Geometry.
removeText | Removes a label
getFeatureIdFromEvent |
eraseGeometry | Erase a geometry from the renderer.
nodeFactory | Create new node of the specified type, with the (optional) specified id.
nodeTypeCompare |
createNode |
moveRoot | moves this renderer’s root to a different renderer.
getRenderLayerId | Gets the layer that this renderer’s output appears on.
isComplexSymbol | Determines if a symbol cannot be rendered using drawCircle
OpenLayers.Strategy.Fixed | A simple strategy that requests features once and never requests new data.
Functions |
OpenLayers.Strategy.Fixed | Create a new Fixed strategy.
activate | Activate the strategy: load data or add listener to load when visible
deactivate | Deactivate the strategy.
load | Tells protocol to load data and unhooks the visibilitychanged event
merge | Add all features to the layer.
OpenLayers.Format.WFSCapabilities | Read WFS Capabilities.
Functions |
OpenLayers.Format.WFSCapabilities | Create a new parser for WFS capabilities.
OpenLayers.Format.WFSCapabilities.v1 | Abstract class not to be instantiated directly.
Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
OpenLayers.Format.WFSCapabilities.v1_1 | Create an instance of one of the subclasses.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
OpenLayers.Format.WFSCapabilities/v1_1_0 | Read WFS Capabilities version 1.1.0.
Properties and Functions |
regExes | Compiled regular expressions for manipulating strings.
OpenLayers.Format.WFSCapabilities.v1_1_0 | Create a new parser for WFS capabilities version 1.1.0.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
OpenLayers.Protocol | Abstract vector layer protocol class.
Properties |
format | {OpenLayers.Format} The format used by this protocol.
options | {Object} Any options sent to the constructor.
autoDestroy | {Boolean} The creator of the protocol can set autoDestroy to false to fully control when the protocol is destroyed.
defaultFilter | {OpenLayers.Filter} Optional default filter to read requests
Functions |
OpenLayers.Protocol | Abstract class for vector protocols.
mergeWithDefaultFilter | Merge filter passed to the read method with the default one
abort | Abort an ongoing request.
createCallback | Returns a function that applies the given public method with resp and options arguments.
OpenLayers.Protocol.Response | Protocols return Response objects to their users.
Properties |
code |
requestType | {String} The type of request this response corresponds to.
last |
features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features returned in the response by the server.
data | {Object} The data returned in the response by the server.
reqFeatures | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features provided by the user and placed in the request by the protocol.
priv |
error | {Object} The error object in case a service exception was encountered.
Functions |
OpenLayers.Protocol.Response |
success |
OpenLayers.Protocol.WFS | Used to create a versioned WFS protocol.
Functions |
fromWMSLayer | Convenience function to create a WFS protocol from a WMS layer.
Constants |
OpenLayers.Protocol.WFS.DEFAULTS |
OpenLayers.Layer.Markers |
Properties |
drawn | {Boolean} internal state of drawing.
Functions |
OpenLayers.Layer.Markers | Create a Markers layer.
moveTo |
clearMarkers | This method removes all markers from a layer.
drawMarker | Calculate the pixel location for the marker, create it, and add it to the layer’s div
OpenLayers.Protocol.WFS.v1 | Abstract class for for v1.0.0 and v1.1.0 protocol.
Properties |
version | {String} WFS version number.
srsName | {String} Name of spatial reference system.
featureType | {String} Local feature typeName.
featureNS | {String} Feature namespace.
geometryName | {String} Name of the geometry attribute for features.
maxFeatures | {Integer} Optional maximum number of features to retrieve.
schema | {String} Optional schema location that will be included in the schemaLocation attribute value.
featurePrefix | {String} Namespace alias for feature type.
formatOptions | {Object} Optional options for the format.
readFormat | {OpenLayers.Format} For WFS requests it is possible to get a different output format than GML.
readOptions | {Object} Optional object to pass to format’s read.
Functions |
OpenLayers.Protocol.WFS | A class for giving layers WFS protocol.
handleRead | Deal with response from the read request.
parseResponse | Read HTTP response body and return features
commit | Given a list of feature, assemble a batch request for update, create, and delete transactions.
handleCommit | Called when the commit request returns.
filterDelete | Send a request that deletes all features by their filter.
abort | Abort an ongoing request, the response object passed to this method must come from this protocol (as a result of a read, or commit operation).
OpenLayers.Handler.Point | Handler to draw a point on the map.
Properties |
point | {OpenLayers.Feature.Vector} The currently drawn point
layer | {OpenLayers.Layer.Vector} The temporary drawing layer
mouseDown | {Boolean} The mouse is down
stoppedDown | {Boolean} Indicate whether the last mousedown stopped the event propagation.
lastDown | {OpenLayers.Pixel} Location of the last mouse down
lastUp | {OpenLayers.Pixel}
layerOptions | {Object} Any optional properties to be set on the sketch layer.
lastTouchPx | {OpenLayers.Pixel} The last pixel used to know the distance between two touches (for double touch).
Functions |
OpenLayers.Handler.Point | Create a new point handler.
createFeature | Add temporary features
destroyFeature | Destroy the temporary geometries
destroyPersistedFeature | Destroy the persisted feature.
finalize | Finish the geometry and call the “done” callback.
click | Handle clicks.
dblclick | Handle double-clicks.
modifyFeature | Modify the existing geometry given a pixel location.
drawFeature | Render features on the temporary layer.
getGeometry | Return the sketch geometry.
geometryClone | Return a clone of the relevant geometry.
mousedown | Handle mousedown.
touchstart | Handle touchstart.
mousemove | Handle mousemove.
touchmove | Handle touchmove.
mouseup | Handle mouseup.
touchend | Handle touchend.
down | Handle mousedown and touchstart.
move | Handle mousemove and touchmove.
up | Handle mouseup and touchend.
mouseout | Handle mouse out.
passesTolerance | Determine whether the event is within the optional pixel tolerance.
OpenLayers.Handler.Path | Handler to draw a path on the map.
Properties |
line | {OpenLayers.Feature.Vector}
doubleTouchTolerance | {Number} Maximum number of pixels between two touches for the gesture to be considered a “finalize feature” action.
freehand | {Boolean} In freehand mode, the handler starts the path on mouse down, adds a point for every mouse move, and finishes the path on mouse up.
freehandToggle | {String} If set, freehandToggle is checked on mouse events and will set the freehand mode to the opposite of this.freehand.
timerId | {Integer} The timer used to test the double touch.
redoStack | {Array} Stack containing points removed with undo.
Functions |
OpenLayers.Handler.Path | Create a new path hander
createFeature | Add temporary geometries
destroyFeature | Destroy temporary geometries
destroyPersistedFeature | Destroy the persisted feature.
removePoint | Destroy the temporary point.
addPoint | Add point to geometry.
insertXY | Insert a point in the current sketch given x & y coordinates.
insertDeltaXY | Insert a point given offsets from the previously inserted point.
insertDirectionLength | Insert a point in the current sketch given a direction and a length.
insertDeflectionLength | Insert a point in the current sketch given a deflection and a length.
getCurrentPointIndex | {Number} The index of the most recently drawn point.
undo | Remove the most recently added point in the sketch geometry.
redo | Reinsert the most recently removed point resulting from an undo call.
freehandMode | Determine whether to behave in freehand mode or not.
modifyFeature | Modify the existing geometry given the new point
drawFeature | Render geometries on the temporary layer.
getSketch | Return the sketch feature.
getGeometry | Return the sketch geometry.
touchstart | handle touchstart.
down | Handle mousedown and touchstart.
move | Handle mousemove and touchmove.
up | Handle mouseup and touchend.
dblclick | Handle double-clicks.
OpenLayers.Control | Controls affect the display or behavior of the map.
Properties |
id | {String}
map | {OpenLayers.Map} this gets set in the addControl() function in OpenLayers.Map
allowSelection | {Boolean} By default, controls do not allow selection, because it may interfere with map dragging.
displayClass | {string} This property is used for CSS related to the drawing of the Control.
handlerOptions | {Object} Used to set non-default properties on the control’s handler
handler | {OpenLayers.Handler} null
Functions |
OpenLayers.Control | Create an OpenLayers Control.
destroy | The destroy method is used to perform any clean up before the control is dereferenced.
setMap | Set the map property for the control.
draw | The draw method is called when the control is ready to be displayed on the page.
moveTo | Sets the left and top style attributes to the passed in pixel coordinates.
Constants |
OpenLayers.Control.TYPE_BUTTON |
OpenLayers.Control.TYPE_TOGGLE |
OpenLayers.Control.TYPE_TOOL |
OpenLayers.Handler.Drag | The drag handler is used to deal with sequences of browser events related to dragging.
Properties |
started | {Boolean} When a mousedown or touchstart event is received, we want to record it, but not set ‘dragging’ until the mouse moves after starting.
stopDown | {Boolean} Stop propagation of mousedown events from getting to listeners on the same element.
dragging | {Boolean}
last | {OpenLayers.Pixel} The last pixel location of the drag.
start | {OpenLayers.Pixel} The first pixel location of the drag.
lastMoveEvt | {Object} The last mousemove event that occurred.
oldOnselectstart | {Function}
interval | {Integer} In order to increase performance, an interval (in milliseconds) can be set to reduce the number of drag events called.
timeoutId | {String} The id of the timeout used for the mousedown interval.
documentEvents | {Boolean} Are we currently observing document events?
Functions |
OpenLayers.Handler.Drag | Returns OpenLayers.Handler.Drag
dragstart | This private method is factorized from mousedown and touchstart methods
dragmove | This private method is factorized from mousemove and touchmove methods
dragend | This private method is factorized from mouseup and touchend methods
down | This method is called during the handling of the mouse down event.
move | This method is called during the handling of the mouse move event.
up | This method is called during the handling of the mouse up event.
out | This method is called during the handling of the mouse out event.
mousedown | Handle mousedown events
touchstart | Handle touchstart events
mousemove | Handle mousemove events
touchmove | Handle touchmove events
removeTimeout | Private.
mouseup | Handle mouseup events
touchend | Handle touchend events
mouseout | Handle mouseout events
click | The drag handler captures the click event.
activate | Activate the handler.
deactivate | Deactivate the handler.
adjustXY | Converts event coordinates that are relative to the document body to ones that are relative to the map viewport.
addDocumentEvents | Start observing document events when documentDrag is true and the mouse cursor leaves the map viewport while dragging.
removeDocumentEvents | Stops observing document events when documentDrag is true and the mouse cursor re-enters the map viewport while dragging.
OpenLayers.Handler.Box | Handler for dragging a rectangle across the map.
Properties |
dragHandler | {OpenLayers.Handler.Drag}
boxOffsets | {Object} Caches box offsets from css.
Functions |
OpenLayers.Handler.Box |
destroy |
setMap |
startBox |
moveBox |
endBox |
removeBox | Remove the zoombox from the screen and nullify our reference to it.
activate |
deactivate |
getBoxOffsets | Determines border offsets for a box, according to the box model.
OpenLayers.Control.ZoomBox | The ZoomBox control enables zooming directly to a given extent, by drawing a box on the map.
Properties |
type | {OpenLayers.Control.TYPE}
out | {Boolean} Should the control be used for zooming out?
Functions |
draw |
zoomBox |
OpenLayers.Control.DragPan | The DragPan control pans the map with a drag of the mouse.
Properties |
type | {OpenLayers.Control.TYPES}
panned | {Boolean} The map moved.
interval | {Integer} The number of milliseconds that should ellapse before panning the map again.
kinetic | {<OpenLayers.Kinetic>} The OpenLayers.Kinetic object.
Functions |
draw | Creates a Drag handler, using panMap and panMapDone as callbacks.
panMapStart |
panMap |
panMapDone | Finish the panning operation.
OpenLayers.Handler.Click | A handler for mouse clicks.
Properties |
timerId | {Number} The id of the timeout waiting to clear the delayedCall.
down | {Object} Object that store relevant information about the last mousedown or touchstart.
last | {Object} Object that store relevant information about the last mousemove or touchmove.
first | {Object} When waiting for double clicks, this object will store information about the first click in a two click sequence.
rightclickTimerId | {Number} The id of the right mouse timeout waiting to clear the <delayedEvent>.
Functions |
OpenLayers.Handler.Click | Create a new click handler.
touchstart | Handle touchstart.
touchmove | Store position of last move, because touchend event can have an empty “touches” property.
touchend | Correctly set event xy property, and add lastTouches to have touches property from last touchstart or touchmove
mousedown | Handle mousedown.
mouseup | Handle mouseup.
rightclick | Handle rightclick.
delayedRightCall | Sets rightclickTimerId to null.
click | Handle click events from the browser.
dblclick | Handle dblclick.
handleDouble | Handle double-click sequence.
handleSingle | Handle single click sequence.
queuePotentialClick | This method is separated out largely to make testing easier (so we don’t have to override window.setTimeout)
passesTolerance | Determine whether the event is within the optional pixel tolerance.
getTouchDistance | {Boolean} The pixel displacement between two touches.
passesDblclickTolerance | Determine whether the event is within the optional double-cick pixel tolerance.
clearTimer | Clear the timer and set timerId to null.
delayedCall | Sets timerId to null.
getEventInfo | This method allows us to store event information without storing the actual event.
OpenLayers.Control.Navigation | The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel).
Properties |
dragPan | {OpenLayers.Control.DragPan}
pinchZoom | {OpenLayers.Control.PinchZoom}
zoomBox | {OpenLayers.Control.ZoomBox}
mouseWheelOptions | {Object} Options passed to the MouseWheel control (only useful if <zoomWheelEnabled> is set to true).
Functions |
OpenLayers.Control.Navigation | Create a new navigation control
destroy | The destroy method is used to perform any clean up before the control is dereferenced.
activate |
deactivate |
draw |
defaultClick |
defaultDblClick |
defaultDblRightClick |
wheelChange |
wheelUp | User spun scroll wheel up
wheelDown | User spun scroll wheel down
disableZoomBox |
enableZoomBox |
disableZoomWheel |
enableZoomWheel |
OpenLayers.Layer.WMS | Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services.
Constants |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs
Properties |
yx | {Object} Keys in this object are EPSG codes for which the axis order is to be reversed (yx instead of xy, LatLon instead of LonLat), with true as value.
Functions |
OpenLayers.Layer.WMS | Create a new WMS layer object
clone | Create a clone of this layer
getURL | Return a GetMap query string for this layer
OpenLayers.StyleMap |
Properties |
styles | {Object} Hash of {OpenLayers.Style}, keyed by names of well known rendering intents (e.g.
extendDefault | {Boolean} if true, every render intent will extend the symbolizers specified for the “default” intent at rendering time.
Functions |
OpenLayers.StyleMap |
destroy |
createSymbolizer | Creates the symbolizer for a feature for a render intent.
addUniqueValueRules | Convenience method to create comparison rules for unique values of a property.
OpenLayers.Layer.Vector | Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Properties |
filter | {OpenLayers.Filter} The filter set in this layer, a strategy launching read requests can combined this filter with its own filter.
selectedFeatures | {Array(OpenLayers.Feature.Vector)}
unrenderedFeatures | {Object} hash of features, keyed by feature.id, that the renderer failed to draw
styleMap | {OpenLayers.StyleMap}
strategies | {Array(OpenLayers.Strategy})} Optional list of strategies for the layer.
protocol | {OpenLayers.Protocol} Optional protocol for the layer.
renderers | {Array(String)} List of supported Renderer classes.
renderer | {OpenLayers.Renderer}
drawn | {Boolean} Whether the Vector Layer features have been drawn yet.
Functions |
OpenLayers.Layer.Vector | Create a new vector layer
clone | Create a clone of this layer.
refresh | Ask the layer to request features again and redraw them.
assignRenderer | Iterates through the available renderer implementations and selects and assigns the first one whose “supported()” function returns true.
displayError | Let the user know their browser isn’t supported.
setMap | The layer has been added to the map.
afterAdd | Called at the end of the map.addLayer sequence.
removeMap | The layer has been removed from the map.
onMapResize | Notify the renderer of the change in size.
moveTo | Reset the vector layer’s div so that it once again is lined up with the map.
eraseFeatures | Erase features from the layer.
getFeatureFromEvent | Given an event, return a feature if the event occurred over one.
OpenLayers.Renderer.SVG |
Properties |
xmlns | {String}
xlinkns | {String}
Constants |
MAX_PIXEL | {Integer} Firefox has a limitation where values larger or smaller than about 15000 in an SVG document lock the browser up.
Properties |
translationParameters | {Object} Hash with “x” and “y” properties
symbolMetrics | {Object} Cache for symbol metrics according to their svg coordinate space.
Functions |
OpenLayers.Renderer.SVG |
inValidRange | See #669 for more information
setExtent |
translate | Transforms the SVG coordinate system
setSize | Sets the size of the drawing surface.
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 | This method is only called by the renderer itself.
getComponentString |
clipLine | Given two points (one inside the valid range, and one outside), clips the line betweeen the two points so that the new points are both inside the valid range.
getShortString |
getPosition | Finds the position of an svg node.
importSymbol | add a new symbol definition from the rendererer’s symbol hash
getFeatureIdFromEvent |
Constants |
OpenLayers.Renderer.SVG.LABEL_ALIGN | {Object}
OpenLayers.Renderer.SVG.LABEL_VSHIFT | {Object}
OpenLayers.Renderer.SVG.LABEL_VFACTOR | {Object}
Functions |
OpenLayers.Renderer.SVG.preventDefault | Deprecated.
OpenLayers.Control.ScaleLine | The ScaleLine displays a small line indicator representing the current map scale on the map.
Properties |
maxWidth | {Integer} Maximum width of the scale line in pixels.
topOutUnits | {String} Units for zoomed out on top bar.
topInUnits | {String} Units for zoomed in on top bar.
bottomOutUnits | {String} Units for zoomed out on bottom bar.
bottomInUnits | {String} Units for zoomed in on bottom bar.
eTop | {DOMElement}
eBottom | {DOMElement}
Functions |
OpenLayers.Control.ScaleLine | Create a new scale line control.
draw | {DOMElement}
getBarLen | Given a number, round it down to the nearest 1,2,5 times a power of 10.
update | Update the size of the bars, and the labels they contain.
OpenLayers.Control.PanZoom | The PanZoom is a visible control, composed of a <OpenLayers.Control.PanPanel> and a <OpenLayers.Control.ZoomPanel>.
Properties |
buttons | {Array(DOMElement)} Array of Button Divs
position | {OpenLayers.Pixel}
Functions |
OpenLayers.Control.PanZoom |
setMap |
draw |
_addButton |
_removeButton |
removeButtons |
onButtonClick |
getSlideFactor |
Constants |
X | {Integer}
Y | {Integer}
OpenLayers.Icon | The icon represents a graphical icon on the screen.
Properties |
url | {String} image url
size | {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
offset | {<OpenLayers.Pixel>|Object} distance in pixels to offset the image when being rendered.
calculateOffset | {Function} Function to calculate the offset (based on the size)
imageDiv | {DOMElement}
px | {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
Functions |
OpenLayers.Icon | Creates an icon, which is an image tag in a div.
destroy | Nullify references and remove event listeners to prevent circular references and memory leaks
clone | {OpenLayers.Icon} A fresh copy of the icon.
setSize |
setUrl |
draw | Move the div to the given pixel.
erase | Erase the underlying image element.
setOpacity | Change the icon’s opacity
moveTo | move icon to passed in px.
display | Hide or show the icon
OpenLayers.Marker | Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.
Properties |
icon | {OpenLayers.Icon} The icon used by this marker.
lonlat | {OpenLayers.LonLat} location of object
events | {OpenLayers.Events} the event handler.
map | {OpenLayers.Map} the map this marker is attached to
Functions |
OpenLayers.Marker |
draw | Calls draw on the icon, and returns that output.
erase | Erases any drawn elements for this marker.
moveTo | Move the marker to the new location.
onScreen | {Boolean} Whether or not the marker is currently visible on screen.
inflate | Englarges the markers icon by the specified ratio.
setOpacity | Change the opacity of the marker by changin the opacity of its icon
setUrl | Change URL of the Icon Image.
display | Hide or show the icon
defaultIcon | Creates a default OpenLayers.Icon.
OpenLayers.Strategy.Paging | Strategy for vector feature paging
Properties |
features | {Array(OpenLayers.Feature.Vector)} Cached features.
length | {Integer} Number of features per page.
num | {Integer} The currently displayed page number.
paging | {Boolean} The strategy is currently changing pages.
Functions |
OpenLayers.Strategy.Paging | Create a new paging strategy.
cacheFeatures | Cache features before they are added to the layer.
clearCache | Clear out the cached features.
page | Display the page starting at the given index from the cache.
OpenLayers.Format.WKT | Class for reading and writing Well-Known Text.
Functions |
OpenLayers.Format.WKT | Create a new parser for WKT
extractGeometry | Entry point to construct the WKT for a single Geometry object.
OpenLayers.Popup | A popup is a small div that can opened and closed on the map.
Properties and Functions |
events | {OpenLayers.Events} custom event manager
id | {String} the unique identifier assigned to this popup.
lonlat | {OpenLayers.LonLat} the position of this popup on the map
div | {DOMElement} the div that contains this popup.
contentSize | {OpenLayers.Size} the width and height of the content.
size | {OpenLayers.Size} the width and height of the popup.
contentHTML | {String} An HTML string for this popup to display.
backgroundColor | {String} the background color used by the popup.
opacity | {float} the opacity of this popup (between 0.0 and 1.0)
border | {String} the border size of the popup.
contentDiv | {DOMElement} a reference to the element that holds the content of the div.
groupDiv | {DOMElement} First and only child of ‘div’.
closeDiv | {DOMElement} the optional closer image
displayClass | {String} The CSS class of the popup.
contentDisplayClass | {String} The CSS class of the popup content div.
padding | {int or OpenLayers.Bounds} An extra opportunity to specify internal padding of the content div inside the popup.
disableFirefoxOverflowHack | {Boolean} The hack for overflow in Firefox causes all elements to be re-drawn, which causes Flash elements to be re-initialized, which is troublesome.
fixPadding | To be removed in 3.0, this function merely helps us to deal with the case where the user may have set an integer value for padding, instead of an OpenLayers.Bounds object.
map | {OpenLayers.Map} this gets set in Map.js when the popup is added to the map
OpenLayers.Popup | Create a popup.
destroy | nullify references to prevent circular references and memory leaks
draw | Constructs the elements that make up the popup.
updatePosition | if the popup has a lonlat and its map members set, then have it move itself to its proper position
moveTo |
visible | {Boolean} Boolean indicating whether or not the popup is visible
toggle | Toggles visibility of the popup.
show | Makes the popup visible.
hide | Makes the popup invisible.
setSize | Used to adjust the size of the popup.
setBackgroundColor | Sets the background color of the popup.
setOpacity | Sets the opacity of the popup.
setBorder | Sets the border style of the popup.
setContentHTML | Allows the user to set the HTML content of the popup.
registerImageListeners | Called when an image contained by the popup loaded.
getContentDivPadding | Glorious, oh glorious hack in order to determine the css ‘padding’ of the contentDiv.
addCloseBox |
panIntoView | Pans the map such that the popup is totaly viewable (if necessary)
registerEvents | Registers events on the popup.
onmousedown | When mouse goes down within the popup, make a note of it locally, and then do not propagate the mousedown (but do so safely so that user can select text inside)
onmousemove | If the drag was started within the popup, then do not propagate the mousemove (but do so safely so that user can select text inside)
onmouseup | When mouse comes up within the popup, after going down in it, reset the flag, and then (once again) do not propagate the event, but do so safely so that user can select text inside
onclick | Ignore clicks, but allowing default browser handling
onmouseout | When mouse goes out of the popup set the flag to false so that if they let go and then drag back in, we won’t be confused.
ondblclick | Ignore double-clicks, but allowing default browser handling
OpenLayers.Strategy.BBOX | A simple strategy that reads new features when the viewport invalidates some bounds.
Properties |
bounds | {OpenLayers.Bounds} The current data bounds (in the same projection as the layer - not always the same projection as the map).
resolution | {Float} The current data resolution.
resFactor | {Float} Optional factor used to determine when previously requested features are invalid.
response | {OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
Functions |
OpenLayers.Strategy.BBOX | Create a new BBOX strategy.
activate | Set up strategy with regard to reading new batches of remote data.
deactivate | Tear down strategy with regard to reading new batches of remote data.
update | Callback function called on “moveend” or “refresh” layer events.
getMapBounds | Get the map bounds expressed in the same projection as this layer.
invalidBounds | Determine whether the previously requested set of features is invalid.
calculateBounds |
triggerRead |
createFilter | Creates a spatial BBOX filter.
merge | Given a list of features, determine which ones to add to the layer.
Constants |
OpenLayers.Layer.Google.v3 | Mixin providing functionality specific to the Google Maps API v3.
DEFAULTS | {Object} It is not recommended to change the properties set here.
Functions |
loadMapObject | Load the GMap and register appropriate event listeners.
setGMapVisibility | Display the GMap container and associated elements.
getMapContainer | {DOMElement} the GMap container’s div
OpenLayers.Request | The OpenLayers.Request namespace contains convenience methods for working with XMLHttpRequests.
Constants |
DEFAULT_CONFIG | {Object} Default configuration for all requests.
URL_SPLIT_REGEX |
Functions |
makeSameOrigin | Using the specified proxy, returns a same origin url of the provided url.
runCallbacks | Calls the complete, success and failure callbacks.
OpenLayers.Request.XMLHttpRequest | Standard-compliant (W3C) cross-browser implementation of the XMLHttpRequest object.
OpenLayers.Marker.Box |
Properties |
bounds | {OpenLayers.Bounds}
div | {DOMElement}
Functions |
OpenLayers.Marker.Box |
destroy |
setBorder | Allow the user to change the box’s color and border width
draw |
onScreen | {Boolean} Whether or not the marker is currently visible on screen.
display | Hide or show the icon
OpenLayers.Layer.MapGuide | Instances of OpenLayers.Layer.MapGuide are used to display data from a MapGuide OS instance.
Constants |
TILE_PARAMS | {Object} Hashtable of default parameter key/value pairs for tiled layer
SINGLE_TILE_PARAMS | {Object} Hashtable of default parameter key/value pairs for untiled layer
OVERLAY_PARAMS | {Object} Hashtable of default parameter key/value pairs for untiled layer
FOLDER_PARAMS | {Object} Hashtable of parameter key/value pairs which describe the folder structure for tiles as configured in the mapguide serverconfig.ini section [TileServiceProperties]
Properties |
defaultSize | {OpenLayers.Size} Tile size as produced by MapGuide server
tileOriginCorner | {String} MapGuide tile server uses top-left as tile origin
Functions |
OpenLayers.Layer.MapGuide | Create a new Mapguide layer, either tiled or untiled.
clone | Create a clone of this layer
getURL | Return a query string for this layer
getFullRequestString | getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.
getImageFilePath | special handler to request mapguide tiles from an http exposed tilecache
OpenLayers.Control.Measure | Allows for drawing of features for measurements.
Properties |
callbacks | {Object} The functions that are sent to the handler for callback
displaySystemUnits | {Object} Units for various measurement systems.
delay | {Number} Number of milliseconds between clicks before the event is considered a double-click.
delayedTrigger | {Number} Timeout id of trigger for measurepartial.
Functions |
OpenLayers.Control.Measure |
updateHandler |
measureComplete | Called when the measurement sketch is done.
measurePartial | Called each time a new point is added to the measurement sketch.
measureImmediate | Called each time the measurement sketch is modified.
cancelDelay | Cancels the delay measurement that measurePartial began.
measure |
getBestArea | Based on the <displaySystem> returns the area of a geometry.
getArea |
getBestLength | Based on the <displaySystem> returns the length of a geometry.
getLength |
OpenLayers.Control.DrawFeature | The DrawFeature control draws point, line or polygon features on a vector layer when active.
Properties |
layer | {OpenLayers.Layer.Vector}
callbacks | {Object} The functions that are sent to the handler for callback
Functions |
OpenLayers.Control.DrawFeature |
drawFeature |
OpenLayers.Rule | This class represents an SLD Rule, as being used for rule-based SLD styling.
Properties |
id | {String} A unique id for this session.
title | {String} Title of this rule (set if included in SLD)
description | {String} Description of this rule (set if abstract is included in SLD)
context | {Object} An optional object with properties that the rule should be evaluated against.
filter | {OpenLayers.Filter} Optional filter for the rule.
elseFilter | {Boolean} Determines whether this rule is only to be applied only if no other rules match (ElseFilter according to the SLD specification).
symbolizer | {Object} Symbolizer or hash of symbolizers for this rule.
symbolizers | {Array} Collection of symbolizers associated with this rule.
Functions |
OpenLayers.Rule | Creates a Rule.
getContext | Gets the context for evaluating this rule
OpenLayers.Handler.Pinch | The pinch handler is used to deal with sequences of browser events related to pinch gestures.
Properties |
started | {Boolean} When a touchstart event is received, we want to record it, but not set ‘pinching’ until the touchmove get started after starting.
stopDown | {Boolean} Stop propagation of touchstart events from getting to listeners on the same element.
pinching | {Boolean}
last | {Object} Object that store informations related to pinch last touch.
start | {Object} Object that store informations related to pinch touchstart.
Functions |
OpenLayers.Handler.Pinch | Returns OpenLayers.Handler.Pinch
touchstart | Handle touchstart events
touchmove | Handle touchmove events
touchend | Handle touchend events
activate | Activate the handler.
deactivate | Deactivate the handler.
getDistance | Get the distance in pixels between two touches.
getPinchData | Get informations about the pinch event.
OpenLayers.Handler.Hover | The hover handler is to be used to emulate mouseovers on objects on the map that aren’t DOM elements.
Properties |
px |
timerId |
Functions |
OpenLayers.Handler.Hover | Construct a hover handler.
mousemove | Called when the mouse moves on the map.
mouseout | Called when the mouse goes out of the map.
passesTolerance | Determine whether the mouse move is within the optional pixel tolerance.
clearTimer | Clear the timer and set timerId to null.
delayedCall | Triggers pause callback.
OpenLayers.Format.WFSDescribeFeatureType | Read WFS DescribeFeatureType response
Properties and Functions |
regExes | Compiled regular expressions for manipulating strings.
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
OpenLayers.Format.WFSDescribeFeatureType | Create a new parser for WFS DescribeFeatureType responses.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
readRestriction | Reads restriction defined in the child nodes of a restriction element
read |
OpenLayers.Strategy.Refresh | A strategy that refreshes the layer.
Properties |
force | {Boolean} Force a refresh on the layer.
interval | {Number} Auto-refresh.
timer | {Number} The id of the timer.
Functions |
OpenLayers.Strategy.Refresh | Create a new Refresh strategy.
reset | Start or cancel the refresh interval depending on the visibility of the layer.
start | Start the refresh interval.
stop | Cancels the refresh interval.
OpenLayers.Control.MousePosition | The MousePosition control displays geographic coordinates of the mouse pointer, as it is moved about the map.
Properties |
element | {DOMElement}
lastXy | {OpenLayers.Pixel}
Functions |
OpenLayers.Control.MousePosition |
destroy |
draw | {DOMElement}
redraw |
reset |
formatOutput | Override to provide custom display output
OpenLayers.Protocol.HTTP | A basic HTTP protocol for vector layers.
Properties |
url | {String} Service URL, read-only, set through the options passed to constructor.
headers | {Object} HTTP request headers, read-only, set through the options passed to the constructor, Example: {‘Content-Type’: ‘plain/text’}
params | {Object} Parameters of GET requests, read-only, set through the options passed to the constructor, Example: {‘bbox’: ‘5,5,5,5’}
callback | {Object} Function to be called when the <read>, <create>, <update>, <delete> or <commit> operation completes, read-only, set through the options passed to the constructor.
scope | {Object} Callback execution scope, read-only, set through the options passed to the constructor.
wildcarded. | {Boolean} If true percent signs are added around values read from LIKE filters, for example if the protocol read method is passed a LIKE filter whose property is “foo” and whose value is “bar” the string “foo__ilike=%bar%” will be sent in the query string; defaults to false.
Functions |
OpenLayers.Protocol.HTTP | A class for giving layers generic HTTP protocol.
handleRead | Individual callbacks are created for read, create and update, should a subclass need to override each one separately.
handleCreate | Called the the request issued by <create> is complete.
handleUpdate | Called the the request issued by <update> is complete.
handleDelete | Called the the request issued by <delete> is complete.
handleResponse | Called by CRUD specific handlers.
parseFeatures | Read HTTP response body and return features.
callUserCallback | This method is used from within the commit method each time an an HTTP response is received from the server, it is responsible for calling the user-supplied callbacks.
OpenLayers.Strategy.Cluster | Strategy for vector feature clustering.
Properties |
features | {Array(OpenLayers.Feature.Vector)} Cached features.
clusters | {Array(OpenLayers.Feature.Vector)} Calculated clusters.
clustering | {Boolean} The strategy is currently clustering features.
resolution | {Float} The resolution (map units per pixel) of the current cluster set.
Functions |
OpenLayers.Strategy.Cluster | Create a new clustering strategy.
cacheFeatures | Cache features before they are added to the layer.
clearCache | Clear out the cached features.
cluster | Cluster features based on some threshold distance.
clustersExist | Determine whether calculated clusters are already on the layer.
shouldCluster | Determine whether to include a feature in a given cluster.
addToCluster | Add a feature to a cluster.
createCluster | Given a feature, create a cluster.
OpenLayers.Control.OverviewMap | The OverMap control creates a small overview map, useful to display the extent of a zoomed map and your main map and provide additional navigation options to the User.
Properties |
element | {DOMElement} The DOM element that contains the overview map
handlers | {Object}
resolutionFactor | {Object}
Functions |
OpenLayers.Control.OverviewMap | Create a new overview map
draw | Render the control in the browser.
baseLayerDraw |
rectDrag | Handle extent rectangle drag
mapDivClick | Handle browser events
onButtonClick |
maximizeControl | Unhide the control.
minimizeControl | Hide all the contents of the control, shrink the size, add the maximize icon
showToggle | Hide/Show the toggle depending on whether the control is minimized
update | Update the overview map after layers move.
isSuitableOverview | Determines if the overview map is suitable given the extent and resolution of the main map.
createMap | Construct the map that this control contains
updateRectToMap | Updates the extent rectangle position and size to match the map extent
updateMapToRect | Updates the map extent to match the extent rectangle position and size
setRectPxBounds | Set extent rectangle pixel bounds.
getRectBoundsFromMapBounds | Get the rect bounds from the map bounds.
getMapBoundsFromRectBounds | Get the map bounds from the rect bounds.
getLonLatFromOverviewPx | Get a map location from a pixel location
getOverviewPxFromLonLat | Get a pixel location from a map location
OpenLayers.Control.PinchZoom |
Properties |
type | {OpenLayers.Control.TYPES}
pinchOrigin | {Object} Cached object representing the pinch start (in pixels).
currentCenter | {Object} Cached object representing the latest pinch center (in pixels).
Functions |
OpenLayers.Control.PinchZoom | Create a control for zooming with pinch gestures.
pinchStart |
pinchMove |
pinchDone |
OpenLayers.Control.TouchNavigation | The navigation control handles map browsing with touch events (dragging, double-tapping, tap with two fingers, and pinch zoom).
Properties |
dragPan | {OpenLayers.Control.DragPan}
pinchZoom | {OpenLayers.Control.PinchZoom}
Functions |
OpenLayers.Control.TouchNavigation | Create a new navigation control
destroy | The destroy method is used to perform any clean up before the control is dereferenced.
activate |
deactivate |
draw |
defaultClick |
defaultDblClick |
OpenLayers.Format.WFSCapabilities/v1_0_0 | Read WFS Capabilities version 1.0.0.
Functions |
OpenLayers.Format.WFSCapabilities.v1_0_0 | Create a new parser for WFS capabilities version 1.0.0.
Properties |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
OpenLayers.Layer.MapServer | Instances of OpenLayers.Layer.MapServer are used to display data from a MapServer CGI instance.
Constants |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs
Functions |
OpenLayers.Layer.MapServer | Create a new MapServer layer object
clone | Create a clone of this layer
getURL | Return a query string for this layer
getFullRequestString | combine the layer’s url with its params and these newParams.
OpenLayers.Renderer.VML | Render vector features in browsers with VML capability.
Properties |
xmlns | {String} XML Namespace URN
symbolCache | {DOMElement} node holding symbols.
offset | {Object} Hash with “x” and “y” properties
Functions |
OpenLayers.Renderer.VML | Create a new VML renderer.
setExtent | Set the renderer’s extent
setSize | Set the size of the drawing surface
getNodeType | Get the node type for a geometry and style
setStyle | Use to set all the style attributes to a VML node.
graphicRotate | If a point is to be styled with externalGraphic and rotation, VML fills cannot be used to display the graphic, because rotation of graphic fills is not supported by the VML implementation of Internet Explorer.
postDraw |
setNodeDimension | Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.
dashStyle |
createNode | Create a new node
nodeTypeCompare | Determine whether a node is of a given type
createRenderRoot | Create the renderer root
createRoot | Create the main root element
drawPoint | Render a point
drawCircle | Render a circle.
drawLineString | Render a linestring.
drawLinearRing | Render a linearring
DrawLine | Render a line.
drawPolygon | Render a polygon
drawRectangle | Render a rectangle
drawText | This method is only called by the renderer itself.
moveRoot | moves this renderer’s root to a different renderer.
importSymbol | add a new symbol definition from the rendererer’s symbol hash
Constants |
OpenLayers.Renderer.VML.LABEL_SHIFT | {Object}
OpenLayers.Protocol.WFS.v1_0_0 | A WFS v1.0.0 protocol for vector layers.
Properties |
version | {String} WFS version number.
Functions |
OpenLayers.Protocol.WFS.v1_0_0 | A class for giving layers WFS v1.0.0 protocol.
OpenLayers.Handler.RegularPolygon | Handler to draw a regular polygon on the map.
Properties |
layerOptions | {Object} Any optional properties to be set on the sketch layer.
angle | {Float} The angle from the origin (mouse down) to the current mouse position, in radians.
fixedRadius | {Boolean} The polygon has a fixed radius.
feature | {OpenLayers.Feature.Vector} The currently drawn polygon feature
layer | {OpenLayers.Layer.Vector} The temporary drawing layer
origin | {OpenLayers.Geometry.Point} Location of the first mouse down
Functions |
OpenLayers.Handler.RegularPolygon | Create a new regular polygon handler.
down | Start drawing a new feature
move | Respond to drag move events
up | Finish drawing the feature
out | Finish drawing the feature.
createGeometry | Create the new polygon geometry.
modifyGeometry | Modify the polygon geometry in place.
calculateAngle | Calculate the angle based on settings.
finalize | Finish the geometry and call the “done” callback.
callback | Trigger the control’s named callback with the given arguments
OpenLayers.Handler.Feature | Handler to respond to mouse events related to a drawn feature.
Properties |
EVENTMAP | {Object} A object mapping the browser events to objects with callback keys for in and out.
feature | {OpenLayers.Feature.Vector} The last feature that was hovered.
lastFeature | {OpenLayers.Feature.Vector} The last feature that was handled.
down | {OpenLayers.Pixel} The location of the last mousedown.
up | {OpenLayers.Pixel} The location of the last mouseup.
clickTolerance | {Number} The number of pixels the mouse can move between mousedown and mouseup for the event to still be considered a click.
geometryTypes | To restrict dragging to a limited set of geometry types, send a list of strings corresponding to the geometry class names.
stopClick | {Boolean} If stopClick is set to true, handled clicks do not propagate to other click listeners.
stopDown | {Boolean} If stopDown is set to true, handled mousedowns do not propagate to other mousedown listeners.
stopUp | {Boolean} If stopUp is set to true, handled mouseups do not propagate to other mouseup listeners.
Functions |
OpenLayers.Handler.Feature |
touchstart | Handle touchstart events
touchmove | Handle touchmove events.
mousedown | Handle mouse down.
mouseup | Handle mouse up.
click | Handle click.
mousemove | Handle mouse moves.
dblclick | Handle dblclick.
geometryTypeMatches | Return true if the geometry type of the passed feature matches one of the geometry types in the geometryTypes array.
handle |
triggerCallback | Call the callback keyed in the event map with the supplied arguments.
activate | Turn on the handler.
deactivate | Turn off the handler.
handleMapEvents |
moveLayerToTop | Moves the layer for this handler to the top, so mouse events can reach it.
moveLayerBack | Moves the layer back to the position determined by the map’s layers array.
OpenLayers.Control.DragFeature | The DragFeature control moves a feature with a drag of the mouse.
Properties |
layer | {OpenLayers.Layer.Vector}
feature | {OpenLayers.Feature.Vector}
dragCallbacks | {Object} The functions that are sent to the drag handler for callback.
featureCallbacks | {Object} The functions that are sent to the feature handler for callback.
lastPixel | {OpenLayers.Pixel}
Functions |
OpenLayers.Control.DragFeature | Create a new control to drag features.
clickFeature | Called when the feature handler detects a click-in on a feature.
clickoutFeature | Called when the feature handler detects a click-out on a feature.
overFeature | Called when the feature handler detects a mouse-over on a feature.
downFeature | Called when the drag handler detects a mouse-down.
moveFeature | Called when the drag handler detects a mouse-move.
upFeature | Called when the drag handler detects a mouse-up.
doneDragging | Called when the drag handler is done dragging.
outFeature | Called when the feature handler detects a mouse-out on a feature.
cancel | Called when the drag handler detects a mouse-out (from the map viewport).
setMap | Set the map property for the control and all handlers.
OpenLayers.Handler.Polygon | Handler to draw a polygon on the map.
Properties |
drawingHole | {Boolean} Currently drawing an interior ring.
polygon | {OpenLayers.Feature.Vector}
Functions |
OpenLayers.Handler.Polygon | Create a Polygon Handler.
createFeature | Add temporary geometries
addPoint | Add point to geometry.
getCurrentPointIndex | {Number} The index of the most recently drawn point.
enforceTopology | Simple topology enforcement for drawing interior rings.
finishGeometry | Finish the geometry and send it back to the control.
finalizeInteriorRing | Enforces that new ring has some area and doesn’t contain vertices of any other rings.
restoreFeature | Move the feature from the sketch layer to the target layer.
destroyFeature | Destroy temporary geometries
drawFeature | Render geometries on the temporary layer.
getSketch | Return the sketch feature.
getGeometry | Return the sketch geometry.
OpenLayers.Popup.Anchored |
Properties |
relativePosition | {String} Relative position of the popup (“br”, “tr”, “tl” or “bl”).
anchor | {Object} Object to which we’ll anchor the popup.
Functions |
OpenLayers.Popup.Anchored |
moveTo | Since the popup is moving to a new px, it might need also to be moved relative to where the marker is.
calculateRelativePosition |
updateRelativePosition | The popup has been moved to a new relative location, so we may want to make some cosmetic adjustments to it.
calculateNewPx |
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.
OpenLayers.Util |
Functions |
clearArray | Deprecated.
setOpacity | Deprecated.
safeStopPropagation | Deprecated.
getArgs | Deprecated.
OpenLayers.Ajax |
Functions |
OpenLayers.nullHandler | @param {} request
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 |
Functions |
OpenLayers.Ajax.Base |
OpenLayers.Ajax.Request | Deprecated.
Properties |
_complete | {Boolean}
Functions |
OpenLayers.Ajax.Request |
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}
Functions |
OpenLayers.Ajax.Response |
getStatus |
getStatustext |
getHeader |
getResponseHeader |
getElementsByTagNameNS |
serializeXMLToString | Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari.
OpenLayers.Element |
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}
Functions |
OpenLayers.Control.MouseDefaults |
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 |
buttonClicked | {String}
Functions |
OpenLayers.Control.MouseToolbar |
draw |
_addButton |
buttonDown |
buttonUp |
defaultDblClick |
defaultMouseDown |
switchModeTo |
leaveMode |
defaultMouseMove |
defaultMouseUp |
defaultMouseOut |
defaultClick |
OpenLayers.Layer.Grid |
Functions |
getGridBounds | Deprecated.
OpenLayers.Format.XML |
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 |
SUPPORTED_TRANSITIONS | {Array} no supported transitions for this type of layer, because it is not possible to modify the initialized tiles (iframes)
usePost | {Boolean}
Functions |
OpenLayers.Layer.WMS.Post | Creates a new WMS layer object.
addTile | addTile creates a tile, initializes it and adds it as iframe to the layer div.
OpenLayers.Layer.WMS.Untiled | Deprecated.
Functions |
OpenLayers.Layer.WMS.Untiled |
clone | Create a clone of this layer
OpenLayers.Layer.MapServer.Untiled | Deprecated.
Functions |
OpenLayers.Layer.MapServer.Untiled |
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 |
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.
Functions |
OpenLayers.Feature.WFS | Create a WFS feature.
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 |
tile | {OpenLayers.Tile.WFS}
DEFAULT_PARAMS | {Object} Hashtable of default key/value parameters
formatObject | {OpenLayers.Format} Internally created/managed format object, used by the Tile to parse data.
vectorMode | {Boolean} Should be calculated automatically.
Functions |
OpenLayers.Layer.WFS |
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.
commitSuccess | Called when the Ajax request returns a response
commitFailure | Called when the Ajax request fails
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
Functions |
OpenLayers.Layer.VirtualEarth | Creates a new instance of a OpenLayers.Layer.VirtualEarth.
loadMapObject |
onMapResize |
OpenLayers.Protocol.SQL | Abstract SQL protocol class.
Properties |
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.
Functions |
OpenLayers.Protocol.SQL |
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}
Functions |
OpenLayers.Protocol.SQL.Gears |
initializeDatabase |
unfreezeFeature |
extractFidFromField |
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.
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.
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
Functions |
OpenLayers.Layer.Yahoo |
loadMapObject |
onMapResize |
fixYahooEventPane | The map has been centered, so the mysterious yahoo eventpane has been added.
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.
Functions |
OpenLayers.Layer.GML | Load and parse a single file on the web, according to the format provided via the ‘format’ option, defaulting to GML.
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}
Functions |
OpenLayers.Geometry.Rectangle |
calculateBounds | Recalculate the bounds for the geometry.
OpenLayers.Renderer.NG |
Constants |
labelNodeType | {String} The node type for text label containers.
Functions |
OpenLayers.Renderer.NG |
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.
Functions |
OpenLayers.Renderer.SVG2 |
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
OpenLayers.Popup.AnchoredBubble | This class is deprecated.
Properties |
rounded | {Boolean} Has the popup been rounded yet?
Functions |
OpenLayers.Popup.AnchoredBubble |
draw |
updateRelativePosition | The popup has been moved to a new relative location, in which case we will want to re-do the rico corners.
setBorder | Always sets border to 0.
setRicoCorners | Update RICO corners according to the popup’s current relative postion.
getCornersToRound | {String} The proper corners string (“tr tl bl br”) for rico to round.
Constants |
CORNER_SIZE | {Integer} 5.
OpenLayers.Protocol.WFS.v1_1_0 | A WFS v1.1.0 protocol for vector layers.
Properties |
version | {String} WFS version number.
Functions |
OpenLayers.Protocol.WFS.v1_1_0 | A class for giving layers WFS v1.1.0 protocol.
OpenLayers.Control.ArgParser | The ArgParser control adds location bar query string parsing functionality to an OpenLayers Map.
Properties |
center | {OpenLayers.LonLat}
zoom | {int}
layers | {String} Each character represents the state of the corresponding layer on the map.
Functions |
OpenLayers.Control.ArgParser |
getParameters |
setMap | Set the map property for the control.
setCenter | As soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.
configureLayers | As soon as all the layers are loaded, cycle through them and hide or show them.
OpenLayers.Layer.Bing | Bing layer using direct tile access as provided by Bing Maps REST Services.
Properties |
key | {String} API key for Bing maps, get your own key at http://bingmapsportal.com/ .
serverResolutions | {Array} the resolutions provided by the Bing servers.
attributionTemplate | {String}
metadata | {Object} Metadata for this layer, as returned by the callback script
protocolRegex | {RegExp} Regular expression to match and replace http: in bing urls
Functions |
OpenLayers.Layer.Bing | Create a new Bing layer.
loadMetadata |
initLayer | Sets layer properties according to the metadata provided by the API
getURL |
updateAttribution | Updates the attribution according to the requirements outlined in http://gis.638310.n2.nabble.com/Bing-imagery-td5789168.html
setMap |
destroy |
OpenLayers.Layer.Bing.processMetadata | This function will be bound to an instance, linked to the global scope with an id, and called by the JSONP script returned by the API.

### Constants

### VERSION_NUMBER

### singleFile

TODO: remove this in 3.0 when we stop supporting build profiles that include OpenLayers.js

### Functions

### _getScriptLocation

Return the path to this script. This is also implemented in OpenLayers.js

#### Returns

{String} Path to this script

### Properties

### ImgPath

{String} Set this to the path where control images are stored, a path given here must end with a slash. If set to ‘’ (which is the default) OpenLayers will use its script location + “img/”.

You will need to set this property when you have a singlefile build of OpenLayers that either is not named “OpenLayers.js” or if you move the file in a way such that the image directory cannot be derived from the script location.

If your custom OpenLayers build is named “my-custom-ol.js” and the images of OpenLayers are in a folder “/resources/external/images/ol” a correct way of including OpenLayers in your HTML would be:

>     <script src="/path/to/my-custom-ol.js" type="text/javascript"></script>
>     <script type="text/javascript">
>        // tell OpenLayers where the control images are
>        // remember the trailing slash
>        OpenLayers.ImgPath = "/resources/external/images/ol/";
>     </script>

Please remember that when your OpenLayers script is not named “OpenLayers.js” you will have to make sure that the default theme is loaded into the page by including an appropriate <link>-tag, e.g.:

>     <link rel="stylesheet" href="/path/to/default/style.css"  type="text/css">

### Files

### OpenLayers Base Types

OpenLayers custom string, number and function functions are described here.

## OpenLayers.String

Contains convenience functions for string manipulation.

Summary

Properties |
tokenRegEx | Used to find tokens in a string.
numberRegEx | Used to test strings as numbers.

### Properties

### tokenRegEx

Used to find tokens in a string. Examples: ${a}, ${a.b.c}, ${a-b}, ${5}

### numberRegEx

Used to test strings as numbers.

## OpenLayers.Number

Contains convenience functions for manipulating numbers.

Summary

Properties |
decimalSeparator | Decimal separator to use when formatting numbers.
thousandsSeparator | Thousands separator to use when formatting numbers.
Functions |
zeroPad | Create a zero padded string optionally with a radix for casting numbers.

### Properties

### decimalSeparator

Decimal separator to use when formatting numbers.

### thousandsSeparator

Thousands separator to use when formatting numbers.

### Functions

### zeroPad

> zeroPad: function( | num,
> | len,
> | radix | )

Create a zero padded string optionally with a radix for casting numbers.

#### Parameters

num | {Number} The number to be zero padded.
len | {Number} The length of the string to be returned.
radix | {Number} An integer between 2 and 36 specifying the base to use for representing numeric values.

## OpenLayers.Function

Contains convenience functions for function manipulation.

## OpenLayers.Array

Contains convenience functions for array manipulation.

Summary

Functions |
OpenLayers.Class | Base class used to construct all other classes.
OpenLayers.inherit |

### Functions

### OpenLayers.Class

> OpenLayers.Class = function()

Base class used to construct all other classes. Includes support for multiple inheritance.

This constructor is new in OpenLayers 2.5. At OpenLayers 3.0, the old syntax for creating classes and dealing with inheritance will be removed.

#### To create a new OpenLayers-style class, use the following syntax

>     var MyClass = OpenLayers.Class(prototype);

To create a new OpenLayers-style class with multiple inheritance, use the following syntax:

>     var MyClass = OpenLayers.Class(Class1, Class2, prototype);

Note that instanceof reflection will only reveal Class1 as superclass.

### OpenLayers.inherit

> OpenLayers.inherit = function( | C,
> | P | )

#### Parameters

C | {Object} the class that inherits
P | {Object} the superclass to inherit from

In addition to the mandatory C and P parameters, an arbitrary number of objects can be passed, which will extend C.

## OpenLayers.Bounds

Instances of this class represent bounding boxes. Data stored as left, bottom, right, top floats. All values are initialized to null, however, you should make sure you set them before using the bounds for anything.

#### Possible use case

>     bounds = new OpenLayers.Bounds();
>     bounds.extend(new OpenLayers.LonLat(4,5));
>     bounds.extend(new OpenLayers.LonLat(5,6));
>     bounds.toBBOX(); // returns 4,5,5,6

Summary

Properties |
left | {Number} Minimum horizontal coordinate.
bottom | {Number} Minimum vertical coordinate.
right | {Number} Maximum horizontal coordinate.
top | {Number} Maximum vertical coordinate.
centerLonLat | {OpenLayers.LonLat} A cached center location.
Functions |
OpenLayers.Bounds | Construct a new bounds object.
clone | Create a cloned instance of this bounds.
equals | Test a two bounds for equivalence.
oppositeQuadrant | Get the opposite quadrant for a given quadrant string.

### Properties

### left

{Number} Minimum horizontal coordinate.

### bottom

{Number} Minimum vertical coordinate.

### right

{Number} Maximum horizontal coordinate.

### top

{Number} Maximum vertical coordinate.

### centerLonLat

{OpenLayers.LonLat} A cached center location. This should not be accessed directly. Use <getCenterLonLat> instead.

### Functions

### OpenLayers.Bounds

Construct a new bounds object. Coordinates can either be passed as four arguments, or as a single argument.

#### Parameters (four arguments)

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

#### Parameters (single argument)

bounds | {Array(Number)} [left, bottom, right, top]

### clone

> clone:function()

Create a cloned instance of this bounds.

#### Returns

{OpenLayers.Bounds} A fresh copy of the bounds

### equals

> equals:function( | bounds | )

Test a two bounds for equivalence.

#### Parameters

bounds | {OpenLayers.Bounds}

#### Returns

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

### oppositeQuadrant

> OpenLayers.Bounds.oppositeQuadrant = function( | quadrant | )

Get the opposite quadrant for a given quadrant string.

>     OpenLayers.Bounds.oppositeQuadrant( "tl" );
>     // => "br"

>     OpenLayers.Bounds.oppositeQuadrant( "tr" );
>     // => "bl"

#### Parameters

quadrant | {String} two character quadrant shortstring

#### Returns

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

## OpenLayers.Element

Summary

Functions |
hasClass | Tests if an element has the given CSS class name.
addClass | Add a CSS class name to an element.
removeClass | Remove a CSS class name from an element.
toggleClass | Remove a CSS class name from an element if it exists.

### Functions

### hasClass

> hasClass: function( | element,
> | name | )

Tests if an element has the given CSS class name.

#### Parameters

element | {DOMElement} A DOM element node.
name | {String} The CSS class name to search for.

#### Returns

{Boolean} The element has the given class name.

### addClass

> addClass: function( | element,
> | name | )

Add a CSS class name to an element. Safe where element already has the class name.

#### Parameters

element | {DOMElement} A DOM element node.
name | {String} The CSS class name to add.

#### Returns

{DOMElement} The element.

### removeClass

> removeClass: function( | element,
> | name | )

Remove a CSS class name from an element. Safe where element does not have the class name.

#### Parameters

element | {DOMElement} A DOM element node.
name | {String} The CSS class name to remove.

#### Returns

{DOMElement} The element.

### toggleClass

> toggleClass: function( | element,
> | name | )

Remove a CSS class name from an element if it exists. Add the class name if it doesn’t exist.

#### Parameters

element | {DOMElement} A DOM element node.
name | {String} The CSS class name to toggle.

#### Returns

{DOMElement} The element.

## OpenLayers.LonLat

This class represents a longitude and latitude pair

Summary

Functions |
OpenLayers.LonLat | Create a new map location.
toString | Return a readable string version of the lonlat
fromString | Alternative constructor that builds a new OpenLayers.LonLat from a parameter string
fromArray | Alternative constructor that builds a new OpenLayers.LonLat from an array of two numbers that represent lon- and lat-values.

### Functions

### OpenLayers.LonLat

Create a new map location. Coordinates can be passed either as two arguments, or as a single argument.

#### Parameters (two arguments)

lon | {Number} The x-axis coordinate in map units. If your map is in a geographic projection, this will be the Longitude. Otherwise, it will be the x coordinate of the map location in your map units.
lat | {Number} The y-axis coordinate in map units. If your map is in a geographic projection, this will be the Latitude. Otherwise, it will be the y coordinate of the map location in your map units.

#### Parameters (single argument)

location | {Array(Float)} [lon, lat]

### toString

> toString:function()

Return a readable string version of the lonlat

#### Returns

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

### fromString

> OpenLayers.LonLat.fromString = function( | str | )

Alternative constructor that builds a new OpenLayers.LonLat from a parameter string

#### Parameters

str | {String} Comma-separated Lon,Lat coordinate string. (e.g. <i>”5,40”</i>)

#### Returns

{OpenLayers.LonLat} New OpenLayers.LonLat object built from the passed-in String.

### fromArray

> OpenLayers.LonLat.fromArray = function( | arr | )

Alternative constructor that builds a new OpenLayers.LonLat from an array of two numbers that represent lon- and lat-values.

#### Parameters

arr | {Array(Float)} Array of lon/lat values (e.g. [5,-42])

#### Returns

{OpenLayers.LonLat} New OpenLayers.LonLat object built from the passed-in array.

## OpenLayers.Pixel

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

Summary

Functions |
OpenLayers.Pixel | Create a new OpenLayers.Pixel instance
toString | Cast this object into a string

### Functions

### OpenLayers.Pixel

Create a new OpenLayers.Pixel instance

#### Parameters

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

#### Returns

An instance of OpenLayers.Pixel

### toString

> toString:function()

Cast this object into a string

#### Returns

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

## OpenLayers.Size

Instances of this class represent a width/height pair

Summary

Functions |
OpenLayers.Size | Create an instance of OpenLayers.Size
toString | Return the string representation of a size object

### Functions

### OpenLayers.Size

Create an instance of OpenLayers.Size

#### Parameters

w | {Number} width
h | {Number} height

### toString

> toString:function()

Return the string representation of a size object

#### Returns

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

## OpenLayers.Console

The OpenLayers.Console namespace is used for debugging and error logging. If the Firebug Lite (../Firebug/firebug.js) is included before this script, calls to OpenLayers.Console methods will get redirected to window.console. This makes use of the Firebug extension where available and allows for cross-browser debugging Firebug style.

#### Note

Note that behavior will differ with the Firebug extention and Firebug Lite. Most notably, the Firebug Lite console does not currently allow for hyperlinks to code or for clicking on object to explore their properties.

## OpenLayers.Lang

Internationalization namespace. Contains dictionaries in various languages and methods to set and get the current language.

Summary

Properties |
code | {String} Current language code to use in OpenLayers.

### Properties

### code

{String} Current language code to use in OpenLayers. Use the <setCode> method to set this value and the <getCode> method to retrieve it.

## Util

Summary

Functions and Properties |
getElement | This is the old $() from prototype
isElement | A cross-browser implementation of “e instanceof Element”.
isArray | Tests that the provided object is an array.
removeItem | Remove an object from an array.
indexOf | Seems to exist already in FF, but not in MOZ.
dotless | {RegExp} Compiled regular expression to match dots (“.”
modifyDOMElement | Modifies many properties of a DOM element all at once.
createDiv | Creates a new div and optionally set some standard attributes.
createImage | Creates an img element with specific attribute values.
IMAGE_RELOAD_ATTEMPTS | {Integer} How many times should we try to reload an image before giving up?
alphaHackNeeded | {Boolean} true if the png alpha hack is necessary and possible, false otherwise.
alphaHack | Checks whether it’s necessary (and possible) to use the png alpha hack which allows alpha transparency for png images under Internet Explorer.
modifyAlphaImageDiv |
createAlphaImageDiv |
upperCaseObject | Creates a new hashtable and copies over all the keys from the passed-in object, but storing them under an uppercased version of the key at which they were stored.
applyDefaults | Takes an object and copies any properties that don’t exist from another properties, by analogy with OpenLayers.Util.extend() from Prototype.js.
getParameterString |
urlAppend | Appends a parameter string to a url.
getImagesLocation | {String} The fully formatted image location string
getImageLocation | {String} The fully formatted location string for a specified image
Try | Execute functions until one of them doesn’t throw an error.
getXmlNodeValue |
mouseLeft |
precision | {Number} The number of significant digits to retain to avoid floating point precision errors.
toFloat | Convenience method to cast an object to a Number, rounded to the desired floating point precision.
rad |
deg |
VincentyConstants | {Object} Constants for Vincenty functions.
getParameters | Parse the parameters from a URL or from the current page itself into a JavaScript Object.
lastSeqID | {Integer} The ever-incrementing count variable.
createUniqueID | Create a unique identifier for this session.
Constants |
INCHES_PER_UNIT | {Object} Constant inches per unit -- borrowed from MapServer mapscale.c derivation of nautical miles from http://en.wikipedia.org/wiki/Nautical_mile Includes the full set of units supported by CS-MAP (http://trac.osgeo.org/csmap/) and PROJ.4 (http://trac.osgeo.org/proj/) The hardcoded table is maintain in a CS-MAP source code module named CSdataU.c The hardcoded table of PROJ.4 units are in pj_units.c.
DOTS_PER_INCH | {Integer} 72 (A sensible default)
Functions |
normalizeScale |
getResolutionFromScale |
getScaleFromResolution |
pagePosition | Calculates the position of an element on the page | getViewportElement | Returns die viewport element of the document.
isEquivalentUrl | Test two URLs for equivalence.
createUrlObject |
removeTail | Takes a url and removes everything after the ?
Constants |
IS_GECKO | {Boolean} True if the userAgent reports the browser to use the Gecko engine
CANVAS_SUPPORTED | {Boolean} True if canvas 2d is supported.
BROWSER_NAME | {String} A substring of the navigator.userAgent property.
Functions |
getBrowserName | {String} A string which specifies which is the current browser in which we are running.
getRenderedDimensions | Renders the contentHTML offscreen to determine actual dimensions for popup sizing.

### Functions and Properties

### getElement

> OpenLayers.Util.getElement = function()

This is the old $() from prototype

#### Parameters

e | {String or DOMElement or Window}

#### Returns

{Array(DOMElement) or DOMElement}

### isElement

> OpenLayers.Util.isElement = function( | o | )

A cross-browser implementation of “e instanceof Element”.

#### Parameters

o | {Object} The object to test.

#### Returns

{Boolean}

### isArray

> OpenLayers.Util.isArray = function( | a | )

Tests that the provided object is an array. This test handles the cross-IFRAME case not caught by “a instanceof Array” and should be used instead.

#### Parameters

a | {Object} the object test.

#### Returns

{Boolean} true if the object is an array.

### removeItem

> OpenLayers.Util.removeItem = function( | array,
> | item | )

Remove an object from an array. Iterates through the array to find the item, then removes it.

#### Parameters

array | {Array}
item | {Object}

#### Returns

{Array} A reference to the array

### indexOf

> OpenLayers.Util.indexOf = function( | array,
> | obj | )

Seems to exist already in FF, but not in MOZ.

#### Parameters

array | {Array}
obj | {*}

#### Returns

{Integer} The index at which the first object was found in the array. If not found, returns -1.

### dotless

{RegExp} Compiled regular expression to match dots (“.”). This is used for replacing dots in identifiers. Because object identifiers are frequently used for DOM element identifiers by the library, we avoid using dots to make for more sensible CSS selectors.

TODO: Use a module pattern to avoid bloating the API with stuff like this.

### modifyDOMElement

> OpenLayers.Util.modifyDOMElement = function( | element,
> | id,
> | px,
> | sz,
> | position,
> | border,
> | overflow,
> | opacity | )

Modifies many properties of a DOM element all at once. Passing in null to an individual parameter will avoid setting the attribute.

#### Parameters

element | {DOMElement} DOM element to modify.
id | {String} The element id attribute to set. Note that dots (“.”) will be replaced with underscore (“_”) in setting the element id.
px | {<OpenLayers.Pixel>|Object} The element left and top position, OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
sz | {<OpenLayers.Size>|Object} The element width and height, OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
position | {String} The position attribute. eg: absolute, relative, etc.
border | {String} The style.border attribute. eg: solid black 2px
overflow | {String} The style.overview attribute.
opacity | {Float} Fractional value (0.0 - 1.0)

### createDiv

> OpenLayers.Util.createDiv = function( | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | overflow,
> | opacity | )

Creates a new div and optionally set some standard attributes. Null may be passed to each parameter if you do not wish to set a particular attribute. Note - zIndex is NOT set on the resulting div.

#### Parameters

id | {String} An identifier for this element. If no id is passed an identifier will be created automatically. Note that dots (“.”) will be replaced with underscore (“_”) when generating ids.
px | {<OpenLayers.Pixel>|Object} The element left and top position, OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
sz | {<OpenLayers.Size>|Object} The element width and height, OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
imgURL | {String} A url pointing to an image to use as a background image.
position | {String} The style.position value. eg: absolute, relative etc.
border | {String} The the style.border value. eg: 2px solid black
overflow | {String} The style.overflow value. Eg. hidden
opacity | {Float} Fractional value (0.0 - 1.0)

#### Returns

{DOMElement} A DOM Div created with the specified attributes.

### createImage

> OpenLayers.Util.createImage = function( | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | opacity,
> | delayDisplay | )

Creates an img element with specific attribute values.

#### Parameters

id | {String} The id field for the img. If none assigned one will be automatically generated.
px | {<OpenLayers.Pixel>|Object} The element left and top position, OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
sz | {<OpenLayers.Size>|Object} The element width and height, OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
imgURL | {String} The url to use as the image source.
position | {String} The style.position value.
border | {String} The border to place around the image.
opacity | {Float} Fractional value (0.0 - 1.0)
delayDisplay | {Boolean} If true waits until the image has been loaded.

#### Returns

{DOMElement} A DOM Image created with the specified attributes.

### IMAGE_RELOAD_ATTEMPTS

{Integer} How many times should we try to reload an image before giving up? Default is 0

### alphaHackNeeded

{Boolean} true if the png alpha hack is necessary and possible, false otherwise.

### alphaHack

> OpenLayers.Util.alphaHack = function()

Checks whether it’s necessary (and possible) to use the png alpha hack which allows alpha transparency for png images under Internet Explorer.

#### Returns

{Boolean} true if the png alpha hack is necessary and possible, false otherwise.

### modifyAlphaImageDiv

> OpenLayers.Util.modifyAlphaImageDiv = function( | div,
> | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | sizing,
> | opacity | )

#### Parameters

div | {DOMElement} Div containing Alpha-adjusted Image
id | {String}
px | {<OpenLayers.Pixel>|Object} OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
sz | {<OpenLayers.Size>|Object} OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
imgURL | {String}
position | {String}
border | {String}
sizing | {String} ‘crop’, ‘scale’, or ‘image’. Default is “scale”
opacity | {Float} Fractional value (0.0 - 1.0)

### createAlphaImageDiv

> OpenLayers.Util.createAlphaImageDiv = function( | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | sizing,
> | opacity,
> | delayDisplay | )

#### Parameters

id | {String}
px | {<OpenLayers.Pixel>|Object} OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
sz | {<OpenLayers.Size>|Object} OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
imgURL | {String}
position | {String}
border | {String}
sizing | {String} ‘crop’, ‘scale’, or ‘image’. Default is “scale”
opacity | {Float} Fractional value (0.0 - 1.0)
delayDisplay | {Boolean} If true waits until the image has been loaded.

#### Returns

{DOMElement} A DOM Div created with a DOM Image inside it. If the hack is needed for transparency in IE, it is added.

### upperCaseObject

> OpenLayers.Util.upperCaseObject = function ( | object | )

Creates a new hashtable and copies over all the keys from the passed-in object, but storing them under an uppercased version of the key at which they were stored.

#### Parameters

object | {Object}

#### Returns

{Object} A new Object with all the same keys but uppercased

### applyDefaults

> OpenLayers.Util.applyDefaults = function ( | to,
> | from | )

Takes an object and copies any properties that don’t exist from another properties, by analogy with OpenLayers.Util.extend() from Prototype.js.

#### Parameters

to | {Object} The destination object.
from | {Object} The source object. Any properties of this object that are undefined in the to object will be set on the to object.

#### Returns

{Object} A reference to the to object. Note that the to argument is modified in place and returned by this function.

### getParameterString

> OpenLayers.Util.getParameterString = function( | params | )

#### Parameters

params | {Object}

#### Returns

{String} A concatenation of the properties of an object in http parameter notation. (ex. <i>”key1=value1&key2=value2&key3=value3”</i>) If a parameter is actually a list, that parameter will then be set to a comma-seperated list of values (foo,bar) instead of being URL escaped (foo%3Abar).

### urlAppend

> OpenLayers.Util.urlAppend = function( | url,
> | paramStr | )

Appends a parameter string to a url. This function includes the logic for using the appropriate character (none, & or ?) to append to the url before appending the param string.

#### Parameters

url | {String} The url to append to
paramStr | {String} The param string to append

#### Returns

{String} The new url

### getImagesLocation

> OpenLayers.Util.getImagesLocation = function()

#### Returns

{String} The fully formatted image location string

### getImageLocation

> OpenLayers.Util.getImageLocation = function( | image | )

#### Returns

{String} The fully formatted location string for a specified image

### Try

> OpenLayers.Util.Try = function()

Execute functions until one of them doesn’t throw an error. Capitalized because “try” is a reserved word in JavaScript. Taken directly from OpenLayers.Util.Try()

#### Parameters

[*] | {Function} Any number of parameters may be passed to Try() It will attempt to execute each of them until one of them successfully executes. If none executes successfully, returns null.

#### Returns

{*} The value returned by the first successfully executed function.

### getXmlNodeValue

> OpenLayers.Util.getXmlNodeValue = function( | node | )

#### Parameters

node | {XMLNode}

#### Returns

{String} The text value of the given node, without breaking in firefox or IE

### mouseLeft

> OpenLayers.Util.mouseLeft = function ( | evt,
> | div | )

#### Parameters

evt | {Event}
div | {HTMLDivElement}

#### Returns

{Boolean}

### precision

{Number} The number of significant digits to retain to avoid floating point precision errors.

We use 14 as a “safe” default because, although IEEE 754 double floats (standard on most modern operating systems) support up to about 16 significant digits, 14 significant digits are sufficient to represent sub-millimeter accuracy in any coordinate system that anyone is likely to use with OpenLayers.

If DEFAULT_PRECISION is set to 0, the original non-truncating behavior of OpenLayers <2.8 is preserved. Be aware that this will cause problems with certain projections, e.g. spherical Mercator.

### toFloat

> OpenLayers.Util.toFloat = function ( | number,
> | precision | )

Convenience method to cast an object to a Number, rounded to the desired floating point precision.

#### Parameters

number | {Number} The number to cast and round.
precision | {Number} An integer suitable for use with Number.toPrecision(). Defaults to OpenLayers.Util.DEFAULT_PRECISION. If set to 0, no rounding is performed.

#### Returns

{Number} The cast, rounded number.

### rad

> OpenLayers.Util.rad = function( | x | )

#### Parameters

x | {Float}

#### Returns

{Float}

### deg

> OpenLayers.Util.deg = function( | x | )

#### Parameters

x | {Float}

#### Returns

{Float}

### VincentyConstants

{Object} Constants for Vincenty functions.

### getParameters

> OpenLayers.Util.getParameters = function( | url,
> | options | )

Parse the parameters from a URL or from the current page itself into a JavaScript Object. Note that parameter values with commas are separated out into an Array.

#### Parameters

url | {String} Optional url used to extract the query string. If url is null or is not supplied, query string is taken from the page location.
options | {Object} Additional options. Optional.

#### Valid options

splitArgs | {Boolean} Split comma delimited params into arrays? Default is true.

#### Returns

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

### lastSeqID

{Integer} The ever-incrementing count variable. Used for generating unique ids.

### createUniqueID

> OpenLayers.Util.createUniqueID = function( | prefix | )

Create a unique identifier for this session. Each time this function is called, a counter is incremented. The return will be the optional prefix (defaults to “id_”) appended with the counter value.

#### Parameters

prefix | {String} Optional string to prefix unique id. Default is “id_”. Note that dots (“.”) in the prefix will be replaced with underscore (“_”).

#### Returns

{String} A unique id string, built on the passed in prefix.

### Constants

### INCHES_PER_UNIT

{Object} Constant inches per unit -- borrowed from MapServer mapscale.c derivation of nautical miles from http://en.wikipedia.org/wiki/Nautical_mile Includes the full set of units supported by CS-MAP (http://trac.osgeo.org/csmap/) and PROJ.4 (http://trac.osgeo.org/proj/) The hardcoded table is maintain in a CS-MAP source code module named CSdataU.c The hardcoded table of PROJ.4 units are in pj_units.c.

### DOTS_PER_INCH

{Integer} 72 (A sensible default)

### Functions

### normalizeScale

> OpenLayers.Util.normalizeScale = function ( | scale | )

#### Parameters

scale | {float}

#### Returns

{Float} A normalized scale value, in 1 / X format. This means that if a value less than one ( already 1/x) is passed in, it just returns scale directly. Otherwise, it returns 1 / scale

### getResolutionFromScale

> OpenLayers.Util.getResolutionFromScale = function ( | scale,
> | units | )

#### Parameters

scale | {Float}
units | {String} Index into OpenLayers.INCHES_PER_UNIT hashtable. Default is degrees

#### Returns

{Float} The corresponding resolution given passed-in scale and unit parameters. If the given scale is falsey, the returned resolution will be undefined.

### getScaleFromResolution

> OpenLayers.Util.getScaleFromResolution = function ( | resolution,
> | units | )

#### Parameters

resolution | {Float}
units | {String} Index into OpenLayers.INCHES_PER_UNIT hashtable. Default is degrees

#### Returns

{Float} The corresponding scale given passed-in resolution and unit parameters.

### pagePosition

> OpenLayers.Util.pagePosition = function( | forElement | )

Calculates the position of an element on the page

### getViewportElement

> OpenLayers.Util.getViewportElement = function()

Returns die viewport element of the document. The viewport element is usually document.documentElement, except in IE,where it is either document.body or document.documentElement, depending on the document’s compatibility mode

### isEquivalentUrl

> OpenLayers.Util.isEquivalentUrl = function( | url1,
> | url2,
> | options | )

Test two URLs for equivalence.

Setting ‘ignoreCase’ allows for case-independent comparison.

#### Comparison is based on

- Protocol
- Host (evaluated without the port)
- Port (set ‘ignorePort80’ to ignore “80” values)
- Hash ( set ‘ignoreHash’ to disable)
- Pathname (for relative <-> absolute comparison)
- Arguments (so they can be out of order)

#### Parameters

url1 | {String}
url2 | {String}
options | {Object} Allows for customization of comparison:
’ignoreCase’ | Default is True
’ignorePort80’ | Default is True
’ignoreHash’ | Default is True

#### Returns

{Boolean} Whether or not the two URLs are equivalent

### createUrlObject

> OpenLayers.Util.createUrlObject = function( | url,
> | options | )

#### Parameters

url | {String}
options | {Object} A hash of options.

#### Valid options

ignoreCase | {Boolean} lowercase url,
ignorePort80 | {Boolean} don’t include explicit port if port is 80,
ignoreHash | {Boolean} Don’t include part of url after the hash (#).
splitArgs | {Boolean} Split comma delimited params into arrays? Default is true.

#### Returns

{Object} An object with separate url, a, port, host, and args parsed out and ready for comparison

### removeTail

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

Takes a url and removes everything after the ? and #

#### Parameters

url | {String} The url to process

#### Returns

{String} The string with all queryString and Hash removed

### Constants

### IS_GECKO

{Boolean} True if the userAgent reports the browser to use the Gecko engine

### CANVAS_SUPPORTED

{Boolean} True if canvas 2d is supported.

### BROWSER_NAME

{String} A substring of the navigator.userAgent property. Depending on the userAgent property, this will be the empty string or one of the following:

- ”opera” -- Opera
- ”msie” -- Internet Explorer
- ”safari” -- Safari
- ”firefox” -- Firefox
- ”mozilla” -- Mozilla

### Functions

### getBrowserName

> OpenLayers.Util.getBrowserName = function()

#### Returns

{String} A string which specifies which is the current browser in which we are running.

#### Currently-supported browser detection and codes

- ’opera’ -- Opera
- ’msie’ -- Internet Explorer
- ’safari’ -- Safari
- ’firefox’ -- Firefox
- ’mozilla’ -- Mozilla

If we are unable to property identify the browser, we return an empty string.

### getRenderedDimensions

> OpenLayers.Util.getRenderedDimensions = function( | contentHTML,
> | size,
> | options | )

Renders the contentHTML offscreen to determine actual dimensions for popup sizing. As we need layout to determine dimensions the content is rendered -9999px to the left and absolute to ensure the scrollbars do not flicker

#### Parameters

contentHTML size - {OpenLayers.Size} If either the ‘w’ or ‘h’ properties is specified, we fix that dimension of the div to be measured. This is useful in the case where we have a limit in one dimension and must therefore meaure the flow in the other dimension. options - {Object}

#### Allowed Options

displayClass | {String} Optional parameter. A CSS class name(s) string to provide the CSS context of the rendered content.
containerElement | {DOMElement} Optional parameter. Insert the HTML to this node instead of the body root when calculating dimensions.

#### Returns

{OpenLayers.Size}

## OpenLayers.Event

Utility functions for event handling.

Summary

Properties |
observers | {Object} A hashtable cache of the event observers.
Constants |
KEY_SPACE | {int}
KEY_BACKSPACE | {int}
KEY_TAB | {int}
KEY_RETURN | {int}
KEY_ESC | {int}
KEY_LEFT | {int}
KEY_UP | {int}
KEY_RIGHT | {int}
KEY_DOWN | {int}
KEY_DELETE | {int}
Functions |
element | Cross browser event element detection.
isSingleTouch | Determine whether event was caused by a single touch
isMultiTouch | Determine whether event was caused by a multi touch
isLeftClick | Determine whether event was caused by a left click.
isRightClick | Determine whether event was caused by a right mouse click.
stop | Stops an event from propagating.
preventDefault | Cancels the event if it is cancelable, without stopping further propagation of the event.
findElement |
observe |
stopObservingElement | Given the id of an element to stop observing, cycle through the element’s cached observers, calling stopObserving on each one, skipping those entries which can no longer be removed.
_removeElementObservers |
stopObserving |
unloadCache | Cycle through all the element entries in the events cache and call stopObservingElement on each.

### Properties

### observers

{Object} A hashtable cache of the event observers. Keyed by element._eventCacheID

### Constants

### KEY_SPACE

{int}

### KEY_BACKSPACE

{int}

### KEY_TAB

{int}

### KEY_RETURN

{int}

### KEY_ESC

{int}

### KEY_LEFT

{int}

### KEY_UP

{int}

### KEY_RIGHT

{int}

### KEY_DOWN

{int}

### KEY_DELETE

{int}

### Functions

### element

> element: function( | event | )

Cross browser event element detection.

#### Parameters

event | {Event}

#### Returns

{DOMElement} The element that caused the event

### isSingleTouch

> isSingleTouch: function( | event | )

Determine whether event was caused by a single touch

#### Parameters

event | {Event}

#### Returns

{Boolean}

### isMultiTouch

> isMultiTouch: function( | event | )

Determine whether event was caused by a multi touch

#### Parameters

event | {Event}

#### Returns

{Boolean}

### isLeftClick

> isLeftClick: function( | event | )

Determine whether event was caused by a left click.

#### Parameters

event | {Event}

#### Returns

{Boolean}

### isRightClick

> isRightClick: function( | event | )

Determine whether event was caused by a right mouse click.

#### Parameters

event | {Event}

#### Returns

{Boolean}

### stop

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

Stops an event from propagating.

#### Parameters

event | {Event}
allowDefault | {Boolean} If true, we stop the event chain but still allow the default browser behaviour (text selection, radio-button clicking, etc). Default is false.

### preventDefault

> preventDefault: function( | event | )

Cancels the event if it is cancelable, without stopping further propagation of the event.

#### Parameters

event | {Event}

### findElement

> findElement: function( | event,
> | tagName | )

#### Parameters

event | {Event}
tagName | {String}

#### Returns

{DOMElement} The first node with the given tagName, starting from the node the event was triggered on and traversing the DOM upwards

### observe

> observe: function( | elementParam,
> | name,
> | observer,
> | useCapture | )

#### Parameters

elementParam | {DOMElement || String}
name | {String}
observer | {function}
useCapture | {Boolean}

### stopObservingElement

> stopObservingElement: function( | elementParam | )

Given the id of an element to stop observing, cycle through the element’s cached observers, calling stopObserving on each one, skipping those entries which can no longer be removed.

#### parameters

elementParam | {DOMElement || String}

### _removeElementObservers

> _removeElementObservers: function( | elementObservers | )

#### Parameters

elementObservers | {Array(Object)} Array of (element, name, observer, usecapture) objects, taken directly from hashtable

### stopObserving

> stopObserving: function( | elementParam,
> | name,
> | observer,
> | useCapture | )

#### Parameters

elementParam | {DOMElement || String}
name | {String}
observer | {function}
useCapture | {Boolean}

#### Returns

{Boolean} Whether or not the event observer was removed

### unloadCache

> unloadCache: function()

Cycle through all the element entries in the events cache and call stopObservingElement on each.

## OpenLayers.Events

Summary

Constants |
BROWSER_EVENTS | {Array(String)} supported events
Properties |
listeners | {Object} Hashtable of Array(Function): events listener functions
object | {Object} the code object issuing application events
element | {DOMElement} the DOM element receiving browser events
eventHandler | {Function} bound event handler attached to elements
extensionCount | {Object} Keys are event types (like in listeners), values are the number of extension listeners for each event type.
Functions |
clearMouseListener | A version of <clearMouseCache> that is bound to this instance so that it can be used with OpenLayers.Event.observe and OpenLayers.Event.stopObserving.
OpenLayers.Events | Construct an OpenLayers.Events object.
attachToElement |
remove | Remove all listeners for a given event type.
handleBrowserEvent | Basically just a wrapper to the triggerEvent() function, but takes care to set a property ‘xy’ on the event with the current mouse position.
getTouchClientXY | WebKit has a few bugs for clientX/clientY.
getMousePosition |
addMsTouchListener |
addMsTouchListenerStart |
addMsTouchListenerMove |
addMsTouchListenerEnd |

### Constants

### BROWSER_EVENTS

{Array(String)} supported events

### Properties

### listeners

{Object} Hashtable of Array(Function): events listener functions

### object

{Object} the code object issuing application events

### element

{DOMElement} the DOM element receiving browser events

### eventHandler

{Function} bound event handler attached to elements

### extensionCount

{Object} Keys are event types (like in listeners), values are the number of extension listeners for each event type.

### Functions

### clearMouseListener

A version of <clearMouseCache> that is bound to this instance so that it can be used with OpenLayers.Event.observe and OpenLayers.Event.stopObserving.

### OpenLayers.Events

Construct an OpenLayers.Events object.

#### Parameters

object | {Object} The js object to which this Events object is being added
element | {DOMElement} A dom element to respond to browser events
eventTypes | {Array(String)} Deprecated. Array of custom application events. A listener may be registered for any named event, regardless of the values provided here.
fallThrough | {Boolean} Allow events to fall through after these have been handled?
options | {Object} Options for the events object.

### attachToElement

> attachToElement: function ( | element | )

#### Parameters

element | {HTMLDOMElement} a DOM element to attach browser events to

### remove

> remove: function( | type | )

Remove all listeners for a given event type. If type is not registered, does nothing.

#### Parameters

type | {String}

### handleBrowserEvent

> handleBrowserEvent: function ( | evt | )

Basically just a wrapper to the triggerEvent() function, but takes care to set a property ‘xy’ on the event with the current mouse position.

#### Parameters

evt | {Event}

### getTouchClientXY

> getTouchClientXY: function ( | evt | )

WebKit has a few bugs for clientX/clientY. This method detects them and calculate the correct values.

#### Parameters

evt | {Touch} a Touch object from a TouchEvent

#### Returns

{Object} An object with only clientX and clientY properties with the calculated values.

### getMousePosition

> getMousePosition: function ( | evt | )

#### Parameters

evt | {Event}

#### Returns

{OpenLayers.Pixel} The current xy coordinate of the mouse, adjusted for offsets

### addMsTouchListener

> addMsTouchListener: function ( | element,
> | type,
> | handler | )

#### Parameters

element | {DOMElement} The DOM element to register the listener on
type | {String} The event type
handler | {Function} the handler

### addMsTouchListenerStart

> addMsTouchListenerStart: function( | element,
> | type,
> | handler | )

#### Parameters

element | {DOMElement} The DOM element to register the listener on
type | {String} The event type
handler | {Function} the handler

### addMsTouchListenerMove

> addMsTouchListenerMove: function ( | element,
> | type,
> | handler | )

#### Parameters

element | {DOMElement} The DOM element to register the listener on
type | {String} The event type
handler | {Function} the handler

### addMsTouchListenerEnd

> addMsTouchListenerEnd: function ( | element,
> | type,
> | handler | )

#### Parameters

element | {DOMElement} The DOM element to register the listener on
type | {String} The event type
handler | {Function} the handler

## OpenLayers.Events.buttonclick

Extension event type for handling buttons on top of a dom element. This event type fires “buttonclick” on its target when a button was clicked. Buttons are detected by the “olButton” class.

This event type makes sure that button clicks do not interfere with other events that are registered on the same element.

#### Event types provided by this extension

- buttonclick Triggered when a button is clicked. Listeners receive an object with a buttonElement property referencing the dom element of the clicked button, and an buttonXY property with the click position relative to the button.

Summary

Properties |
target | {OpenLayers.Events} The events instance that the buttonclick event will be triggered on.
events | {Array} Events to observe and conditionally stop from propagating when an element with the olButton class (or its olAlphaImg child) is clicked.
startRegEx | {RegExp} Regular expression to test Event.type for events that start a buttonclick sequence.
cancelRegEx | {RegExp} Regular expression to test Event.type for events that cancel a buttonclick sequence.
completeRegEx | {RegExp} Regular expression to test Event.type for events that complete a buttonclick sequence.
startEvt | {Event} The event that started the click sequence
Functions |
OpenLayers.Events.buttonclick | Construct a buttonclick event type.
destroy |
getPressedButton | Get the pressed button, if any.
ignore | Check for event target elements that should be ignored by OpenLayers.
buttonClick | Check if a button was clicked, and fire the buttonclick event

### Properties

### target

{OpenLayers.Events} The events instance that the buttonclick event will be triggered on.

### events

{Array} Events to observe and conditionally stop from propagating when an element with the olButton class (or its olAlphaImg child) is clicked.

### startRegEx

{RegExp} Regular expression to test Event.type for events that start a buttonclick sequence.

### cancelRegEx

{RegExp} Regular expression to test Event.type for events that cancel a buttonclick sequence.

### completeRegEx

{RegExp} Regular expression to test Event.type for events that complete a buttonclick sequence.

### startEvt

{Event} The event that started the click sequence

### Functions

### OpenLayers.Events.buttonclick

Construct a buttonclick event type. Applications are not supposed to create instances of this class - they are created on demand by OpenLayers.Events instances.

#### Parameters

target | {OpenLayers.Events} The events instance that the buttonclick event will be triggered on.

### destroy

> destroy: function()

### getPressedButton

> getPressedButton: function( | element | )

Get the pressed button, if any. Returns undefined if no button was pressed.

#### Arguments

element | {DOMElement} The event target.

#### Returns

{DOMElement} The button element, or undefined.

### ignore

> ignore: function( | element | )

Check for event target elements that should be ignored by OpenLayers.

#### Parameters

element | {DOMElement} The event target.

### buttonClick

> buttonClick: function( | evt | )

Check if a button was clicked, and fire the buttonclick event

#### Parameters

evt | {Event}

## OpenLayers.Util.vendorPrefix

A collection of utility functions to detect vendor prefixed features

Summary

Functions |
domToCss | Converts a upper camel case DOM style property name to a CSS property i.e.

### Functions

### domToCss

> function domToCss( | prefixedDom | )

Converts a upper camel case DOM style property name to a CSS property i.e. transformOrigin -> transform-origin or WebkitTransformOrigin -> -webkit-transform-origin

#### Parameters

prefixedDom | {String} The property to convert

#### Returns

{String} The CSS property

## OpenLayers.Animation

A collection of utility functions for executing methods that repaint a portion of the browser window. These methods take advantage of the browser’s scheduled repaints where requestAnimationFrame is available.

Summary

Properties |
isNative | {Boolean} true if a native requestAnimationFrame function is available
Functions |
requestFrame | Schedule a function to be called at the next available animation frame.
start | Executes a method with requestFrame in series for some duration.
stop | Terminates an animation loop started with start.

### Properties

### isNative

{Boolean} true if a native requestAnimationFrame function is available

### Functions

### requestFrame

Schedule a function to be called at the next available animation frame. Uses the native method where available. Where requestAnimationFrame is not available, setTimeout will be called with a 16ms delay.

#### Parameters

callback | {Function} The function to be called at the next animation frame.
element | {DOMElement} Optional element that visually bounds the animation.

### start

> function start( | callback,
> | duration,
> | element | )

Executes a method with requestFrame in series for some duration.

#### Parameters

callback | {Function} The function to be called at the next animation frame.
duration | {Number} Optional duration for the loop. If not provided, the animation loop will execute indefinitely.
element | {DOMElement} Optional element that visually bounds the animation.

#### Returns

{Number} Identifier for the animation loop. Used to stop animations with stop.

### stop

> function stop( | id | )

Terminates an animation loop started with start.

#### Parameters

id | {Number} Identifier returned from start.

## OpenLayers.Tween

Summary

Properties |
time | {int} Step counter
startTime | {Number} The timestamp of the first execution step.
animationId | {int} Loop id returned by OpenLayers.Animation.start
playing | {Boolean} Tells if the easing is currently playing
Functions |
OpenLayers.Tween | Creates a Tween.
play | Calls the appropriate easing method

### Properties

### time

{int} Step counter

### startTime

{Number} The timestamp of the first execution step. Used for skipping frames

### animationId

{int} Loop id returned by OpenLayers.Animation.start

### playing

{Boolean} Tells if the easing is currently playing

### Functions

### OpenLayers.Tween

Creates a Tween.

#### Parameters

easing | {<OpenLayers.Easing>(Function)} easing function method to use

### play

> play: function()

Calls the appropriate easing method

## OpenLayers.Easing

#### Credits

Easing Equations by Robert Penner, http://www.robertpenner.com/easing/

## OpenLayers.Easing.Linear

Summary

Functions |
easeIn |
easeOut |
easeInOut |

### Functions

### easeIn

> easeIn: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

### easeOut

> easeOut: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

### easeInOut

> easeInOut: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

## OpenLayers.Easing.Expo

Summary

Functions |
easeIn |
easeOut |
easeInOut |

### Functions

### easeIn

> easeIn: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

### easeOut

> easeOut: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

### easeInOut

> easeInOut: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

## OpenLayers.Easing.Quad

Summary

Functions |
easeIn |
easeOut |
easeInOut |

### Functions

### easeIn

> easeIn: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

### easeOut

> easeOut: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

### easeInOut

> easeInOut: function( | t,
> | b,
> | c,
> | d | )

#### Parameters

t | {Float} time
b | {Float} beginning position
c | {Float} total change
d | {Float} duration of the transition

#### Returns

{Float}

## OpenLayers.Projection

Methods for coordinate transforms between coordinate systems. By default, OpenLayers ships with the ability to transform coordinates between geographic (EPSG:4326) and web or spherical mercator (EPSG:900913 et al.) coordinate reference systems. See the <transform> method for details on usage.

Additional transforms may be added by using the <proj4js at url target=”http://proj4js” name=”http://proj4js”.org/> library. If the proj4js library is included, the <transform> method will work between any two coordinate reference systems with proj4js definitions.

If the proj4js library is not included, or if you wish to allow transforms between arbitrary coordinate reference systems, use the <addTransform> method to register a custom transform method.

Summary

Properties |
proj | {Object} Proj4js.Proj instance.
projCode | {String}
titleRegEx | {RegExp} regular expression to strip the title from a proj4js definition
Functions |
OpenLayers.Projection | This class offers several methods for interacting with a wrapped pro4js projection object.
toString | Convert projection to string (getCode wrapper).
equals | Test equality of two projection instances.
destroy | Destroy projection object.
Properties |
transforms | {Object} Transforms is an object, with from properties, each of which may have a to property.

### Properties

### proj

{Object} Proj4js.Proj instance.

### projCode

{String}

### titleRegEx

{RegExp} regular expression to strip the title from a proj4js definition

### Functions

### OpenLayers.Projection

This class offers several methods for interacting with a wrapped pro4js projection object.

#### Parameters

projCode | {String} A string identifying the Well Known Identifier for the projection.
options | {Object} An optional object to set additional properties on the projection.

#### Returns

{OpenLayers.Projection} A projection object.

### toString

> toString: function()

Convert projection to string (getCode wrapper).

#### Returns

{String} The projection code.

### equals

> equals: function( | projection | )

Test equality of two projection instances. Determines equality based soley on the projection code.

#### Returns

{Boolean} The two projections are equivalent.

### destroy

> destroy: function()

Destroy projection object.

### Properties

### transforms

{Object} Transforms is an object, with from properties, each of which may have a to property. This allows you to define projections without requiring support for proj4js to be included.

This object has keys which correspond to a ‘source’ projection object. The keys should be strings, corresponding to the projection.getCode() value. Each source projection object should have a set of destination projection keys included in the object.

Each value in the destination object should be a transformation function, where the function is expected to be passed an object with a .x and a .y property. The function should return the object, with the .x and .y transformed according to the transformation function.

Note | Properties on this object should not be set directly. To add a transform method to this object, use the <addTransform> method. For an example of usage, see the OpenLayers.Layer.SphericalMercator file.

## OpenLayers.Map

Instances of OpenLayers.Map are interactive maps embedded in a web page. Create a new map with the OpenLayers.Map constructor.

On their own maps do not provide much functionality. To extend a map it’s necessary to add controls (OpenLayers.Control) and layers (OpenLayers.Layer) to the map.

Summary

Constants |
Z_INDEX_BASE | {Object} Base z-indexes for different classes of thing
Properties |
id | {String} Unique identifier for the map
fractionalZoom | {Boolean} For a base layer that supports it, allow the map resolution to be set to a value between one of the values in the resolutions array.
dragging | {Boolean} The map is currently being dragged.
size | {OpenLayers.Size} Size of the main div (this.div)
viewPortDiv | {HTMLDivElement} The element that represents the map viewport
layerContainerOrigin | {OpenLayers.LonLat} The lonlat at which the later container was re-initialized (on-zoom)
layerContainerDiv | {HTMLDivElement} The element that contains the layers.
popups | {Array(OpenLayers.Popup)} List of popups associated with the map
center | {OpenLayers.LonLat} The current center of the map
resolution | {Float} The resolution of the map.
zoom | {Integer} The current zoom level of the map
panRatio | {Float} The ratio of the current extent within which panning will tween.
panTween | {OpenLayers.Tween} Animated panning tween object, see panTo()
panDuration | {Integer} The number of steps to be passed to the OpenLayers.Tween.start() method when the map is panned.
zoomTween | {OpenLayers.Tween} Animated zooming tween object, see zoomTo()
zoomDuration | {Integer} The number of steps to be passed to the OpenLayers.Tween.start() method when the map is zoomed.
paddingForPopups | {OpenLayers.Bounds} Outside margin of the popup.
layerContainerOriginPx | {Object} Cached object representing the layer container origin (in pixels).
minPx | {Object} An object with a ‘x’ and ‘y’ values that is the lower left of maxExtent in viewport pixel space.
maxPx | {Object} An object with a ‘x’ and ‘y’ values that is the top right of maxExtent in viewport pixel space.
Functions |
OpenLayers.Map | Constructor for a new OpenLayers.Map instance.
unloadDestroy | Function that is called to destroy the map on page unload.
updateSizeDestroy | When the map is destroyed, we need to stop listening to updateSize events: this method stores the function we need to unregister in non-IE browsers.
setLayerZIndex |
resetLayersZIndex | Reset each layer’s z-index based on layer’s array index
addControlToMap |
getCurrentSize | {OpenLayers.Size} A new OpenLayers.Size object with the dimensions of the map div
calculateBounds |
getCachedCenter | {OpenLayers.LonLat}
moveByPx | Drag the map by pixels.
adjustZoom |
moveTo |
centerLayerContainer | This function takes care to recenter the layerContainerDiv.
isValidZoomLevel |
isValidLonLat |
getLonLatFromViewPortPx |
getZoomTargetCenter |
getGeodesicPixelSize |
getLonLatFromLayerPx |
applyTransform | Applies the given transform to the layerContainerDiv.
Constants |
TILE_WIDTH | {Integer} 256 Default tile width (unless otherwise specified)
TILE_HEIGHT | {Integer} 256 Default tile height (unless otherwise specified)

### Constants

### Z_INDEX_BASE

{Object} Base z-indexes for different classes of thing

### Properties

### id

{String} Unique identifier for the map

### fractionalZoom

{Boolean} For a base layer that supports it, allow the map resolution to be set to a value between one of the values in the resolutions array. Default is false.

When fractionalZoom is set to true, it is possible to zoom to an arbitrary extent. This requires a base layer from a source that supports requests for arbitrary extents (i.e. not cached tiles on a regular lattice). This means that fractionalZoom will not work with commercial layers (Google, Yahoo, VE), layers using TileCache, or any other pre-cached data sources.

If you are using fractionalZoom, then you should also use <getResolutionForZoom> instead of layer.resolutions[zoom] as the former works for non-integer zoom levels.

### dragging

{Boolean} The map is currently being dragged.

### size

{OpenLayers.Size} Size of the main div (this.div)

### viewPortDiv

{HTMLDivElement} The element that represents the map viewport

### layerContainerOrigin

{OpenLayers.LonLat} The lonlat at which the later container was re-initialized (on-zoom)

### layerContainerDiv

{HTMLDivElement} The element that contains the layers.

### popups

{Array(OpenLayers.Popup)} List of popups associated with the map

### center

{OpenLayers.LonLat} The current center of the map

### resolution

{Float} The resolution of the map.

### zoom

{Integer} The current zoom level of the map

### panRatio

{Float} The ratio of the current extent within which panning will tween.

### panTween

{OpenLayers.Tween} Animated panning tween object, see panTo()

### panDuration

{Integer} The number of steps to be passed to the OpenLayers.Tween.start() method when the map is panned. Default is 50.

### zoomTween

{OpenLayers.Tween} Animated zooming tween object, see zoomTo()

### zoomDuration

{Integer} The number of steps to be passed to the OpenLayers.Tween.start() method when the map is zoomed. Default is 20.

### paddingForPopups

{OpenLayers.Bounds} Outside margin of the popup. Used to prevent the popup from getting too close to the map border.

### layerContainerOriginPx

{Object} Cached object representing the layer container origin (in pixels).

### minPx

{Object} An object with a ‘x’ and ‘y’ values that is the lower left of maxExtent in viewport pixel space. Used to verify in moveByPx that the new location we’re moving to is valid. It is also used in the getLonLatFromViewPortPx function of Layer.

### maxPx

{Object} An object with a ‘x’ and ‘y’ values that is the top right of maxExtent in viewport pixel space. Used to verify in moveByPx that the new location we’re moving to is valid.

### Functions

### OpenLayers.Map

Constructor for a new OpenLayers.Map instance. There are two possible ways to call the map constructor. See the examples below.

#### Parameters

div | {DOMElement|String} The element or id of an element in your page that will contain the map. May be omitted if the <div> option is provided or if you intend to call the <render> method later.
options | {Object} Optional object with properties to tag onto the map.

#### Valid options (in addition to the listed API properties)

center | {<OpenLayers.LonLat>|Array} The default initial center of the map. If provided as array, the first value is the x coordinate, and the 2nd value is the y coordinate. Only specify if <layers> is provided. Note that if an ArgParser/Permalink control is present, and the querystring contains coordinates, center will be set by that, and this option will be ignored.
zoom | {Number} The initial zoom level for the map. Only specify if <layers> is provided. Note that if an ArgParser/Permalink control is present, and the querystring contains a zoom level, zoom will be set by that, and this option will be ignored.
extent | {<OpenLayers.Bounds>|Array} The initial extent of the map. If provided as an array, the array should consist of four values (left, bottom, right, top). Only specify if center and zoom are not provided.

#### Examples

>     // create a map with default options in an element with the id "map1"
>     var map = new OpenLayers.Map("map1");

>     // create a map with non-default options in an element with id "map2"
>     var options = {
>         projection: "EPSG:3857",
>         maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000),
>         center: new OpenLayers.LonLat(-12356463.476333, 5621521.4854095)
>     };
>     var map = new OpenLayers.Map("map2", options);

>     // map with non-default options - same as above but with a single argument,
>     // a restricted extent, and using arrays for bounds and center
>     var map = new OpenLayers.Map({
>         div: "map_id",
>         projection: "EPSG:3857",
>         maxExtent: [-18924313.432222, -15538711.094146, 18924313.432222, 15538711.094146],
>         restrictedExtent: [-13358338.893333, -9608371.5085962, 13358338.893333, 9608371.5085962],
>         center: [-12356463.476333, 5621521.4854095]
>     });

>     // create a map without a reference to a container - call render later
>     var map = new OpenLayers.Map({
>         projection: "EPSG:3857",
>         maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000)
>     });

### unloadDestroy

Function that is called to destroy the map on page unload. stored here so that if map is manually destroyed, we can unregister this.

### updateSizeDestroy

When the map is destroyed, we need to stop listening to updateSize events: this method stores the function we need to unregister in non-IE browsers.

### setLayerZIndex

> setLayerZIndex: function ( | layer,
> | zIdx | )

#### Parameters

layer | {OpenLayers.Layer}
zIdx | {int}

### resetLayersZIndex

> resetLayersZIndex: function()

Reset each layer’s z-index based on layer’s array index

### addControlToMap

> addControlToMap: function ( | control,
> | px | )

#### Parameters

control | {OpenLayers.Control}
px | {OpenLayers.Pixel}

### getCurrentSize

> getCurrentSize: function()

#### Returns

{OpenLayers.Size} A new OpenLayers.Size object with the dimensions of the map div

### calculateBounds

> calculateBounds: function( | center,
> | resolution | )

#### Parameters

center | {OpenLayers.LonLat} Default is this.getCenter()
resolution | {float} Default is this.getResolution()

#### Returns

{OpenLayers.Bounds} A bounds based on resolution, center, and current mapsize.

### getCachedCenter

> getCachedCenter: function()

#### Returns

{OpenLayers.LonLat}

### moveByPx

> moveByPx: function( | dx,
> | dy | )

Drag the map by pixels.

#### Parameters

dx | {Number}
dy | {Number}

### adjustZoom

> adjustZoom: function( | zoom | )

#### Parameters

zoom | {Number} The zoom level to adjust

#### Returns

{Integer} Adjusted zoom level that shows a map not wider than its <baseLayer>’s maxExtent.

### moveTo

> moveTo: function( | lonlat,
> | zoom,
> | options | )

#### Parameters

lonlat | {OpenLayers.LonLat}
zoom | {Integer}
options | {Object}

### centerLayerContainer

> centerLayerContainer: function ( | lonlat | )

This function takes care to recenter the layerContainerDiv.

#### Parameters

lonlat | {OpenLayers.LonLat}

### isValidZoomLevel

> isValidZoomLevel: function( | zoomLevel | )

#### Parameters

zoomLevel | {Integer}

#### Returns

{Boolean} Whether or not the zoom level passed in is non-null and within the min/max range of zoom levels.

### isValidLonLat

> isValidLonLat: function( | lonlat | )

#### Parameters

lonlat | {OpenLayers.LonLat}

#### Returns

{Boolean} Whether or not the lonlat passed in is non-null and within the maxExtent bounds

### getLonLatFromViewPortPx

> getLonLatFromViewPortPx: function ( | viewPortPx | )

#### Parameters

viewPortPx | {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

#### Returns

{OpenLayers.LonLat} An OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the current base layer.

### getZoomTargetCenter

> getZoomTargetCenter: function ( | xy,
> | resolution | )

#### Parameters

xy | {OpenLayers.Pixel} The zoom origin pixel location on the screen
resolution | {Float} The resolution we want to get the center for

#### Returns

{OpenLayers.LonLat} The location of the map center after the transformation described by the origin xy and the target resolution.

### getGeodesicPixelSize

> getGeodesicPixelSize: function( | px | )

#### Parameters

px | {OpenLayers.Pixel} The pixel to get the geodesic length for. If not provided, the center pixel of the map viewport will be used.

#### Returns

{OpenLayers.Size} The geodesic size of the pixel in kilometers.

### getLonLatFromLayerPx

> getLonLatFromLayerPx: function ( | px | )

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{OpenLayers.LonLat}

### applyTransform

> applyTransform: function( | x,
> | y,
> | scale | )

Applies the given transform to the layerContainerDiv. This method has a 2-stage fallback from translate3d/scale3d via translate/scale to plain style.left/style.top, in which case no scaling is supported.

#### Parameters

x | {Number} x parameter for the translation. Defaults to the x value of the map’s layerContainerOriginPx
y | {Number} y parameter for the translation. Defaults to the y value of the map’s layerContainerOriginPx
scale | {Number} scale. Defaults to 1 if not provided.

### Constants

### TILE_WIDTH

{Integer} 256 Default tile width (unless otherwise specified)

### TILE_HEIGHT

{Integer} 256 Default tile height (unless otherwise specified)

## OpenLayers.Layer

Summary

Constants |
RESOLUTION_PROPERTIES | {Array} The properties that are used for calculating resolutions information.
Properties |
alpha | {Boolean} The layer’s images have an alpha channel.
inRange | {Boolean} The current map resolution is within the layer’s min/max range.
options | {Object} An optional object whose properties will be set on the layer.
metadata | {Object} This object can be used to store additional information on a layer object.
Functions |
OpenLayers.Layer |
destroy | Destroy is a destructor: this is to alleviate cyclic references which the Javascript garbage cleaner can not take care of on its own.
clone |
getOptions | Extracts an object from the layer with the properties that were set as options, but updates them with the values currently set on the instance.
moveTo |
moveByPx | Move the layer based on pixel vector.
setMap | Set the map property for the layer.
afterAdd | Called at the end of the map.addLayer sequence.
initResolutions | This method’s responsibility is to set up the ‘resolutions’ array for the layer -- this array is what the layer will use to interface between the zoom levels of the map and the resolution display of the layer.
resolutionsFromScales | Derive resolutions from scales.
calculateResolutions | Calculate resolutions based on the provided properties.
getDataExtent | Calculates the max extent which includes all of the data for the layer.
getZIndex | {Integer} the z-index of this layer
setZIndex |
adjustBounds | This function will take a bounds, and if wrapDateLine option is set on the layer, it will return a bounds which is wrapped around the world.

### Constants

### RESOLUTION_PROPERTIES

{Array} The properties that are used for calculating resolutions information.

### Properties

### alpha

{Boolean} The layer’s images have an alpha channel. Default is false.

### inRange

{Boolean} The current map resolution is within the layer’s min/max range. This is set in <OpenLayers.Map.setCenter> whenever the zoom changes.

### options

{Object} An optional object whose properties will be set on the layer. Any of the layer properties can be set as a property of the options object and sent to the constructor when the layer is created.

### metadata

{Object} This object can be used to store additional information on a layer object.

### Functions

### OpenLayers.Layer

#### Parameters

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

### destroy

> destroy: function( | setNewBaseLayer | )

Destroy is a destructor: this is to alleviate cyclic references which the Javascript garbage cleaner can not take care of on its own.

#### Parameters

setNewBaseLayer | {Boolean} Set a new base layer when this layer has been destroyed. Default is true.

### clone

> clone: function ( | obj | )

#### Parameters

obj | {OpenLayers.Layer} The layer to be cloned

#### Returns

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

### getOptions

> getOptions: function()

Extracts an object from the layer with the properties that were set as options, but updates them with the values currently set on the instance.

#### Returns

{Object} the options of the layer, representing the current state.

### moveTo

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

#### Parameters

bounds | {OpenLayers.Bounds}
zoomChanged | {Boolean} Tells when zoom has changed, as layers have to do some init work in that case.
dragging | {Boolean}

### moveByPx

> moveByPx: function( | dx,
> | dy | )

Move the layer based on pixel vector. To be implemented by subclasses.

#### Parameters

dx | {Number} The x coord of the displacement vector.
dy | {Number} The y coord of the displacement vector.

### setMap

> setMap: function( | map | )

Set the map property for the layer. This is done through an accessor so that subclasses can override this and take special action once they have their map variable set.

Here we take care to bring over any of the necessary default properties from the map.

#### Parameters

map | {OpenLayers.Map}

### afterAdd

> afterAdd: function()

Called at the end of the map.addLayer sequence. At this point, the map will have a base layer. To be overridden by subclasses.

### initResolutions

> initResolutions: function()

This method’s responsibility is to set up the ‘resolutions’ array for the layer -- this array is what the layer will use to interface between the zoom levels of the map and the resolution display of the layer.

The user has several options that determine how the array is set up.

For a detailed explanation, see the following wiki from the openlayers.org homepage: http://trac.openlayers.org/wiki/SettingZoomLevels

### resolutionsFromScales

> resolutionsFromScales: function( | scales | )

Derive resolutions from scales.

#### Parameters

scales | {Array(Number)} Scales

Returns {Array(Number)} Resolutions

### calculateResolutions

> calculateResolutions: function( | props | )

Calculate resolutions based on the provided properties.

#### Parameters

props | {Object} Properties

#### Returns

{Array({Number})} Array of resolutions.

### getDataExtent

> getDataExtent: function ()

Calculates the max extent which includes all of the data for the layer. This function is to be implemented by subclasses.

#### Returns

{OpenLayers.Bounds}

### getZIndex

> getZIndex: function ()

#### Returns

{Integer} the z-index of this layer

### setZIndex

> setZIndex: function ( | zIndex | )

#### Parameters

zIndex | {Integer}

### adjustBounds

> adjustBounds: function ( | bounds | )

This function will take a bounds, and if wrapDateLine option is set on the layer, it will return a bounds which is wrapped around the world. We do not wrap for bounds which cross the maxExtent.left/right, only bounds which are entirely to the left or entirely to the right.

#### Parameters

bounds | {OpenLayers.Bounds}

## OpenLayers.Layer.SphericalMercator

A mixin for layers that wraps up the pieces neccesary to have a coordinate conversion for working with commercial APIs which use a spherical mercator projection. Using this layer as a base layer, additional layers can be used as overlays if they are in the same projection.

A layer is given properties of this object by setting the sphericalMercator property to true.

#### More projection information

- http://spatialreference.org/ref/user/google-projection/

#### Proj4 Text

+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs

#### WKT

900913=PROJCS[“WGS84 / Simple Mercator”, GEOGCS[“WGS 84”, DATUM[“WGS_1984”, SPHEROID[“WGS_1984”, 6378137.0, 298.257223563]], PRIMEM[“Greenwich”, 0.0], UNIT[“degree”, 0.017453292519943295], AXIS[“Longitude”, EAST], AXIS[“Latitude”, NORTH]], PROJECTION[“Mercator_1SP_Google”], PARAMETER[“latitude_of_origin”, 0.0], PARAMETER[“central_meridian”, 0.0], PARAMETER[“scale_factor”, 1.0], PARAMETER[“false_easting”, 0.0], PARAMETER[“false_northing”, 0.0], UNIT[“m”, 1.0], AXIS[“x”, EAST], AXIS[“y”, NORTH], AUTHORITY[“EPSG”,”900913”]]

Summary

Functions |
getExtent | Get the map’s extent.
getLonLatFromViewPortPx | Get a map location from a pixel location
getViewPortPxFromLonLat | Get a pixel location from a map location
initMercatorParameters | Set up the mercator parameters on the layer: resolutions, projection, units.

### Functions

### getExtent

> getExtent: function()

Get the map’s extent.

#### Returns

{OpenLayers.Bounds} The map extent.

### getLonLatFromViewPortPx

> getLonLatFromViewPortPx: function ( | viewPortPx | )

Get a map location from a pixel location

#### Parameters

viewPortPx | {OpenLayers.Pixel}

#### Returns

{OpenLayers.LonLat} An OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by map lib If the map lib is not loaded or not centered, returns null

### getViewPortPxFromLonLat

> getViewPortPxFromLonLat: function ( | lonlat | )

Get a pixel location from a map location

#### Parameters

lonlat | {OpenLayers.LonLat}

#### Returns

{OpenLayers.Pixel} An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels by map lib If map lib is not loaded or not centered, returns null

### initMercatorParameters

> initMercatorParameters: function()

Set up the mercator parameters on the layer: resolutions, projection, units.

## OpenLayers.Layer.EventPane

Base class for 3rd party layers, providing a DOM element which isolates the 3rd-party layer from mouse events. Only used by Google layers.

Automatically instantiated by the Google constructor, and not usually instantiated directly.

Create a new event pane layer with the OpenLayers.Layer.EventPane constructor.

#### Inherits from

- OpenLayers.Layer

Summary

Properties |
isBaseLayer | {Boolean} EventPaned layers are always base layers, by necessity.
pane | {DOMElement} A reference to the element that controls the events.
mapObject | {Object} This is the object which will be used to load the 3rd party library in the case of the google layer, this will be of type GMap, in the case of the ve layer, this will be of type VEMap
Functions |
OpenLayers.Layer.EventPane | Create a new event pane layer
setMap | Set the map property for the layer.
loadWarningMessage | If we can’t load the map lib, then display an error message to the user and tell them where to go for help.
getWarningHTML | To be implemented by subclasses.
display | Set the display on the pane
setZIndex | Set the z-index order for the pane.
moveByPx | Move the layer based on pixel vector.
moveTo | Handle calls to move the layer.
getLonLatFromViewPortPx | Get a map location from a pixel location
getViewPortPxFromLonLat | Get a pixel location from a map location
getOLLonLatFromMapObjectLonLat | Get an OL style map location from a 3rd party style map location
getMapObjectLonLatFromOLLonLat | Get a 3rd party map location from an OL map location.
getOLPixelFromMapObjectPixel | Get an OL pixel location from a 3rd party pixel location.
getMapObjectPixelFromOLPixel | Get a 3rd party pixel location from an OL pixel location

### Properties

### isBaseLayer

{Boolean} EventPaned layers are always base layers, by necessity.

### pane

{DOMElement} A reference to the element that controls the events.

### mapObject

{Object} This is the object which will be used to load the 3rd party library in the case of the google layer, this will be of type GMap, in the case of the ve layer, this will be of type VEMap

### Functions

### OpenLayers.Layer.EventPane

Create a new event pane layer

#### Parameters

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

### setMap

> setMap: function( | map | )

Set the map property for the layer. This is done through an accessor so that subclasses can override this and take special action once they have their map variable set.

#### Parameters

map | {OpenLayers.Map}

### loadWarningMessage

> loadWarningMessage:function()

If we can’t load the map lib, then display an error message to the user and tell them where to go for help.

This function sets up the layout for the warning message. Each 3rd party layer must implement its own getWarningHTML() function to provide the actual warning message.

### getWarningHTML

> getWarningHTML:function()

To be implemented by subclasses.

#### Returns

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

### display

> display: function( | display | )

Set the display on the pane

#### Parameters

display | {Boolean}

### setZIndex

> setZIndex: function ( | zIndex | )

Set the z-index order for the pane.

#### Parameters

zIndex | {int}

### moveByPx

> moveByPx: function( | dx,
> | dy | )

Move the layer based on pixel vector. To be implemented by subclasses.

#### Parameters

dx | {Number} The x coord of the displacement vector.
dy | {Number} The y coord of the displacement vector.

### moveTo

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

Handle calls to move the layer.

#### Parameters

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

### getLonLatFromViewPortPx

> getLonLatFromViewPortPx: function ( | viewPortPx | )

Get a map location from a pixel location

#### Parameters

viewPortPx | {OpenLayers.Pixel}

#### Returns

{OpenLayers.LonLat} An OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by map lib If the map lib is not loaded or not centered, returns null

### getViewPortPxFromLonLat

> getViewPortPxFromLonLat: function ( | lonlat | )

Get a pixel location from a map location

#### Parameters

lonlat | {OpenLayers.LonLat}

#### Returns

{OpenLayers.Pixel} An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels by map lib If map lib is not loaded or not centered, returns null

### getOLLonLatFromMapObjectLonLat

> getOLLonLatFromMapObjectLonLat: function( | moLonLat | )

Get an OL style map location from a 3rd party style map location

Parameters moLonLat - {Object}

#### Returns

{OpenLayers.LonLat} An OpenLayers.LonLat, translated from the passed in MapObject LonLat Returns null if null value is passed in

### getMapObjectLonLatFromOLLonLat

> getMapObjectLonLatFromOLLonLat: function( | olLonLat | )

Get a 3rd party map location from an OL map location.

#### Parameters

olLonLat | {OpenLayers.LonLat}

#### Returns

{Object} A MapObject LonLat, translated from the passed in OpenLayers.LonLat Returns null if null value is passed in

### getOLPixelFromMapObjectPixel

> getOLPixelFromMapObjectPixel: function( | moPixel | )

Get an OL pixel location from a 3rd party pixel location.

#### Parameters

moPixel | {Object}

#### Returns

{OpenLayers.Pixel} An OpenLayers.Pixel, translated from the passed in MapObject Pixel Returns null if null value is passed in

### getMapObjectPixelFromOLPixel

> getMapObjectPixelFromOLPixel: function( | olPixel | )

Get a 3rd party pixel location from an OL pixel location

#### Parameters

olPixel | {OpenLayers.Pixel}

#### Returns

{Object} A MapObject Pixel, translated from the passed in OpenLayers.Pixel Returns null if null value is passed in

## OpenLayers.Layer.FixedZoomLevels

Some Layers will already have established zoom levels (like google or ve). Instead of trying to determine them and populate a resolutions[] Array with those values, we will hijack the resolution functionality here.

#### When you subclass FixedZoomLevels

The initResolutions() call gets nullified, meaning no resolutions[] array is set up. Which would be a big problem getResolution() in Layer, since it merely takes map.zoom and indexes into resolutions[]... but....

The getResolution() call is also overridden. Instead of using the resolutions[] array, we simply calculate the current resolution based on the current extent and the current map size. But how will we be able to calculate the current extent without knowing the resolution...?

The getExtent() function is also overridden. Instead of calculating extent based on the center point and the current resolution, we instead calculate the extent by getting the lonlats at the top-left and bottom-right by using the getLonLatFromViewPortPx() translation function, taken from the pixel locations (0,0) and the size of the map. But how will we be able to do lonlat-px translation without resolution....?

The getZoomForResolution() method is overridden. Instead of indexing into the resolutions[] array, we call OpenLayers.Layer.getExent(), passing in the desired resolution. With this extent, we then call getZoomForExtent()

Whenever you implement a layer using OpenLayers.Layer.FixedZoomLevels, it is your responsibility to provide the following three functions:

- getLonLatFromViewPortPx
- getViewPortPxFromLonLat
- getZoomForExtent

...those three functions should generally be provided by any reasonable API that you might be working from.

Summary

Functions |
OpenLayers.Layer.FixedZoomLevels | Create a new fixed zoom levels layer.
initResolutions | Populate the resolutions array
getZoomForResolution | Get the zoom level for a given resolution
getOLZoomFromMapObjectZoom | Get the OL zoom index from the map object zoom level
getMapObjectZoomFromOLZoom | Get the map object zoom level from the OL zoom level

### Functions

### OpenLayers.Layer.FixedZoomLevels

Create a new fixed zoom levels layer.

### initResolutions

> initResolutions: function()

Populate the resolutions array

### getZoomForResolution

> getZoomForResolution: function( | resolution | )

Get the zoom level for a given resolution

#### Parameters

resolution | {Float}

#### Returns

{Integer} A suitable zoom level for the specified resolution. If no baselayer is set, returns null.

### getOLZoomFromMapObjectZoom

> getOLZoomFromMapObjectZoom: function( | moZoom | )

Get the OL zoom index from the map object zoom level

#### Parameters

moZoom | {Integer}

#### Returns

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

### getMapObjectZoomFromOLZoom

> getMapObjectZoomFromOLZoom: function( | olZoom | )

Get the map object zoom level from the OL zoom level

#### Parameters

olZoom | {Integer}

#### Returns

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

## OpenLayers.Layer.Google

Provides a wrapper for Google’s Maps API Normally the Terms of Use for this API do not allow wrapping, but Google have provided written consent to OpenLayers for this - see email in http://osgeo-org.1560.n6.nabble.com/Google-Maps-API-Terms-of-Use-changes-tp4910013p4911981.html

#### Inherits from

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

Summary

Constants |
MIN_ZOOM_LEVEL | {Integer} 0
MAX_ZOOM_LEVEL | {Integer} 21
RESOLUTIONS | {Array(Float)} Hardcode these resolutions so that they are more closely tied with the standard wms projection
Properties |
version | {Number} The version of the Google Maps API
Functions |
OpenLayers.Layer.Google |
clone | Create a clone of this layer
moveTo |
removeGMapElements | Remove all elements added to the dom.
Properties |
OpenLayers.Layer.Google.cache | {Object} Cache for elements that should only be created once per map.
Constants |
OpenLayers.Layer.Google.v2 | Mixin providing functionality specific to the Google Maps API v2.
Properties |
termsOfUse | {DOMElement} Div for Google’s copyright and terms of use link
poweredBy | {DOMElement} Div for Google’s powered by logo and link
dragObject | {GDraggableObject} Since 2.93, Google has exposed the ability to get the maps GDraggableObject.
Functions |
loadMapObject | Load the GMap and register appropriate event listeners.
setGMapVisibility | Display the GMap container and associated elements.
getMapContainer | {DOMElement} the GMap container’s div

### Constants

### MIN_ZOOM_LEVEL

{Integer} 0

### MAX_ZOOM_LEVEL

{Integer} 21

### RESOLUTIONS

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

### Properties

### version

{Number} The version of the Google Maps API

### Functions

### OpenLayers.Layer.Google

#### Parameters

name | {String} A name for the layer.
options | {Object} An optional object whose properties will be set on the layer.

### clone

> clone: function()

Create a clone of this layer

#### Returns

{OpenLayers.Layer.Google} An exact clone of this layer

### moveTo

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

#### Parameters

bounds | {OpenLayers.Bounds}
zoomChanged | {Boolean} Tells when zoom has changed, as layers have to do some init work in that case.
dragging | {Boolean}

### removeGMapElements

> removeGMapElements: function()

Remove all elements added to the dom. This should only be called if this is the last of the Google layers for the given map.

### Properties

### OpenLayers.Layer.Google.cache

{Object} Cache for elements that should only be created once per map.

### Constants

### OpenLayers.Layer.Google.v2

Mixin providing functionality specific to the Google Maps API v2.

This API has been deprecated by Google. Developers are encouraged to migrate to v3 of the API; support for this is provided by OpenLayers.Layer.Google.v3

### Properties

### termsOfUse

{DOMElement} Div for Google’s copyright and terms of use link

### poweredBy

{DOMElement} Div for Google’s powered by logo and link

### dragObject

{GDraggableObject} Since 2.93, Google has exposed the ability to get the maps GDraggableObject. We can now use this for smooth panning

### Functions

### loadMapObject

> loadMapObject:function()

Load the GMap and register appropriate event listeners. If we can’t load GMap2, then display a warning message.

### setGMapVisibility

> setGMapVisibility: function( | visible | )

Display the GMap container and associated elements.

#### Parameters

visible | {Boolean} Display the GMap elements.

### getMapContainer

> getMapContainer: function()

#### Returns

{DOMElement} the GMap container’s div

## OpenLayers.Format

Base class for format reading/writing a variety of formats. Subclasses of OpenLayers.Format are expected to have read and write methods.

Summary

Properties |
options | {Object} A reference to options passed to the constructor.
Functions |
OpenLayers.Format | Instances of this class are not useful.
read | Read data from a string, and return an object whose type depends on the subclass.
write | Accept an object, and return a string.

### Properties

### options

{Object} A reference to options passed to the constructor.

### Functions

### OpenLayers.Format

Instances of this class are not useful. See one of the subclasses.

#### Parameters

options | {Object} An optional object with properties to set on the format

#### Valid options

keepData | {Boolean} If true, upon read, the data property will be set to the parsed object (e.g. the json or xml object).

#### Returns

An instance of OpenLayers.Format

### read

> read: function( | data | )

Read data from a string, and return an object whose type depends on the subclass.

#### Parameters

data | {string} Data to read/parse.

#### Returns

Depends on the subclass

### write

> write: function( | object | )

Accept an object, and return a string.

#### Parameters

object | {Object} Object to be serialized

#### Returns

{String} A string representation of the object.

## OpenLayers.Format.XML

Read and write XML. For cross-browser XML generation, use methods on an instance of the XML format class instead of on <code>document<end>. The DOM creation and traversing methods exposed here all mimic the W3C XML DOM methods. Create a new parser with the OpenLayers.Format.XML constructor.

#### Inherits from

- OpenLayers.Format

Summary

Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
namespaceAlias | {Object} Mapping of namespace URI to namespace alias.
defaultPrefix | {String} The default namespace alias for creating element nodes.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
xmldom | {XMLDom} If this browser uses ActiveX, this will be set to a XMLDOM object.
OpenLayers.Format.XML | Construct an XML parser.
setNamespace | Set a namespace alias and URI for the format.
createElementNSPlus | Shorthand for creating namespaced elements with optional attributes and child text nodes.
setAttributes | Set multiple attributes given key value pairs from an object.
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readChildNodes | Shorthand for applying the named readers to all children of a node.
writeNode | Shorthand for applying one of the named writers and appending the results to a node.
getThisOrNextEl | Return this node or the next element node.
getXMLDoc | Get an XML document for nodes that are not supported in HTML (e.g.
OpenLayers.Format.XML.document | {XMLDocument} XML document to reuse for creating non-HTML compliant nodes, like document.createCDATASection.
OpenLayers.Format.WFST | Used to create a versioned WFS protocol.
Constants |
OpenLayers.Format.WFST.DEFAULTS | {Object} Default properties for the WFST format.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs. Properties of this object should not be set individually. Read-only. All XML subclasses should have their own namespaces object. Use setNamespace to add or set a namespace alias after construction.

### namespaceAlias

{Object} Mapping of namespace URI to namespace alias. This object is read-only. Use setNamespace to add or set a namespace alias.

### defaultPrefix

{String} The default namespace alias for creating element nodes.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### xmldom

{XMLDom} If this browser uses ActiveX, this will be set to a XMLDOM object. It is not intended to be a browser sniffing property. Instead, the xmldom property is used instead of <code>document<end> where namespaced node creation methods are not supported. In all other browsers, this remains null.

### OpenLayers.Format.XML

Construct an XML parser. The parser is used to read and write XML. Reading XML from a string returns a DOM element. Writing XML from a DOM element returns a string.

#### Parameters

options | {Object} Optional object whose properties will be set on the object.

### setNamespace

> setNamespace: function( | alias,
> | uri | )

Set a namespace alias and URI for the format.

#### Parameters

alias | {String} The namespace alias (prefix).
uri | {String} The namespace URI.

### createElementNSPlus

> createElementNSPlus: function( | name,
> | options | )

Shorthand for creating namespaced elements with optional attributes and child text nodes.

#### Parameters

name | {String} The qualified node name.
options | {Object} Optional object for node configuration.

#### Valid options

uri | {String} Optional namespace uri for the element - supply a prefix instead if the namespace uri is a property of the format’s namespace object.
attributes | {Object} Optional attributes to be set using the setAttributes method.
value | {String} Optional text to be appended as a text node.

#### Returns

{Element} An element node.

### setAttributes

> setAttributes: function( | node,
> | obj | )

Set multiple attributes given key value pairs from an object.

#### Parameters

node | {Element} An element node.
obj | {Object || Array} An object whose properties represent attribute names and values represent attribute values. If an attribute name is a qualified name (“prefix:local”), the prefix will be looked up in the parsers {namespaces} object. If the prefix is found, setAttributeNS will be used instead of setAttribute.

### readNode

> readNode: function( | node,
> | obj | )

Shorthand for applying one of the named readers given the node namespace and local name. Readers take two args (node, obj) and generally extend or modify the second.

#### Parameters

node | {DOMElement} The node to be read (required).
obj | {Object} The object to be modified (optional).

#### Returns

{Object} The input object, modified (or a new one if none was provided).

### readChildNodes

> readChildNodes: function( | node,
> | obj | )

Shorthand for applying the named readers to all children of a node. For each child of type 1 (element), <readSelf> is called.

#### Parameters

node | {DOMElement} The node to be read (required).
obj | {Object} The object to be modified (optional).

#### Returns

{Object} The input object, modified.

### writeNode

> writeNode: function( | name,
> | obj,
> | parent | )

Shorthand for applying one of the named writers and appending the results to a node. If a qualified name is not provided for the second argument (and a local name is used instead), the namespace of the parent node will be assumed.

#### Parameters

name | {String} The name of a node to generate. If a qualified name (e.g. “pre:Name”) is used, the namespace prefix is assumed to be in the writers group. If a local name is used (e.g. “Name”) then the namespace of the parent is assumed. If a local name is used and no parent is supplied, then the default namespace is assumed.
obj | {Object} Structure containing data for the writer.
parent | {DOMElement} Result will be appended to this node. If no parent is supplied, the node will not be appended to anything.

#### Returns

{DOMElement} The child node.

### getThisOrNextEl

> getThisOrNextEl: function( | node,
> | name,
> | uri | )

Return this node or the next element node. Optionally get the first sibling with the given local name or namespace URI.

#### Parameters

node | {DOMElement} The node.
name | {String} Optional local name of the sibling to search for.
uri | {String} Optional namespace URI of the sibling to search for.

#### Returns

{DOMElement} The next sibling element. Returns null if no element is found, something significant besides an element is found, or the found element does not match the query.

### getXMLDoc

> getXMLDoc: function()

Get an XML document for nodes that are not supported in HTML (e.g. createCDATASection). On IE, this will either return an existing or create a new xmldom on the instance. On other browsers, this will either return an existing or create a new shared document (see <OpenLayers.Format.XML.document>).

#### Returns

{XMLDocument}

### OpenLayers.Format.XML.document

{XMLDocument} XML document to reuse for creating non-HTML compliant nodes, like document.createCDATASection.

### OpenLayers.Format.WFST

> OpenLayers.Format.WFST = function( | options | )

Used to create a versioned WFS protocol. Default version is 1.0.0.

#### Returns

{OpenLayers.Format} A WFST format of the given version.

### Constants

### OpenLayers.Format.WFST.DEFAULTS

{Object} Default properties for the WFST format.

## OpenLayers.Feature

Features are combinations of geography and attributes. The OpenLayers.Feature class specifically combines a marker and a lonlat.

Summary

Properties |
layer | {OpenLayers.Layer}
id | {String}
lonlat | {OpenLayers.LonLat}
data | {Object}
marker | {OpenLayers.Marker}
popup | {OpenLayers.Popup}
Functions |
OpenLayers.Feature | Constructor for features.
destroy | nullify references to prevent circular references and memory leaks
onScreen | {Boolean} Whether or not the feature is currently visible on screen (based on its ‘lonlat’ property)
createMarker | Based on the data associated with the Feature, create and return a marker object.
destroyMarker | Destroys marker.
createPopup | Creates a popup object created from the ‘lonlat’, ‘popupSize’, and ‘popupContentHTML’ properties set in this.data.
destroyPopup | Destroys the popup created via createPopup.

### Properties

### layer

{OpenLayers.Layer}

### id

{String}

### lonlat

{OpenLayers.LonLat}

### data

{Object}

### marker

{OpenLayers.Marker}

### popup

{OpenLayers.Popup}

### Functions

### OpenLayers.Feature

Constructor for features.

#### Parameters

layer | {OpenLayers.Layer}
lonlat | {OpenLayers.LonLat}
data | {Object}

#### Returns

{OpenLayers.Feature}

### destroy

> destroy: function()

nullify references to prevent circular references and memory leaks

### onScreen

> onScreen:function()

#### Returns

{Boolean} Whether or not the feature is currently visible on screen (based on its ‘lonlat’ property)

### createMarker

> createMarker: function()

Based on the data associated with the Feature, create and return a marker object.

#### Returns

{OpenLayers.Marker} A Marker Object created from the ‘lonlat’ and ‘icon’ properties set in this.data. If no ‘lonlat’ is set, returns null. If no ‘icon’ is set, OpenLayers.Marker() will load the default image.

Note | this.marker is set to return value

### destroyMarker

> destroyMarker: function()

Destroys marker. If user overrides the createMarker() function, s/he should be able to also specify an alternative function for destroying it

### createPopup

> createPopup: function( | closeBox | )

Creates a popup object created from the ‘lonlat’, ‘popupSize’, and ‘popupContentHTML’ properties set in this.data. It uses this.marker.icon as default anchor.

If no ‘lonlat’ is set, returns null. If no this.marker has been created, no anchor is sent.

Note | the returned popup object is ‘owned’ by the feature, so you cannot use the popup’s destroy method to discard the popup. Instead, you must use the feature’s destroyPopup
Note | this.popup is set to return value

#### Parameters

closeBox | {Boolean} create popup with closebox or not

#### Returns

{OpenLayers.Popup} Returns the created popup, which is also set as ‘popup’ property of this feature. Will be of whatever type specified by this feature’s ‘popupClass’ property, but must be of type OpenLayers.Popup.

### destroyPopup

> destroyPopup: function()

Destroys the popup created via createPopup.

As with the marker, if user overrides the createPopup() function, s/he should also be able to override the destruction

## OpenLayers.Feature.Vector

Vector features use the OpenLayers.Geometry classes as geometry description. They have an ‘attributes’ property, which is the data object, and a ‘style’ property, the default values of which are defined in the OpenLayers.Feature.Vector.style objects.

#### Inherits from

- OpenLayers.Feature

Summary

Properties |
fid | {String}
bounds | {OpenLayers.Bounds} The box bounding that feature’s geometry, that property can be set by an OpenLayers.Format object when deserializing the feature, so in most cases it represents an information set by the server.
state | {String}
renderIntent | {String} rendering intent currently being used
Functions |
OpenLayers.Feature.Vector | Create a vector feature.
destroy | nullify references to prevent circular references and memory leaks
clone | Create a clone of this vector feature.
onScreen | Determine whether the feature is within the map viewport.
getVisibility | Determine whether the feature is displayed or not.
createMarker |
destroyMarker |
createPopup |
atPoint | Determins whether the feature intersects with the specified location.
destroyPopup |
move | Moves the feature and redraws it at its new location
toState | Sets the new state
Constants |
OpenLayers.Feature.Vector.style | OpenLayers features can have a number of style attributes.

### Properties

### fid

{String}

### bounds

{OpenLayers.Bounds} The box bounding that feature’s geometry, that property can be set by an OpenLayers.Format object when deserializing the feature, so in most cases it represents an information set by the server.

### state

{String}

### renderIntent

{String} rendering intent currently being used

### Functions

### OpenLayers.Feature.Vector

Create a vector feature.

#### Parameters

geometry | {OpenLayers.Geometry} The geometry that this feature represents.
attributes | {Object} An optional object that will be mapped to the <attributes> property.
style | {Object} An optional style object.

### destroy

> destroy: function()

nullify references to prevent circular references and memory leaks

### clone

> clone: function ()

Create a clone of this vector feature. Does not set any non-standard properties.

#### Returns

{OpenLayers.Feature.Vector} An exact clone of this vector feature.

### onScreen

> onScreen:function( | boundsOnly | )

Determine whether the feature is within the map viewport. This method tests for an intersection between the geometry and the viewport bounds. If a more effecient but less precise geometry bounds intersection is desired, call the method with the boundsOnly parameter true.

#### Parameters

boundsOnly | {Boolean} Only test whether a feature’s bounds intersects the viewport bounds. Default is false. If false, the feature’s geometry must intersect the viewport for onScreen to return true.

#### Returns

{Boolean} The feature is currently visible on screen (optionally based on its bounds if boundsOnly is true).

### getVisibility

> getVisibility: function()

Determine whether the feature is displayed or not. It may not displayed because:

- its style display property is set to ‘none’,
- it doesn’t belong to any layer,
- the styleMap creates a symbolizer with display property set to ‘none’ for it,
- the layer which it belongs to is not visible.

#### Returns

{Boolean} The feature is currently displayed.

### createMarker

> createMarker: function()

HACK | we need to decide if all vector features should be able to create markers

#### Returns

{OpenLayers.Marker} For now just returns null

### destroyMarker

> destroyMarker: function()

HACK | we need to decide if all vector features should be able to delete markers

If user overrides the createMarker() function, s/he should be able to also specify an alternative function for destroying it

### createPopup

> createPopup: function()

HACK | we need to decide if all vector features should be able to create popups

#### Returns

{OpenLayers.Popup} For now just returns null

### atPoint

> atPoint: function( | lonlat,
> | toleranceLon,
> | toleranceLat | )

Determins whether the feature intersects with the specified location.

#### Parameters

lonlat | {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an object with a ‘lon’ and ‘lat’ properties.
toleranceLon | {float} Optional tolerance in Geometric Coords
toleranceLat | {float} Optional tolerance in Geographic Coords

#### Returns

{Boolean} Whether or not the feature is at the specified location

### destroyPopup

> destroyPopup: function()

HACK | we need to decide if all vector features should be able to delete popups

### move

> move: function( | location | )

Moves the feature and redraws it at its new location

#### Parameters

location | {OpenLayers.LonLat or OpenLayers.Pixel} the location to which to move the feature.

### toState

> toState: function( | state | )

Sets the new state

#### Parameters

state | {String}

### Constants

### OpenLayers.Feature.Vector.style

OpenLayers features can have a number of style attributes. The ‘default’ style will typically be used if no other style is specified. These styles correspond for the most part, to the styling properties defined by the SVG standard. Information on fill properties: http://www.w3.org/TR/SVG/painting.html#FillProperties Information on stroke properties: http://www.w3.org/TR/SVG/painting.html#StrokeProperties

#### Symbolizer properties

fill | {Boolean} Set to false if no fill is desired.
fillColor | {String} Hex fill color. Default is “#ee9900”.
fillOpacity | {Number} Fill opacity (0-1). Default is 0.4
stroke | {Boolean} Set to false if no stroke is desired.
strokeColor | {String} Hex stroke color. Default is “#ee9900”.
strokeOpacity | {Number} Stroke opacity (0-1). Default is 1.
strokeWidth | {Number} Pixel stroke width. Default is 1.
strokeLinecap | {String} Stroke cap type. Default is “round”. [butt | round | square]
strokeDashstyle | {String} Stroke dash style. Default is “solid”. [dot | dash | dashdot | longdash | longdashdot | solid]
graphic | {Boolean} Set to false if no graphic is desired.
pointRadius | {Number} Pixel point radius. Default is 6.
pointerEvents | {String} Default is “visiblePainted”.
cursor | {String} Default is “”.
externalGraphic | {String} Url to an external graphic that will be used for rendering points.
graphicWidth | {Number} Pixel width for sizing an external graphic.
graphicHeight | {Number} Pixel height for sizing an external graphic.
graphicOpacity | {Number} Opacity (0-1) for an external graphic.
graphicXOffset | {Number} Pixel offset along the positive x axis for displacing an external graphic.
graphicYOffset | {Number} Pixel offset along the positive y axis for displacing an external graphic.
rotation | {Number} For point symbolizers, this is the rotation of a graphic in the clockwise direction about its center point (or any point off center as specified by graphicXOffset and graphicYOffset).
graphicZIndex | {Number} The integer z-index value to use in rendering.
graphicName | {String} Named graphic to use when rendering points. Supported values include “circle” (default), “square”, “star”, “x”, “cross”, “triangle”.
graphicTitle | {String} Tooltip when hovering over a feature. deprecated, use title instead
title | {String} Tooltip when hovering over a feature. Not supported by the canvas renderer.
backgroundGraphic | {String} Url to a graphic to be used as the background under an externalGraphic.
backgroundGraphicZIndex | {Number} The integer z-index value to use in rendering the background graphic.
backgroundXOffset | {Number} The x offset (in pixels) for the background graphic.
backgroundYOffset | {Number} The y offset (in pixels) for the background graphic.
backgroundHeight | {Number} The height of the background graphic. If not provided, the graphicHeight will be used.
backgroundWidth | {Number} The width of the background width. If not provided, the graphicWidth will be used.
label | {String} The text for an optional label. For browsers that use the canvas renderer, this requires either fillText or mozDrawText to be available.
labelAlign | {String} Label alignment. This specifies the insertion point relative to the text. It is a string composed of two characters. The first character is for the horizontal alignment, the second for the vertical alignment. Valid values for horizontal alignment: “l”=left, “c”=center, “r”=right. Valid values for vertical alignment: “t”=top, “m”=middle, “b”=bottom. Example values: “lt”, “cm”, “rb”. Default is “cm”.
labelXOffset | {Number} Pixel offset along the positive x axis for displacing the label. Not supported by the canvas renderer.
labelYOffset | {Number} Pixel offset along the positive y axis for displacing the label. Not supported by the canvas renderer.
labelSelect | {Boolean} If set to true, labels will be selectable using SelectFeature or similar controls. Default is false.
labelOutlineColor | {String} The color of the label outline. Default is ‘white’. Only supported by the canvas & SVG renderers.
labelOutlineWidth | {Number} The width of the label outline. Default is 3, set to 0 or null to disable. Only supported by the SVG renderers.
labelOutlineOpacity | {Number} The opacity (0-1) of the label outline. Default is fontOpacity. Only supported by the canvas & SVG renderers.
fontColor | {String} The font color for the label, to be provided like CSS.
fontOpacity | {Number} Opacity (0-1) for the label
fontFamily | {String} The font family for the label, to be provided like in CSS.
fontSize | {String} The font size for the label, to be provided like in CSS.
fontStyle | {String} The font style for the label, to be provided like in CSS.
fontWeight | {String} The font weight for the label, to be provided like in CSS.
display | {String} Symbolizers will have no effect if display is set to “none”. All other values have no effect.

## OpenLayers.Style

This class represents a UserStyle obtained from a SLD, containing styling rules.

Summary

Properties |
id | {String} A unique id for this session.
title | {String} Title of this style (set if included in SLD)
description | {String} Description of this style (set if abstract is included in SLD)
rules | {Array(OpenLayers.Rule)}
defaultStyle | {Object} hash of style properties to use as default for merging rule-based style symbolizers onto.
defaultsPerSymbolizer | {Boolean} If set to true, the defaultStyle will extend the symbolizer of every rule.
propertyStyles | {Hash of Boolean} cache of style properties that need to be parsed for propertyNames.
Functions |
OpenLayers.Style | Creates a UserStyle.
createSymbolizer | creates a style by applying all feature-dependent rules to the base style.
applySymbolizer |
createLiterals | creates literals for all style properties that have an entry in <this.propertyStyles>.
findPropertyStyles | Looks into all rules for this style and the defaultStyle to collect all the style hash property names containing ${...}
addPropertyStyles |
getSymbolizerPrefix | Returns the correct symbolizer prefix according to the geometry type of the passed geometry
createLiteral | converts a style value holding a combination of PropertyName and Literal into a Literal, taking the property values from the passed features.
Constants |
OpenLayers.Style.SYMBOLIZER_PREFIXES | {Array} prefixes of the sld symbolizers.

### Properties

### id

{String} A unique id for this session.

### title

{String} Title of this style (set if included in SLD)

### description

{String} Description of this style (set if abstract is included in SLD)

### rules

{Array(OpenLayers.Rule)}

### defaultStyle

{Object} hash of style properties to use as default for merging rule-based style symbolizers onto. If no rules are defined, createSymbolizer will return this style. If defaultsPerSymbolizer is set to true, the defaultStyle will only be taken into account if there are rules defined.

### defaultsPerSymbolizer

{Boolean} If set to true, the defaultStyle will extend the symbolizer of every rule. Properties of the defaultStyle will also be used to set missing symbolizer properties if the symbolizer has stroke, fill or graphic set to true. Default is false.

### propertyStyles

{Hash of Boolean} cache of style properties that need to be parsed for propertyNames. Property names are keys, values won’t be used.

### Functions

### OpenLayers.Style

Creates a UserStyle.

#### Parameters

style | {Object} Optional hash of style properties that will be used as default style for this style object. This style applies if no rules are specified. Symbolizers defined in rules will extend this default style.
options | {Object} An optional object with properties to set on the style.

#### Valid options

rules | {Array(OpenLayers.Rule)} List of rules to be added to the style.

#### Returns

{OpenLayers.Style}

### createSymbolizer

> createSymbolizer: function( | feature | )

creates a style by applying all feature-dependent rules to the base style.

#### Parameters

feature | {OpenLayers.Feature} feature to evaluate rules for

#### Returns

{Object} symbolizer hash

### applySymbolizer

> applySymbolizer: function( | rule,
> | style,
> | feature | )

#### Parameters

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

#### Returns

{Object} A style with new symbolizer applied.

### createLiterals

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

creates literals for all style properties that have an entry in <this.propertyStyles>.

#### Parameters

style | {Object} style to create literals for. Will be modified inline.
feature | {Object}

#### Returns

{Object} the modified style

### findPropertyStyles

> findPropertyStyles: function()

Looks into all rules for this style and the defaultStyle to collect all the style hash property names containing ${...} strings that have to be replaced using the createLiteral method before returning them.

#### Returns

{Object} hash of property names that need createLiteral parsing. The name of the property is the key, and the value is true;

### addPropertyStyles

> addPropertyStyles: function( | propertyStyles,
> | symbolizer | )

#### Parameters

propertyStyles | {Object} hash to add new property styles to. Will be modified inline
symbolizer | {Object} search this symbolizer for property styles

#### Returns

{Object} propertyStyles hash

### getSymbolizerPrefix

> getSymbolizerPrefix: function( | geometry | )

Returns the correct symbolizer prefix according to the geometry type of the passed geometry

#### Parameters

geometry | {OpenLayers.Geometry}

#### Returns

{String} key of the according symbolizer

### createLiteral

> OpenLayers.Style.createLiteral = function( | value,
> | context,
> | feature,
> | property | )

converts a style value holding a combination of PropertyName and Literal into a Literal, taking the property values from the passed features.

#### Parameters

value | {String} value to parse. If this string contains a construct like “foo ${bar}”, then “foo “ will be taken as literal, and “${bar}” will be replaced by the value of the “bar” attribute of the passed feature.
context | {Object} context to take attribute values from
feature | {OpenLayers.Feature.Vector} optional feature to pass to <OpenLayers.String.format> for evaluating functions in the context.
property | {String} optional, name of the property for which the literal is being created for evaluating functions in the context.

#### Returns

{String} the parsed value. In the example of the value parameter above, the result would be “foo valueOfBar”, assuming that the passed feature has an attribute named “bar” with the value “valueOfBar”.

### Constants

### OpenLayers.Style.SYMBOLIZER_PREFIXES

{Array} prefixes of the sld symbolizers. These are the same as the main geometry types

## OpenLayers.Filter

This class represents an OGC Filter.

Summary

Functions |
OpenLayers.Filter | This class represents a generic filter.

### Functions

### OpenLayers.Filter

This class represents a generic filter.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Returns

{OpenLayers.Filter}

## OpenLayers.Filter.Spatial

This class represents a spatial filter. Currently implemented: BBOX, DWithin and Intersects

#### Inherits from

- OpenLayers.Filter

Summary

Functions |
OpenLayers.Filter.Spatial | Creates a spatial filter.
evaluate | Evaluates this filter for a specific feature.

### Functions

### OpenLayers.Filter.Spatial

Creates a spatial filter.

#### Parameters

options | {Object} An optional object with properties to set on the filter.

#### Returns

{OpenLayers.Filter.Spatial}

### evaluate

> evaluate: function( | feature | )

Evaluates this filter for a specific feature.

#### Parameters

feature | {OpenLayers.Feature.Vector} feature to apply the filter to.

#### Returns

{Boolean} The feature meets filter criteria.

## OpenLayers.Filter.FeatureId

This class represents a ogc:FeatureId Filter, as being used for rule-based SLD styling

#### Inherits from

- OpenLayers.Filter

Summary

Properties |
type | {String} Type to identify this filter.
Functions |
OpenLayers.Filter.FeatureId | Creates an ogc:FeatureId rule.

### Properties

### type

{String} Type to identify this filter.

### Functions

### OpenLayers.Filter.FeatureId

Creates an ogc:FeatureId rule.

#### Parameters

options | {Object} An optional object with properties to set on the rule

#### Returns

{OpenLayers.Filter.FeatureId}

## OpenLayers.Format.WFST.v1

Superclass for WFST parsers.

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
version | {String} WFS version number.
schemaLocation | {String} Schema location for a particular minor version.
stateName | {Object} Maps feature states to node names.
OpenLayers.Format.WFST.v1 | Instances of this class are not created directly.
getSrsName |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write | Given an array of features, write a WFS transaction.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
schemaLocationAttr | Generate the xsi:schemaLocation attribute value.
setFilterProperty | Set the property of each spatial filter.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### defaultPrefix

### version

{String} WFS version number.

### schemaLocation

{String} Schema location for a particular minor version.

### stateName

{Object} Maps feature states to node names.

### OpenLayers.Format.WFST.v1

Instances of this class are not created directly. Use the OpenLayers.Format.WFST.v1_0_0 or OpenLayers.Format.WFST.v1_1_0 constructor instead.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### getSrsName

> getSrsName: function( | feature,
> | options | )

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### write

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

Given an array of features, write a WFS transaction. This assumes the features have a state property that determines the operation type - insert, update, or delete.

#### Parameters

features | {Array(OpenLayers.Feature.Vector)} A list of features. See below for a more detailed description of the influence of the feature’s modified property.
options | {Object}

#### feature.modified rules

If a feature has a modified property set, the following checks will be made before a feature’s geometry or attribute is included in an Update transaction:

- modified is not set at all: The geometry and all attributes will be included.
- modified.geometry is set (null or a geometry): The geometry will be included. If modified.attributes is not set, all attributes will be included.
- modified.attributes is set: Only the attributes set (i.e. to null or a value) in modified.attributes will be included. If modified.geometry is not set, the geometry will not be included.

#### Valid options include

- multi {Boolean} If set to true, geometries will be casted to Multi geometries before writing.

#### Returns

{String} A serialized WFS transaction.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### schemaLocationAttr

> schemaLocationAttr: function( | options | )

Generate the xsi:schemaLocation attribute value.

#### Returns

{String} The xsi:schemaLocation attribute or undefined if none.

### setFilterProperty

> setFilterProperty: function( | filter | )

Set the property of each spatial filter.

#### Parameters

filter | {OpenLayers.Filter}

## OpenLayers.Format.OGCExceptionReport

Class to read exception reports for various OGC services and versions.

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
regExes | Compiled regular expressions for manipulating strings.
defaultPrefix |
OpenLayers.Format.OGCExceptionReport | Create a new parser for OGC exception reports.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### regExes

Compiled regular expressions for manipulating strings.

### defaultPrefix

### OpenLayers.Format.OGCExceptionReport

Create a new parser for OGC exception reports.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

## OpenLayers.Format.XML.VersionedOGC

Base class for versioned formats, i.e. a format which supports multiple versions.

To enable checking if parsing succeeded, you will need to define a property called errorProperty on the parser you want to check. The parser will then check the returned object to see if that property is present. If it is, it assumes the parsing was successful. If it is not present (or is null), it will pass the document through an OGCExceptionReport parser.

If errorProperty is undefined for the parser, this error checking mechanism will be disabled.

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties |
name | {String} The name of this parser, this is the part of the CLASS_NAME except for “OpenLayers.Format.”
parser | {Object} Instance of the versioned parser.
Functions |
OpenLayers.Format.XML.VersionedOGC. | Constructor.
getVersion | Returns the version to use.
getParser | Get an instance of the cached parser if available, otherwise create one.

### Properties

### name

{String} The name of this parser, this is the part of the CLASS_NAME except for “OpenLayers.Format.”

### parser

{Object} Instance of the versioned parser. Cached for multiple read and write calls of the same version.

### Functions

### OpenLayers.Format.XML.VersionedOGC.

Constructor.

#### Parameters

options | {Object} Optional object whose properties will be set on the object.

### getVersion

> getVersion: function( | root,
> | options | )

Returns the version to use. Subclasses can override this function if a different version detection is needed.

#### Parameters

root | {DOMElement}
options | {Object} Optional configuration object.

#### Returns

{String} The version to use.

### getParser

> getParser: function( | version | )

Get an instance of the cached parser if available, otherwise create one.

#### Parameters

version | {String}

#### Returns

{OpenLayers.Format}

## OpenLayers.Filter.Logical

This class represents ogc:And, ogc:Or and ogc:Not rules.

#### Inherits from

- OpenLayers.Filter

Summary

Functions |
OpenLayers.Filter.Logical | Creates a logical filter (And, Or, Not).

### Functions

### OpenLayers.Filter.Logical

Creates a logical filter (And, Or, Not).

#### Parameters

options | {Object} An optional object with properties to set on the filter.

#### Returns

{OpenLayers.Filter.Logical}

## OpenLayers.Filter.Comparison

This class represents a comparison filter.

#### Inherits from

- OpenLayers.Filter

Summary

Properties |
matchCase | {Boolean} Force case sensitive searches for EQUAL_TO and NOT_EQUAL_TO comparisons.
Functions |
OpenLayers.Filter.Comparison | Creates a comparison rule.
regex2value | Convert the value of this rule from a regular expression string into an ogc literal string using a wildCard of *, a singleChar of ., and an escape of !.

### Properties

### matchCase

{Boolean} Force case sensitive searches for EQUAL_TO and NOT_EQUAL_TO comparisons. The Filter Encoding 1.1 specification added a matchCase attribute to ogc:PropertyIsEqualTo and ogc:PropertyIsNotEqualTo elements. This property will be serialized with those elements only if using the v1.1.0 filter format. However, when evaluating filters here, the matchCase property will always be respected (for EQUAL_TO and NOT_EQUAL_TO). Default is true.

### Functions

### OpenLayers.Filter.Comparison

Creates a comparison rule.

#### Parameters

options | {Object} An optional object with properties to set on the rule

#### Returns

{OpenLayers.Filter.Comparison}

### regex2value

> regex2value: function()

Convert the value of this rule from a regular expression string into an ogc literal string using a wildCard of *, a singleChar of ., and an escape of !. Leaves the <value> property unmodified.

#### Returns

{String} A string value.

## OpenLayers.Format.Filter

Read/Write ogc:Filter. Create a new instance with the OpenLayers.Format.Filter constructor.

#### Inherits from

- OpenLayers.Format.XML.VersionedOGC

## OpenLayers.Filter.Function

This class represents a filter function. We are using this class for creation of complex filters that can contain filter functions as values. Nesting function as other functions parameter is supported.

#### Inherits from

- OpenLayers.Filter

Summary

Functions |
OpenLayers.Filter.Function | Creates a filter function.

### Functions

### OpenLayers.Filter.Function

Creates a filter function.

#### Parameters

options | {Object} An optional object with properties to set on the function.

#### Returns

{OpenLayers.Filter.Function}

## OpenLayers.Date

Contains implementations of Date.parse and date.toISOString that match the ECMAScript 5 specification for parsing RFC 3339 dates. http://tools.ietf.org/html/rfc3339

## OpenLayers.Format.Filter.v1

Superclass for Filter version 1 parsers.

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
schemaLocation | {String} Schema location for a particular minor version.
OpenLayers.Format.Filter.v1 | Instances of this class are not created directly.
read |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
readSpatial | Read a {OpenLayers.Filter.Spatial} filter.
writeOgcExpression | Limited support for writing OGC expressions.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
getFilterType |
filterMap | {Object} Contains a member for each filter type.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### defaultPrefix

### schemaLocation

{String} Schema location for a particular minor version.

### OpenLayers.Format.Filter.v1

Instances of this class are not created directly. Use the OpenLayers.Format.Filter constructor instead.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### read

> read: function( | data | )

#### Parameters

data | {DOMElement} A Filter document element.

#### Returns

{OpenLayers.Filter} A filter object.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### readSpatial

> readSpatial: function( | node,
> | obj,
> | type | )

Read a {OpenLayers.Filter.Spatial} filter.

#### Parameters

node | {DOMElement} A DOM element that contains an ogc:expression.
obj | {Object} The target object.
type | {String} One of the OpenLayers.Filter.Spatial.* constants.

#### Returns

{OpenLayers.Filter.Spatial} The created filter.

### writeOgcExpression

> writeOgcExpression: function( | value,
> | node | )

Limited support for writing OGC expressions. Currently it supports (OpenLayers.Filter.Function || String || Number)

#### Parameters

value | (OpenLayers.Filter.Function || String || Number)
node | {DOMElement} A parent DOM element

#### Returns

{DOMElement} Updated node element.

### write

> write: function( | filter | )

#### Parameters

filter | {OpenLayers.Filter} A filter object.

#### Returns

{DOMElement} An ogc:Filter element.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### getFilterType

> getFilterType: function( | filter | )

### filterMap

{Object} Contains a member for each filter type. Values are node names for corresponding OGC Filter child elements.

## OpenLayers.Geometry

A Geometry is a description of a geographic object. Create an instance of this class with the OpenLayers.Geometry constructor. This is a base class, typical geometry types are described by subclasses of this class.

Note that if you use the OpenLayers.Geometry.fromWKT method, you must explicitly include the OpenLayers.Format.WKT in your build.

Summary

Properties |
id | {String} A unique identifier for this geometry.
parent | {OpenLayers.Geometry}This is set when a Geometry is added as component of another geometry
bounds | {OpenLayers.Bounds} The bounds of this geometry
Functions |
OpenLayers.Geometry | Creates a geometry object.
destroy | Destroy this geometry.
setBounds | Set the bounds for this Geometry.
clearBounds | Nullify this components bounds and that of its parent as well.
extendBounds | Extend the existing bounds to include the new bounds.
atPoint |
getLength | Calculate the length of this geometry.
getArea | Calculate the area of this geometry.
toString | Returns a text representation of the geometry.
OpenLayers.Geometry.fromWKT | Generate a geometry given a Well-Known Text string.
OpenLayers.Geometry.segmentsIntersect | Determine whether two line segments intersect.
OpenLayers.Geometry.distanceToSegment |
OpenLayers.Geometry.distanceSquaredToSegment | Usually the distanceToSegment function should be used.

### Properties

### id

{String} A unique identifier for this geometry.

### parent

{OpenLayers.Geometry}This is set when a Geometry is added as component of another geometry

### bounds

{OpenLayers.Bounds} The bounds of this geometry

### Functions

### OpenLayers.Geometry

Creates a geometry object.

### destroy

> destroy: function()

Destroy this geometry.

### setBounds

> setBounds: function( | bounds | )

Set the bounds for this Geometry.

#### Parameters

bounds | {OpenLayers.Bounds}

### clearBounds

> clearBounds: function()

Nullify this components bounds and that of its parent as well.

### extendBounds

> extendBounds: function( | newBounds | )

Extend the existing bounds to include the new bounds. If geometry’s bounds is not yet set, then set a new Bounds.

#### Parameters

newBounds | {OpenLayers.Bounds}

### atPoint

> atPoint: function( | lonlat,
> | toleranceLon,
> | toleranceLat | )

Note | This is only an approximation based on the bounds of the geometry.

#### Parameters

lonlat | {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an object with a ‘lon’ and ‘lat’ properties.
toleranceLon | {float} Optional tolerance in Geometric Coords
toleranceLat | {float} Optional tolerance in Geographic Coords

#### Returns

{Boolean} Whether or not the geometry is at the specified location

### getLength

> getLength: function()

Calculate the length of this geometry. This method is defined in subclasses.

#### Returns

{Float} The length of the collection by summing its parts

### getArea

> getArea: function()

Calculate the area of this geometry. This method is defined in subclasses.

#### Returns

{Float} The area of the collection by summing its parts

### toString

> toString: function()

Returns a text representation of the geometry. If the WKT format is included in a build, this will be the Well-Known Text representation.

#### Returns

{String} String representation of this geometry.

### OpenLayers.Geometry.fromWKT

> OpenLayers.Geometry.fromWKT = function( | wkt | )

Generate a geometry given a Well-Known Text string. For this method to work, you must include the OpenLayers.Format.WKT in your build explicitly.

#### Parameters

wkt | {String} A string representing the geometry in Well-Known Text.

#### Returns

{OpenLayers.Geometry} A geometry of the appropriate class.

### OpenLayers.Geometry.segmentsIntersect

> OpenLayers.Geometry.segmentsIntersect = function( | seg1,
> | seg2,
> | options | )

Determine whether two line segments intersect. Optionally calculates and returns the intersection point. This function is optimized for cases where seg1.x2 >= seg2.x1 || seg2.x2 >= seg1.x1. In those obvious cases where there is no intersection, the function should not be called.

#### Parameters

seg1 | {Object} Object representing a segment with properties x1, y1, x2, and y2. The start point is represented by x1 and y1. The end point is represented by x2 and y2. Start and end are ordered so that x1 < x2.
seg2 | {Object} Object representing a segment with properties x1, y1, x2, and y2. The start point is represented by x1 and y1. The end point is represented by x2 and y2. Start and end are ordered so that x1 < x2.
options | {Object} Optional properties for calculating the intersection.

#### Valid options

point | {Boolean} Return the intersection point. If false, the actual intersection point will not be calculated. If true and the segments intersect, the intersection point will be returned. If true and the segments do not intersect, false will be returned. If true and the segments are coincident, true will be returned.
tolerance | {Number} If a non-null value is provided, if the segments are within the tolerance distance, this will be considered an intersection. In addition, if the point option is true and the calculated intersection is within the tolerance distance of an end point, the endpoint will be returned instead of the calculated intersection. Further, if the intersection is within the tolerance of endpoints on both segments, or if two segment endpoints are within the tolerance distance of eachother (but no intersection is otherwise calculated), an endpoint on the first segment provided will be returned.

#### Returns

{Boolean | OpenLayers.Geometry.Point} The two segments intersect. If the point argument is true, the return will be the intersection point or false if none exists. If point is true and the segments are coincident, return will be true (and the instersection is equal to the shorter segment).

### OpenLayers.Geometry.distanceToSegment

> OpenLayers.Geometry.distanceToSegment = function( | point,
> | segment | )

#### Parameters

point | {Object} An object with x and y properties representing the point coordinates.
segment | {Object} An object with x1, y1, x2, and y2 properties representing endpoint coordinates.

#### Returns

{Object} An object with distance, along, x, and y properties. The distance will be the shortest distance between the input point and segment. The x and y properties represent the coordinates along the segment where the shortest distance meets the segment. The along attribute describes how far between the two segment points the given point is.

### OpenLayers.Geometry.distanceSquaredToSegment

> OpenLayers.Geometry.distanceSquaredToSegment = function( | point,
> | segment | )

Usually the distanceToSegment function should be used. This variant however can be used for comparisons where the exact distance is not important.

#### Parameters

point | {Object} An object with x and y properties representing the point coordinates.
segment | {Object} An object with x1, y1, x2, and y2 properties representing endpoint coordinates.

#### Returns

{Object} An object with squared distance, along, x, and y properties. The distance will be the shortest distance between the input point and segment. The x and y properties represent the coordinates along the segment where the shortest distance meets the segment. The along attribute describes how far between the two segment points the given point is.

## OpenLayers.Geometry.Point

Point geometry class.

#### Inherits from

- OpenLayers.Geometry

Summary

Functions |
OpenLayers.Geometry.Point | Construct a point geometry.
calculateBounds | Create a new Bounds based on the lon/lat
toShortString | {String} Shortened String representation of Point object.

### Functions

### OpenLayers.Geometry.Point

Construct a point geometry.

#### Parameters

x | {float}
y | {float}

### calculateBounds

> calculateBounds: function ()

Create a new Bounds based on the lon/lat

### toShortString

> toShortString: function()

#### Returns

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

## OpenLayers.Geometry.Collection

A Collection is exactly what it sounds like: A collection of different Geometries. These are stored in the local parameter <components> (which can be passed as a parameter to the constructor).

As new geometries are added to the collection, they are NOT cloned. When removing geometries, they need to be specified by reference (ie you have to pass in the exact geometry to be removed).

The getArea and getLength functions here merely iterate through the components, summing their respective areas and lengths.

Create a new instance with the OpenLayers.Geometry.Collection constructor.

#### Inherits from

- OpenLayers.Geometry

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.Collection | Creates a Geometry Collection -- a list of geoms.
getComponentsString | Get a string representing the components for this collection
addComponent | Add a new component (geometry) to the collection.
removeComponent | Remove a component from this geometry.

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.Collection

Creates a Geometry Collection -- a list of geoms.

#### Parameters

components | {Array(OpenLayers.Geometry)} Optional array of geometries

### getComponentsString

> getComponentsString: function()

Get a string representing the components for this collection

#### Returns

{String} A string representation of the components of this geometry

### addComponent

> addComponent: function( | component,
> | index | )

Add a new component (geometry) to the collection. If this.componentTypes is set, then the component class name must be in the componentTypes array.

The bounds cache is reset.

#### Parameters

component | {OpenLayers.Geometry} A geometry to add
index | {int} Optional index into the array to insert the component

#### Returns

{Boolean} The component geometry was successfully added

### removeComponent

> removeComponent: function( | component | )

Remove a component from this geometry.

#### Parameters

component | {OpenLayers.Geometry}

#### Returns

{Boolean} The component was removed.

## OpenLayers.Geometry.MultiPoint

MultiPoint is a collection of Points. Create a new instance with the OpenLayers.Geometry.MultiPoint constructor.

#### Inherits from

- OpenLayers.Geometry.Collection
- OpenLayers.Geometry

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.MultiPoint | Create a new MultiPoint Geometry

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.MultiPoint

Create a new MultiPoint Geometry

#### Parameters

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

#### Returns

{OpenLayers.Geometry.MultiPoint}

## OpenLayers.Geometry.Curve

A Curve is a MultiPoint, whose points are assumed to be connected. To this end, we provide a “getLength()” function, which iterates through the points, summing the distances between them.

#### Inherits

- OpenLayers.Geometry.MultiPoint

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.Curve |

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.Curve

#### Parameters

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

## OpenLayers.Geometry.LineString

A LineString is a Curve which, once two points have been added to it, can never be less than two points long.

#### Inherits from

- OpenLayers.Geometry.Curve

Summary

Functions |
OpenLayers.Geometry.LineString | Create a new LineString geometry
getSortedSegments | {Array} An array of segment objects.
splitWithSegment | Split this geometry with the given segment.
split | Use this geometry (the source) to attempt to split a target geometry.
splitWith | Split this geometry (the target) with the given geometry (the source).

### Functions

### OpenLayers.Geometry.LineString

Create a new LineString geometry

#### Parameters

points | {Array(OpenLayers.Geometry.Point)} An array of points used to generate the linestring

### getSortedSegments

> getSortedSegments: function()

#### Returns

{Array} An array of segment objects. Segment objects have properties x1, y1, x2, and y2. The start point is represented by x1 and y1. The end point is represented by x2 and y2. Start and end are ordered so that x1 < x2.

### splitWithSegment

> splitWithSegment: function( | seg,
> | options | )

Split this geometry with the given segment.

#### Parameters

seg | {Object} An object with x1, y1, x2, and y2 properties referencing segment endpoint coordinates.
options | {Object} Properties of this object will be used to determine how the split is conducted.

#### Valid options

edge | {Boolean} Allow splitting when only edges intersect. Default is true. If false, a vertex on the source segment must be within the tolerance distance of the intersection to be considered a split.
tolerance | {Number} If a non-null value is provided, intersections within the tolerance distance of one of the source segment’s endpoints will be assumed to occur at the endpoint.

#### Returns

{Object} An object with lines and points properties. If the given segment intersects this linestring, the lines array will reference geometries that result from the split. The points array will contain all intersection points. Intersection points are sorted along the segment (in order from x1,y1 to x2,y2).

### split

> split: function( | target,
> | options | )

Use this geometry (the source) to attempt to split a target geometry.

#### Parameters

target | {OpenLayers.Geometry} The target geometry.
options | {Object} Properties of this object will be used to determine how the split is conducted.

#### Valid options

mutual | {Boolean} Split the source geometry in addition to the target geometry. Default is false.
edge | {Boolean} Allow splitting when only edges intersect. Default is true. If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split.
tolerance | {Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.

#### Returns

{Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry. The source and target geometry will remain unmodified. If no split results, null will be returned. If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.

### splitWith

> splitWith: function( | geometry,
> | options | )

Split this geometry (the target) with the given geometry (the source).

#### Parameters

geometry | {OpenLayers.Geometry} A geometry used to split this geometry (the source).
options | {Object} Properties of this object will be used to determine how the split is conducted.

#### Valid options

mutual | {Boolean} Split the source geometry in addition to the target geometry. Default is false.
edge | {Boolean} Allow splitting when only edges intersect. Default is true. If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split.
tolerance | {Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.

#### Returns

{Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry. The source and target geometry will remain unmodified. If no split results, null will be returned. If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.

## OpenLayers.Geometry.MultiLineString

A MultiLineString is a geometry with multiple OpenLayers.Geometry.LineString components.

#### Inherits from

- OpenLayers.Geometry.Collection
- OpenLayers.Geometry

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.MultiLineString | Constructor for a MultiLineString Geometry.
split | Use this geometry (the source) to attempt to split a target geometry.
splitWith | Split this geometry (the target) with the given geometry (the source).

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.MultiLineString

Constructor for a MultiLineString Geometry.

#### Parameters

components | {Array(OpenLayers.Geometry.LineString)}

### split

> split: function( | geometry,
> | options | )

Use this geometry (the source) to attempt to split a target geometry.

#### Parameters

geometry | {OpenLayers.Geometry} The target geometry.
options | {Object} Properties of this object will be used to determine how the split is conducted.

#### Valid options

mutual | {Boolean} Split the source geometry in addition to the target geometry. Default is false.
edge | {Boolean} Allow splitting when only edges intersect. Default is true. If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split.
tolerance | {Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.

#### Returns

{Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry. The source and target geometry will remain unmodified. If no split results, null will be returned. If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.

### splitWith

> splitWith: function( | geometry,
> | options | )

Split this geometry (the target) with the given geometry (the source).

#### Parameters

geometry | {OpenLayers.Geometry} A geometry used to split this geometry (the source).
options | {Object} Properties of this object will be used to determine how the split is conducted.

#### Valid options

mutual | {Boolean} Split the source geometry in addition to the target geometry. Default is false.
edge | {Boolean} Allow splitting when only edges intersect. Default is true. If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split.
tolerance | {Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.

#### Returns

{Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry. The source and target geometry will remain unmodified. If no split results, null will be returned. If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.

## OpenLayers.Geometry.LinearRing

A Linear Ring is a special LineString which is closed. It closes itself automatically on every addPoint/removePoint by adding a copy of the first point as the last point.

Also, as it is the first in the line family to close itself, a getArea() function is defined to calculate the enclosed area of the linearRing

#### Inherits

- OpenLayers.Geometry.LineString

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.LinearRing | Linear rings are constructed with an array of points.
containsPoint | Test if a point is inside a linear ring.

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.LinearRing

Linear rings are constructed with an array of points. This array can represent a closed or open ring. If the ring is open (the last point does not equal the first point), the constructor will close the ring. If the ring is already closed (the last point does equal the first point), it will be left closed.

#### Parameters

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

### containsPoint

> containsPoint: function( | point | )

Test if a point is inside a linear ring. For the case where a point is coincident with a linear ring edge, returns 1. Otherwise, returns boolean.

#### Parameters

point | {OpenLayers.Geometry.Point}

#### Returns

{Boolean | Number} The point is inside the linear ring. Returns 1 if the point is coincident with an edge. Returns boolean otherwise.

## OpenLayers.Geometry.Polygon

Polygon is a collection of Geometry.LinearRings.

#### Inherits from

- OpenLayers.Geometry.Collection
- OpenLayers.Geometry

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.Polygon | Constructor for a Polygon geometry.
containsPoint | Test if a point is inside a polygon.

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.Polygon

Constructor for a Polygon geometry. The first ring (this.component[0])is the outer bounds of the polygon and all subsequent rings (this.component[1-n]) are internal holes.

#### Parameters

components | {Array(OpenLayers.Geometry.LinearRing)}

### containsPoint

> containsPoint: function( | point | )

Test if a point is inside a polygon. Points on a polygon edge are considered inside.

#### Parameters

point | {OpenLayers.Geometry.Point}

#### Returns

{Boolean | Number} The point is inside the polygon. Returns 1 if the point is on an edge. Returns boolean otherwise.

## OpenLayers.Geometry.MultiPolygon

MultiPolygon is a geometry with multiple OpenLayers.Geometry.Polygon components. Create a new instance with the OpenLayers.Geometry.MultiPolygon constructor.

#### Inherits from

- OpenLayers.Geometry.Collection

Summary

Properties |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include.
Functions |
OpenLayers.Geometry.MultiPolygon | Create a new MultiPolygon geometry

### Properties

### componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include. A null value means the component types are not restricted.

### Functions

### OpenLayers.Geometry.MultiPolygon

Create a new MultiPolygon geometry

#### Parameters

components | {Array(OpenLayers.Geometry.Polygon)} An array of polygons used to generate the MultiPolygon

## OpenLayers.Format.GML

Read/Write GML. Create a new instance with the OpenLayers.Format.GML constructor. Supports the GML simple features profile.

#### Inherits from

- OpenLayers.Format.XML

Summary

Functions and Properties |
OpenLayers.Format.GML | Create a new parser for GML.
parseFeature | This function is the core of the GML parsing code in OpenLayers.
parseGeometry | Properties of this object are the functions that parse geometries based on their type.
parseGeometry.point | Given a GML node representing a point geometry, create an OpenLayers point geometry.
parseGeometry.multipoint | Given a GML node representing a multipoint geometry, create an OpenLayers multipoint geometry.
parseGeometry.linestring | Given a GML node representing a linestring geometry, create an OpenLayers linestring geometry.
parseGeometry.multilinestring | Given a GML node representing a multilinestring geometry, create an OpenLayers multilinestring geometry.
parseGeometry.polygon | Given a GML node representing a polygon geometry, create an OpenLayers polygon geometry.
parseGeometry.multipolygon | Given a GML node representing a multipolygon geometry, create an OpenLayers multipolygon geometry.
parseGeometry.box | Given a GML node representing a box geometry, create an OpenLayers.Bounds.
parseAttributes |
createFeatureXML | Accept an OpenLayers.Feature.Vector, and build a GML node for it.
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type.
buildGeometry.point | Given an OpenLayers point geometry, create a GML point.
buildGeometry.multipoint | Given an OpenLayers multipoint geometry, create a GML multipoint.
buildGeometry.linestring | Given an OpenLayers linestring geometry, create a GML linestring.
buildGeometry.multilinestring | Given an OpenLayers multilinestring geometry, create a GML multilinestring.
buildGeometry.linearring | Given an OpenLayers linearring geometry, create a GML linearring.
buildGeometry.polygon | Given an OpenLayers polygon geometry, create a GML polygon.
buildGeometry.multipolygon | Given an OpenLayers multipolygon geometry, create a GML multipolygon.
buildGeometry.bounds | Given an OpenLayers bounds, create a GML box.
buildCoordinates | builds the coordinates XmlNode

### Functions and Properties

### OpenLayers.Format.GML

Create a new parser for GML.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### parseFeature

> parseFeature: function( | node | )

This function is the core of the GML parsing code in OpenLayers. It creates the geometries that are then attached to the returned feature, and calls parseAttributes() to get attribute data out.

#### Parameters

node | {DOMElement} A GML feature node.

### parseGeometry

Properties of this object are the functions that parse geometries based on their type.

### parseGeometry.point

Given a GML node representing a point geometry, create an OpenLayers point geometry.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Geometry.Point} A point geometry.

### parseGeometry.multipoint

Given a GML node representing a multipoint geometry, create an OpenLayers multipoint geometry.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Geometry.MultiPoint} A multipoint geometry.

### parseGeometry.linestring

Given a GML node representing a linestring geometry, create an OpenLayers linestring geometry.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Geometry.LineString} A linestring geometry.

### parseGeometry.multilinestring

Given a GML node representing a multilinestring geometry, create an OpenLayers multilinestring geometry.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Geometry.MultiLineString} A multilinestring geometry.

### parseGeometry.polygon

Given a GML node representing a polygon geometry, create an OpenLayers polygon geometry.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Geometry.Polygon} A polygon geometry.

### parseGeometry.multipolygon

Given a GML node representing a multipolygon geometry, create an OpenLayers multipolygon geometry.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Geometry.MultiPolygon} A multipolygon geometry.

### parseGeometry.box

Given a GML node representing a box geometry, create an OpenLayers.Bounds.

#### Parameters

node | {DOMElement} A GML node.

#### Returns

{OpenLayers.Bounds} A bounds representing the box.

### parseAttributes

> parseAttributes: function( | node | )

#### Parameters

node | {DOMElement}

#### Returns

{Object} An attributes object.

### createFeatureXML

> createFeatureXML: function( | feature | )

Accept an OpenLayers.Feature.Vector, and build a GML node for it.

#### Parameters

feature | {OpenLayers.Feature.Vector} The feature to be built as GML.

#### Returns

{DOMElement} A node reprensting the feature in GML.

### buildGeometry

Object containing methods to do the actual geometry node building based on geometry type.

### buildGeometry.point

Given an OpenLayers point geometry, create a GML point.

#### Parameters

geometry | {OpenLayers.Geometry.Point} A point geometry.

#### Returns

{DOMElement} A GML point node.

### buildGeometry.multipoint

Given an OpenLayers multipoint geometry, create a GML multipoint.

#### Parameters

geometry | {OpenLayers.Geometry.MultiPoint} A multipoint geometry.

#### Returns

{DOMElement} A GML multipoint node.

### buildGeometry.linestring

Given an OpenLayers linestring geometry, create a GML linestring.

#### Parameters

geometry | {OpenLayers.Geometry.LineString} A linestring geometry.

#### Returns

{DOMElement} A GML linestring node.

### buildGeometry.multilinestring

Given an OpenLayers multilinestring geometry, create a GML multilinestring.

#### Parameters

geometry | {OpenLayers.Geometry.MultiLineString} A multilinestring geometry.

#### Returns

{DOMElement} A GML multilinestring node.

### buildGeometry.linearring

Given an OpenLayers linearring geometry, create a GML linearring.

#### Parameters

geometry | {OpenLayers.Geometry.LinearRing} A linearring geometry.

#### Returns

{DOMElement} A GML linearring node.

### buildGeometry.polygon

Given an OpenLayers polygon geometry, create a GML polygon.

#### Parameters

geometry | {OpenLayers.Geometry.Polygon} A polygon geometry.

#### Returns

{DOMElement} A GML polygon node.

### buildGeometry.multipolygon

Given an OpenLayers multipolygon geometry, create a GML multipolygon.

#### Parameters

geometry | {OpenLayers.Geometry.MultiPolygon} A multipolygon geometry.

#### Returns

{DOMElement} A GML multipolygon node.

### buildGeometry.bounds

Given an OpenLayers bounds, create a GML box.

#### Parameters

bounds | {<OpenLayers.Geometry.Bounds>} A bounds object.

#### Returns

{DOMElement} A GML box node.

### buildCoordinates

> buildCoordinatesNode: function( | geometry | )

builds the coordinates XmlNode

>     <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>

#### Parameters

geometry | {OpenLayers.Geometry}

#### Returns

{XmlNode} created xmlNode

## OpenLayers.Format.GML.Base

Superclass for GML parsers.

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
schemaLocation | {String} Schema location for a particular minor version.
geometryTypes | {Object} Maps OpenLayers geometry class names to GML element names.
singleFeatureType | {Boolean} True if there is only 1 featureType, and not an array of featuretypes.
autoConfig | {Boolean} Indicates if the format was configured without a <featureNS>, but auto-configured <featureNS> and <featureType> during read.
regExes | Compiled regular expressions for manipulating strings.
OpenLayers.Format.GML.Base | Instances of this class are not created directly.
read |
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
setGeometryTypes | Sets the geometryTypes mapping.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### defaultPrefix

### schemaLocation

{String} Schema location for a particular minor version.

### geometryTypes

{Object} Maps OpenLayers geometry class names to GML element names. Use setGeometryTypes before accessing this property.

### singleFeatureType

{Boolean} True if there is only 1 featureType, and not an array of featuretypes.

### autoConfig

{Boolean} Indicates if the format was configured without a <featureNS>, but auto-configured <featureNS> and <featureType> during read. Subclasses making use of <featureType> auto-configuration should make the first call to the readNode method (usually in the read method) with true as 3rd argument, so the auto-configured featureType can be reset and the format can be reused for subsequent reads with data from different featureTypes. Set to false after read if you want to keep the auto-configured values.

### regExes

Compiled regular expressions for manipulating strings.

### OpenLayers.Format.GML.Base

Instances of this class are not created directly. Use the OpenLayers.Format.GML.v2 or OpenLayers.Format.GML.v3 constructor instead.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

#### Valid options properties

featureType | {Array(String) or String} Local (without prefix) feature typeName(s) (required for write).
featureNS | {String} Feature namespace (required for write).
geometryName | {String} Geometry element name (required for write).

### read

> read: function( | data | )

#### Parameters

data | {DOMElement} A gml:featureMember element, a gml:featureMembers element, or an element containing either of the above at any level.

#### Returns

{Array(OpenLayers.Feature.Vector)} An array of features.

### readNode

> readNode: function( | node,
> | obj,
> | first | )

Shorthand for applying one of the named readers given the node namespace and local name. Readers take two args (node, obj) and generally extend or modify the second.

#### Parameters

node | {DOMElement} The node to be read (required).
obj | {Object} The object to be modified (optional).
first | {Boolean} Should be set to true for the first node read. This is usually the readNode call in the read method. Without this being set, auto-configured properties will stick on subsequent reads.

#### Returns

{Object} The input object, modified (or a new one if none was provided).

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### write

> write: function( | features | )

#### Parameters

features | {Array(OpenLayers.Feature.Vector) | OpenLayers.Feature.Vector} An array of features or a single feature.

#### Returns

{String} Given an array of features, a doc with a gml:featureMembers element will be returned. Given a single feature, a doc with a gml:featureMember element will be returned.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### setGeometryTypes

> setGeometryTypes: function()

Sets the geometryTypes mapping.

## OpenLayers.Format.GML.v3

Parses GML version 3.

#### Inherits from

- OpenLayers.Format.GML.Base

Summary

Properties and Functions |
schemaLocation | {String} Schema location for a particular minor version.
curve | {Boolean} Write gml:Curve instead of gml:LineString elements.
multiCurve | {Boolean} Write gml:MultiCurve instead of gml:MultiLineString.
surface | {Boolean} Write gml:Surface instead of gml:Polygon elements.
multiSurface | {Boolean} Write gml:multiSurface instead of gml:MultiPolygon.
OpenLayers.Format.GML.v3 | Create a parser for GML v3.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
setGeometryTypes | Sets the <geometryTypes> mapping.

### Properties and Functions

### schemaLocation

{String} Schema location for a particular minor version. The writers conform with the Simple Features Profile for GML.

### curve

{Boolean} Write gml:Curve instead of gml:LineString elements. This also affects the elements in multi-part geometries. Default is false. To write gml:Curve elements instead of gml:LineString, set curve to true in the options to the contstructor (cannot be changed after instantiation).

### multiCurve

{Boolean} Write gml:MultiCurve instead of gml:MultiLineString. Since the latter is deprecated in GML 3, the default is true. To write gml:MultiLineString instead of gml:MultiCurve, set multiCurve to false in the options to the constructor (cannot be changed after instantiation).

### surface

{Boolean} Write gml:Surface instead of gml:Polygon elements. This also affects the elements in multi-part geometries. Default is false. To write gml:Surface elements instead of gml:Polygon, set surface to true in the options to the contstructor (cannot be changed after instantiation).

### multiSurface

{Boolean} Write gml:multiSurface instead of gml:MultiPolygon. Since the latter is deprecated in GML 3, the default is true. To write gml:MultiPolygon instead of gml:multiSurface, set multiSurface to false in the options to the constructor (cannot be changed after instantiation).

### OpenLayers.Format.GML.v3

Create a parser for GML v3.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

#### Valid options properties

featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (required).
geometryName | {String} Geometry element name.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### write

> write: function( | features | )

#### Parameters

features | {Array(OpenLayers.Feature.Vector) | OpenLayers.Feature.Vector} An array of features or a single feature.

#### Returns

{String} Given an array of features, a doc with a gml:featureMembers element will be returned. Given a single feature, a doc with a gml:featureMember element will be returned.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### setGeometryTypes

> setGeometryTypes: function()

Sets the <geometryTypes> mapping.

## OpenLayers.Format.Filter.v1_1_0

Write ogc:Filter version 1.1.0.

#### Differences from the v1.0.0 parser

- uses GML v3 instead of GML v2
- reads matchCase attribute on ogc:PropertyIsEqual and ogc:PropertyIsNotEqual elements.
- writes matchCase attribute from comparison filters of type EQUAL_TO, NOT_EQUAL_TO and LIKE.

#### Inherits from

- OpenLayers.Format.GML.v3
- OpenLayers.Format.Filter.v1

Summary

Constants |
VERSION | {String} 1.1.0
Properties and Functions |
schemaLocation | {String} http://www.opengis.net/ogc/filter/1.1.0/filter.xsd
OpenLayers.Format.Filter.v1_1_0 | Instances of this class are not created directly.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
writeSpatial | Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.

### Constants

### VERSION

{String} 1.1.0

### Properties and Functions

### schemaLocation

{String} http://www.opengis.net/ogc/filter/1.1.0/filter.xsd

### OpenLayers.Format.Filter.v1_1_0

Instances of this class are not created directly. Use the OpenLayers.Format.Filter constructor instead.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### writeSpatial

> writeSpatial: function( | filter,
> | name | )

Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.

#### Parameters

filter | {OpenLayers.Filter.Spatial} The filter.
name | {String} Name of the generated XML element.

#### Returns

{DOMElement} The created XML element.

## OpenLayers.Format.OWSCommon

Read OWSCommon. Create a new instance with the OpenLayers.Format.OWSCommon constructor.

#### Inherits from

- OpenLayers.Format.XML.VersionedOGC

Summary

Functions |
OpenLayers.Format.OWSCommon | Create a new parser for OWSCommon.
getVersion | Returns the version to use.

### Functions

### OpenLayers.Format.OWSCommon

Create a new parser for OWSCommon.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### getVersion

> getVersion: function( | root,
> | options | )

Returns the version to use. Subclasses can override this function if a different version detection is needed.

#### Parameters

root | {DOMElement}
options | {Object} Optional configuration object.

#### Returns

{String} The version to use.

## OpenLayers.Format.OWSCommon.v1

Common readers and writers for OWSCommon v1.X formats

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
regExes | Compiled regular expressions for manipulating strings.
read |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### Properties and Functions

### regExes

Compiled regular expressions for manipulating strings.

### read

> read: function( | data,
> | options | )

#### Parameters

data | {DOMElement} An OWSCommon document element.
options | {Object} Options for the reader.

#### Returns

{Object} An object representing the OWSCommon document.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

## OpenLayers.Format.OWSCommon.v1_0_0

Parser for OWS Common version 1.0.0.

#### Inherits from

- OpenLayers.Format.OWSCommon.v1

Summary

Properties |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### Properties

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

## OpenLayers.Format.WFST.v1_1_0

A format for creating WFS v1.1.0 transactions. Create a new instance with the OpenLayers.Format.WFST.v1_1_0 constructor.

#### Inherits from

- OpenLayers.Format.Filter.v1_1_0
- OpenLayers.Format.WFST.v1

Summary

Properties and Functions |
version | {String} WFS version number.
schemaLocations | {Object} Properties are namespace aliases, values are schema locations.
OpenLayers.Format.WFST.v1_1_0 | A class for parsing and generating WFS v1.1.0 transactions.
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### Properties and Functions

### version

{String} WFS version number.

### schemaLocations

{Object} Properties are namespace aliases, values are schema locations.

### OpenLayers.Format.WFST.v1_1_0

A class for parsing and generating WFS v1.1.0 transactions.

To read additional information like hit count (numberOfFeatures) from the FeatureCollection, call the <OpenLayers.Format.WFST.v1.read> method with {output: “object”} as 2nd argument. Note that it is possible to just request the hit count from a WFS 1.1.0 server with the resultType=”hits” request parameter.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Valid options properties

featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (optional).
featurePrefix | {String} Feature namespace alias (optional - only used if featureNS is provided). Default is ‘feature’.
geometryName | {String} Name of geometry attribute. Default is ‘the_geom’.

### readNode

> readNode: function( | node,
> | obj,
> | first | )

Shorthand for applying one of the named readers given the node namespace and local name. Readers take two args (node, obj) and generally extend or modify the second.

#### Parameters

node | {DOMElement} The node to be read (required).
obj | {Object} The object to be modified (optional).
first | {Boolean} Should be set to true for the first node read. This is usually the readNode call in the read method. Without this being set, auto-configured properties will stick on subsequent reads.

#### Returns

{Object} The input object, modified (or a new one if none was provided).

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

## OpenLayers.Strategy

Abstract vector layer strategy class. Not to be instantiated directly. Use one of the strategy subclasses instead.

Summary

Properties |
layer | {OpenLayers.Layer.Vector} The layer this strategy belongs to.
options | {Object} Any options sent to the constructor.
active | {Boolean} The control is active.
autoActivate | {Boolean} The creator of the strategy can set autoActivate to false to fully control when the protocol is activated and deactivated.
autoDestroy | {Boolean} The creator of the strategy can set autoDestroy to false to fully control when the strategy is destroyed.
Functions |
OpenLayers.Strategy | Abstract class for vector strategies.
setLayer | Called to set the layer property.
activate | Activate the strategy.
deactivate | Deactivate the strategy.

### Properties

### layer

{OpenLayers.Layer.Vector} The layer this strategy belongs to.

### options

{Object} Any options sent to the constructor.

### active

{Boolean} The control is active.

### autoActivate

{Boolean} The creator of the strategy can set autoActivate to false to fully control when the protocol is activated and deactivated. Defaults to true.

### autoDestroy

{Boolean} The creator of the strategy can set autoDestroy to false to fully control when the strategy is destroyed. Defaults to true.

### Functions

### OpenLayers.Strategy

Abstract class for vector strategies. Create instances of a subclass.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### setLayer

> setLayer: function( | layer | )

Called to set the layer property.

#### Parameters

layer | {OpenLayers.Layer.Vector}

### activate

> activate: function()

Activate the strategy. Register any listeners, do appropriate setup.

#### Returns

{Boolean} True if the strategy was successfully activated or false if the strategy was already active.

### deactivate

> deactivate: function()

Deactivate the strategy. Unregister any listeners, do appropriate tear-down.

#### Returns

{Boolean} True if the strategy was successfully deactivated or false if the strategy was already inactive.

## OpenLayers.Strategy.Filter

Strategy for limiting features that get added to a layer by evaluating a filter. The strategy maintains a cache of all features until removeFeatures is called on the layer.

#### Inherits from

- OpenLayers.Strategy

Summary

Properties |
cache | {Array(OpenLayers.Feature.Vector)} List of currently cached features.
caching | {Boolean} The filter is currently caching features.
Functions |
OpenLayers.Strategy.Filter | Create a new filter strategy.
handleAdd |
handleRemove |

### Properties

### cache

{Array(OpenLayers.Feature.Vector)} List of currently cached features.

### caching

{Boolean} The filter is currently caching features.

### Functions

### OpenLayers.Strategy.Filter

Create a new filter strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### handleAdd

> handleAdd: function( | event | )

### handleRemove

> handleRemove: function( | event | )

## OpenLayers.Strategy.Save

A strategy that commits newly created or modified features. By default the strategy waits for a call to <save> before persisting changes. By configuring the strategy with the <auto> option, changes can be saved automatically.

#### Inherits from

- OpenLayers.Strategy

Summary

Properties |
events | {OpenLayers.Events} Events instance for triggering this protocol events.
timer | {Number} The id of the timer.
Functions |
OpenLayers.Strategy.Save | Create a new Save strategy.
triggerSave | Registered as a listener.
onCommit | Called after protocol commit.

### Properties

### events

{OpenLayers.Events} Events instance for triggering this protocol events.

### timer

{Number} The id of the timer.

### Functions

### OpenLayers.Strategy.Save

Create a new Save strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### triggerSave

> triggerSave: function( | event | )

Registered as a listener. Calls save if a feature has insert, update, or delete state.

#### Parameters

event | {Object} The event this function is listening for.

### onCommit

> onCommit: function( | response | )

Called after protocol commit.

#### Parameters

response | {OpenLayers.Protocol.Response} A response object.

## OpenLayers.Layer.HTTPRequest

#### Inherits from

- OpenLayers.Layer

Summary

Constants |
URL_HASH_FACTOR | {Float} Used to hash URL param strings for multi-WMS server selection.
Properties |
url | {Array(String) or String} This is either an array of url strings or a single url string.
params | {Object} Hashtable of key/value parameters
Functions |
OpenLayers.Layer.HTTPRequest |
selectUrl | selectUrl() implements the standard floating-point multiplicative hash function described by Knuth, and hashes the contents of the given param string into a float between 0 and 1.
getFullRequestString | Combine url with layer’s params and these newParams.

### Constants

### URL_HASH_FACTOR

{Float} Used to hash URL param strings for multi-WMS server selection. Set to the Golden Ratio per Knuth’s recommendation.

### Properties

### url

{Array(String) or String} This is either an array of url strings or a single url string.

### params

{Object} Hashtable of key/value parameters

### Functions

### OpenLayers.Layer.HTTPRequest

#### Parameters

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

### selectUrl

> selectUrl: function( | paramString,
> | urls | )

selectUrl() implements the standard floating-point multiplicative hash function described by Knuth, and hashes the contents of the given param string into a float between 0 and 1. This float is then scaled to the size of the provided urls array, and used to select a URL.

#### Parameters

paramString | {String}
urls | {Array(String)}

#### Returns

{String} An entry from the urls array, deterministically selected based on the paramString.

### getFullRequestString

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

Combine url with layer’s params and these newParams.

does checking on the serverPath variable, allowing for cases when it is supplied with trailing ? or &, as well as cases where not.

#### return in formatted string like this

”server?key1=value1&key2=value2&key3=value3”

WARNING: The altUrl parameter is deprecated and will be removed in 3.0.

#### Parameters

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

#### Returns

{String}

## OpenLayers.Tile

This is a class designed to designate a single tile, however it is explicitly designed to do relatively little. Tiles store information about themselves -- such as the URL that they are related to, and their size - but do not add themselves to the layer div automatically, for example. Create a new tile with the OpenLayers.Tile constructor, or a subclass.

TBD 3.0 | remove reference to url in above paragraph

Summary

Properties |
id | {String} null
layer | {OpenLayers.Layer} layer the tile is attached to
url | {String} url of the request.
size | {OpenLayers.Size} null
position | {OpenLayers.Pixel} Top Left pixel of the tile
isLoading | {Boolean} Is the tile loading?
Functions |
OpenLayers.Tile | Constructor for a new OpenLayers.Tile instance.
unload | Call immediately before destroying if you are listening to tile events, so that counters are properly handled if tile is still loading at destroy-time.
draw | Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn.
shouldDraw | Return whether or not the tile should actually be (re-)drawn.
setBounds | Sets the bounds on this instance
moveTo | Reposition the tile.
clear | Clear the tile of any bounds/position-related data so that it can be reused in a new location.

### Properties

### id

{String} null

### layer

{OpenLayers.Layer} layer the tile is attached to

### url

{String} url of the request.

TBD 3.0 Deprecated. The base tile class does not need an url. This should be handled in subclasses. Does not belong here.

### size

{OpenLayers.Size} null

### position

{OpenLayers.Pixel} Top Left pixel of the tile

### isLoading

{Boolean} Is the tile loading?

### Functions

### OpenLayers.Tile

Constructor for a new OpenLayers.Tile instance.

#### Parameters

layer | {OpenLayers.Layer} layer that the tile will go in.
position | {OpenLayers.Pixel}
bounds | {OpenLayers.Bounds}
url | {String}
size | {OpenLayers.Size}
options | {Object}

### unload

> unload: function()

Call immediately before destroying if you are listening to tile events, so that counters are properly handled if tile is still loading at destroy-time. Will only fire an event if the tile is still loading.

### draw

> draw: function( | force | )

Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn. This is an example implementation that can be overridden by subclasses. The minimum thing to do here is to call clear and return the result from shouldDraw.

#### Parameters

force | {Boolean} If true, the tile will not be cleared and no beforedraw event will be fired. This is used for drawing tiles asynchronously after drawing has been cancelled by returning false from a beforedraw listener.

#### Returns

{Boolean} Whether or not the tile should actually be drawn. Returns null if a beforedraw listener returned false.

### shouldDraw

> shouldDraw: function()

Return whether or not the tile should actually be (re-)drawn. The only case where we wouldn’t want to draw the tile is if the tile is outside its layer’s maxExtent

#### Returns

{Boolean} Whether or not the tile should actually be drawn.

### setBounds

> setBounds: function( | bounds | )

Sets the bounds on this instance

#### Parameters

bounds {OpenLayers.Bounds}

### moveTo

> moveTo: function ( | bounds,
> | position,
> | redraw | )

Reposition the tile.

#### Parameters

bounds | {OpenLayers.Bounds}
position | {OpenLayers.Pixel}
redraw | {Boolean} Call draw method on tile after moving. Default is true

### clear

> clear: function( | draw | )

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

## OpenLayers.Tile.Image

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

#### Inherits from

- OpenLayers.Tile

Summary

Properties |
imgDiv | {HTMLImageElement} The image for this tile.
frame | {DOMElement} The image element is appended to the frame.
imageReloadAttempts | {Integer} Attempts to load the image.
layerAlphaHack | {Boolean} True if the png alpha hack needs to be applied on the layer’s div.
asyncRequestId | {Integer} ID of an request to see if request is still valid.
canvasContext | {CanvasRenderingContext2D} A canvas context associated with the tile image.
Functions |
OpenLayers.Tile.Image | Constructor for a new OpenLayers.Tile.Image instance.
draw | Check that a tile should be drawn, and draw it.
renderTile | Internal function to actually initialize the image tile, position it correctly, and set its url.
positionTile | Using the properties currenty set on the layer, position the tile correctly.
clear | Remove the tile from the DOM, clear it of any image related data so that it can be reused in a new location.
getImage | Returns or creates and returns the tile image.
initImage | Creates the content for the frame on the tile.
setImgSrc | Sets the source for the tile image
getTile | Get the tile’s markup.
createBackBuffer | Create a backbuffer for this tile.
onImageLoad | Handler for the image onload event
onImageError | Handler for the image onerror event
stopLoading | Stops a loading sequence so onImageLoad won’t be executed.
Constants |
OpenLayers.Tile.Image.IMAGE | {HTMLImageElement} The image for a tile.

### Properties

### imgDiv

{HTMLImageElement} The image for this tile.

### frame

{DOMElement} The image element is appended to the frame. Any gutter on the image will be hidden behind the frame. If no gutter is set, this will be null.

### imageReloadAttempts

{Integer} Attempts to load the image.

### layerAlphaHack

{Boolean} True if the png alpha hack needs to be applied on the layer’s div.

### asyncRequestId

{Integer} ID of an request to see if request is still valid. This is a number which increments by 1 for each asynchronous request.

### canvasContext

{CanvasRenderingContext2D} A canvas context associated with the tile image.

### Functions

### OpenLayers.Tile.Image

Constructor for a new OpenLayers.Tile.Image instance.

#### Parameters

layer | {OpenLayers.Layer} layer that the tile will go in.
position | {OpenLayers.Pixel}
bounds | {OpenLayers.Bounds}
url | {String} Deprecated. Remove me in 3.0.
size | {OpenLayers.Size}
options | {Object}

### draw

> draw: function()

Check that a tile should be drawn, and draw it.

#### Returns

{Boolean} Was a tile drawn? Or null if a beforedraw listener returned false.

### renderTile

> renderTile: function()

Internal function to actually initialize the image tile, position it correctly, and set its url.

### positionTile

> positionTile: function()

Using the properties currenty set on the layer, position the tile correctly. This method is used both by the async and non-async versions of the Tile.Image code.

### clear

> clear: function()

Remove the tile from the DOM, clear it of any image related data so that it can be reused in a new location.

### getImage

> getImage: function()

Returns or creates and returns the tile image.

### initImage

> initImage: function()

Creates the content for the frame on the tile.

### setImgSrc

> setImgSrc: function( | url | )

Sets the source for the tile image

#### Parameters

url | {String} or undefined to hide the image

### getTile

> getTile: function()

Get the tile’s markup.

#### Returns

{DOMElement} The tile’s markup

### createBackBuffer

> createBackBuffer: function()

Create a backbuffer for this tile. A backbuffer isn’t exactly a clone of the tile’s markup, because we want to avoid the reloading of the image. So we clone the frame, and steal the image from the tile.

#### Returns

{DOMElement} The markup, or undefined if the tile has no image or if it’s currently loading.

### onImageLoad

> onImageLoad: function()

Handler for the image onload event

### onImageError

> onImageError: function()

Handler for the image onerror event

### stopLoading

> stopLoading: function()

Stops a loading sequence so onImageLoad won’t be executed.

### Constants

### OpenLayers.Tile.Image.IMAGE

{HTMLImageElement} The image for a tile.

## OpenLayers.Layer.Grid

Base class for layers that use a lattice of tiles. Create a new grid layer with the OpenLayers.Layer.Grid constructor.

#### Inherits from

- OpenLayers.Layer.HTTPRequest

Summary

Properties |
tileOriginCorner | {String} If the <tileOrigin> property is not provided, the tile origin will be derived from the layer’s <maxExtent>.
grid | {Array(Array(OpenLayers.Tile))} This is an array of rows, each row is an array of tiles.
serverResolutions | {Array(Number}} This property is documented in subclasses as an API property.
loading | {Boolean} Indicates if tiles are being loaded.
backBuffer | {DOMElement} The back buffer.
gridResolution | {Number} The resolution of the current grid.
backBufferResolution | {Number} The resolution of the current back buffer.
backBufferLonLat | {Object} The top-left corner of the current back buffer.
backBufferTimerId | {Number} The id of the back buffer timer.
gridLayout | {Object} Object containing properties tilelon, tilelat, startcol, startrow
rowSign | {Number} 1 for grids starting at the top, -1 for grids starting at the bottom.
transitionendEvents | {Array} Event names for transitionend
Functions |
OpenLayers.Layer.Grid | Create a new grid layer
initProperties | Set any properties that depend on the value of singleTile.
setMap |
removeMap | Called when the layer is removed from the map.
clearGrid | Go through and remove all tiles from the grid, calling destroy() on each of them to kill circular references
moveTo | This function is called whenever the map is moved.
getTileData | Given a map location, retrieve a tile and the pixel offset within that tile corresponding to the location.
destroyTile |
getServerResolution | Return the closest server-supported resolution.
getServerZoom | Return the zoom value corresponding to the best matching server resolution, taking into account serverResolutions and <zoomOffset>.
applyBackBuffer | Create, insert, scale and position a back buffer for the layer.
createBackBuffer | Create a back buffer.
removeBackBuffer | Remove back buffer from DOM.
moveByPx | Move the layer based on pixel vector.
initSingleTile |
calculateGridLayout | Generate parameters for the grid layout.
getTileOrigin | Determine the origin for aligning the grid of tiles.
getTileBoundsForGridIndex |
initGriddedTiles |
getMaxExtent | Get this layer’s maximum extent.
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 tiles.
removeTileMonitoringHooks | This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()
moveGriddedTiles |
shiftRow | Shifty grid work
shiftColumn | Shift grid work in the other dimension
removeExcessTiles | When the size of the map or the buffer changes, we may need to remove some excess rows and columns.
onMapResize | For singleTile layers, this will set a new tile size according to the dimensions of the map pane.

### Properties

### tileOriginCorner

{String} If the <tileOrigin> property is not provided, the tile origin will be derived from the layer’s <maxExtent>. The corner of the <maxExtent> used is determined by this property. Acceptable values are “tl” (top left), “tr” (top right), “bl” (bottom left), and “br” (bottom right). Default is “bl”.

### grid

{Array(Array(OpenLayers.Tile))} This is an array of rows, each row is an array of tiles.

### serverResolutions

{Array(Number}} This property is documented in subclasses as an API property.

### loading

{Boolean} Indicates if tiles are being loaded.

### backBuffer

{DOMElement} The back buffer.

### gridResolution

{Number} The resolution of the current grid. Used for backbuffer and client zoom. This property is updated every time the grid is initialized.

### backBufferResolution

{Number} The resolution of the current back buffer. This property is updated each time a back buffer is created.

### backBufferLonLat

{Object} The top-left corner of the current back buffer. Includes lon and lat properties. This object is updated each time a back buffer is created.

### backBufferTimerId

{Number} The id of the back buffer timer. This timer is used to delay the removal of the back buffer, thereby preventing flash effects caused by tile animation.

### gridLayout

{Object} Object containing properties tilelon, tilelat, startcol, startrow

### rowSign

{Number} 1 for grids starting at the top, -1 for grids starting at the bottom. This is used for several grid index and offset calculations.

### transitionendEvents

{Array} Event names for transitionend

### Functions

### OpenLayers.Layer.Grid

Create a new grid layer

#### Parameters

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

### initProperties

> initProperties: function()

Set any properties that depend on the value of singleTile. Currently sets removeBackBufferDelay and className

### setMap

> setMap: function( | map | )

#### Parameters

map | {OpenLayers.Map} The map.

### removeMap

> removeMap: function( | map | )

Called when the layer is removed from the map.

#### Parameters

map | {OpenLayers.Map} The map.

### clearGrid

> clearGrid:function()

Go through and remove all tiles from the grid, calling destroy() on each of them to kill circular references

### moveTo

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

This function is called whenever the map is moved. All the moving of actual ‘tiles’ is done by the map, but moveTo’s role is to accept a bounds and make sure the data that that bounds requires is pre-loaded.

#### Parameters

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

### getTileData

> getTileData: function( | loc | )

Given a map location, retrieve a tile and the pixel offset within that tile corresponding to the location. If there is not an existing tile in the grid that covers the given location, null will be returned.

#### Parameters

loc | {OpenLayers.LonLat} map location

#### Returns

{Object} Object with the following properties: tile ({OpenLayers.Tile}), i ({Number} x-pixel offset from top left), and j ({Integer} y-pixel offset from top left).

### destroyTile

> destroyTile: function( | tile | )

#### Parameters

tile | {OpenLayers.Tile}

### getServerResolution

> getServerResolution: function( | resolution | )

Return the closest server-supported resolution.

#### Parameters

resolution | {Number} The base resolution. If undefined the map resolution is used.

#### Returns

{Number} The closest server resolution value.

### getServerZoom

> getServerZoom: function()

Return the zoom value corresponding to the best matching server resolution, taking into account serverResolutions and <zoomOffset>.

#### Returns

{Number} The closest server supported zoom. This is not the map zoom level, but an index of the server’s resolutions array.

### applyBackBuffer

> applyBackBuffer: function( | resolution | )

Create, insert, scale and position a back buffer for the layer.

#### Parameters

resolution | {Number} The resolution to transition to.

### createBackBuffer

> createBackBuffer: function()

Create a back buffer.

#### Returns

{DOMElement} The DOM element for the back buffer, undefined if the grid isn’t initialized yet.

### removeBackBuffer

> removeBackBuffer: function()

Remove back buffer from DOM.

### moveByPx

> moveByPx: function( | dx,
> | dy | )

Move the layer based on pixel vector.

#### Parameters

dx | {Number}
dy | {Number}

### initSingleTile

> initSingleTile: function( | bounds | )

#### Parameters

bounds | {OpenLayers.Bounds}

### calculateGridLayout

> calculateGridLayout: function( | bounds,
> | origin,
> | resolution | )

Generate parameters for the grid layout.

#### Parameters

bounds | {<OpenLayers.Bound>|Object} OpenLayers.Bounds or an object with a ‘left’ and ‘top’ properties.
origin | {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an object with a ‘lon’ and ‘lat’ properties.
resolution | {Number}

#### Returns

{Object} Object containing properties tilelon, tilelat, startcol, startrow

### getTileOrigin

> getTileOrigin: function()

Determine the origin for aligning the grid of tiles. If a <tileOrigin> property is supplied, that will be returned. Otherwise, the origin will be derived from the layer’s <maxExtent> property. In this case, the tile origin will be the corner of the <maxExtent> given by the tileOriginCorner property.

#### Returns

{OpenLayers.LonLat} The tile origin.

### getTileBoundsForGridIndex

> getTileBoundsForGridIndex: function( | row,
> | col | )

#### Parameters

row | {Number} The row of the grid
col | {Number} The column of the grid

#### Returns

{OpenLayers.Bounds} The bounds for the tile at (row, col)

### initGriddedTiles

> initGriddedTiles:function( | bounds | )

#### Parameters

bounds | {OpenLayers.Bounds}

### getMaxExtent

> getMaxExtent: function()

Get this layer’s maximum extent. (Implemented as a getter for potential specific implementations in sub-classes.)

#### Returns

{OpenLayers.Bounds}

### 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 tiles.

#### 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}

### moveGriddedTiles

> moveGriddedTiles: function()

### shiftRow

> shiftRow: function( | prepend,
> | tileSize | )

Shifty grid work

#### Parameters

prepend | {Boolean} if true, prepend to beginning. if false, then append to end
tileSize | {Object} rendered tile size; object with w and h properties

### shiftColumn

> shiftColumn: function( | prepend,
> | tileSize | )

Shift grid work in the other dimension

#### Parameters

prepend | {Boolean} if true, prepend to beginning. if false, then append to end
tileSize | {Object} rendered tile size; object with w and h properties

### removeExcessTiles

> removeExcessTiles: function( | rows,
> | columns | )

When the size of the map or the buffer changes, we may need to remove some excess rows and columns.

#### Parameters

rows | {Integer} Maximum number of rows we want our grid to have.
columns | {Integer} Maximum number of columns we want our grid to have.

### onMapResize

> onMapResize: function()

For singleTile layers, this will set a new tile size according to the dimensions of the map pane.

## OpenLayers.Layer.XYZ

The XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.

#### Inherits from

- OpenLayers.Layer.Grid

Summary

Functions |
OpenLayers.Layer.XYZ |
getURL |
getXYZ | Calculates x, y and z for the given bounds.

### Functions

### OpenLayers.Layer.XYZ

#### Parameters

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

### getURL

> getURL: function ( | bounds | )

#### Parameters

bounds | {OpenLayers.Bounds}

#### Returns

{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters

### getXYZ

> getXYZ: function( | bounds | )

Calculates x, y and z for the given bounds.

#### Parameters

bounds | {OpenLayers.Bounds}

#### Returns

{Object} | an object with x, y and z properties.

## OpenLayers.Layer.OSM

This layer allows accessing OpenStreetMap tiles. By default the OpenStreetMap hosted tile.openstreetmap.org Mapnik tileset is used. If you wish to use a different layer instead, you need to provide a different URL to the constructor. Here’s an example for using OpenCycleMap:

>     new OpenLayers.Layer.OSM("OpenCycleMap",
>       ["http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
>        "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
>        "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"]);

#### Inherits from

- OpenLayers.Layer.XYZ

Summary

Properties |
attribution | {String} The layer attribution.
sphericalMercator | {Boolean}
wrapDateLine | {Boolean}
Functions |
OpenLayers.Layer.OSM |
clone |

### Properties

### attribution

{String} The layer attribution.

### sphericalMercator

{Boolean}

### wrapDateLine

{Boolean}

### Functions

### OpenLayers.Layer.OSM

#### Parameters

name | {String} The layer name.
url | {String} The tileset URL scheme.
options | {Object} Configuration options for the layer. Any inherited layer option can be set in this object (e.g. <OpenLayers.Layer.Grid.buffer>).

### clone

> clone: function( | obj | )

## OpenLayers.Renderer

This is the base class for all renderers.

This is based on a merger code written by Paul Spencer and Bertil Chapuis. It is largely composed of virtual functions that are to be implemented in technology-specific subclasses, but there is some generic code too.

The functions that are implemented here merely deal with the maintenance of the size and extent variables, as well as the cached ‘resolution’ value.

A note to the user that all subclasses should use getResolution() instead of directly accessing this.resolution in order to correctly use the cacheing system.

Summary

Properties |
container | {DOMElement}
root | {DOMElement}
extent | {OpenLayers.Bounds}
locked | {Boolean} If the renderer is currently in a state where many things are changing, the ‘locked’ property is set to true.
size | {OpenLayers.Size}
resolution | {Float} cache of current map resolution
map | {OpenLayers.Map} Reference to the map -- this is set in Vector’s setMap()
featureDx | {Number} Feature offset in x direction.
Functions |
OpenLayers.Renderer |
setExtent | Set the visible part of the layer.
setSize | Sets the size of the drawing surface.
getResolution | Uses cached copy of resolution if available to minimize computing
drawFeature | Draw the feature.
calculateFeatureDx | {Number} Calculates the feature offset in x direction.
drawGeometry | Draw a geometry.
drawText | Function for drawing text labels.
removeText | Function for removing text labels.
clear | Clear all vectors from the renderer.
getFeatureIdFromEvent | Returns a feature id from an event on the renderer.
eraseFeatures | This is called by the layer to erase features
eraseGeometry | Remove a geometry from the renderer (by id).
moveRoot | moves this renderer’s root to a (different) renderer.
getRenderLayerId | Gets the layer that this renderer’s output appears on.
applyDefaultSymbolizer |
Constants |
OpenLayers.Renderer.defaultSymbolizer | {Object} Properties from this symbolizer will be applied to symbolizers with missing properties.
OpenLayers.Renderer.symbol | Coordinate arrays for well known (named) symbols.

### Properties

### container

{DOMElement}

### root

{DOMElement}

### extent

{OpenLayers.Bounds}

### locked

{Boolean} If the renderer is currently in a state where many things are changing, the ‘locked’ property is set to true. This means that renderers can expect at least one more drawFeature event to be called with the ‘locked’ property set to ‘true’: In some renderers, this might make sense to use as a ‘only update local information’ flag.

### size

{OpenLayers.Size}

### resolution

{Float} cache of current map resolution

### map

{OpenLayers.Map} Reference to the map -- this is set in Vector’s setMap()

### featureDx

{Number} Feature offset in x direction. Will be calculated for and applied to the current feature while rendering (see <calculateFeatureDx>).

### Functions

### OpenLayers.Renderer

#### Parameters

containerID | {String}
options | {Object} options for this renderer. See sublcasses for supported options.

### setExtent

> setExtent: function( | extent,
> | resolutionChanged | )

Set the visible part of the layer.

Resolution has probably changed, so we nullify the resolution cache (this.resolution) -- this way it will be re-computed when next it is needed. We nullify the resolution cache (this.resolution) if resolutionChanged is set to true - this way it will be re-computed on the next getResolution() request.

#### Parameters

extent | {OpenLayers.Bounds}
resolutionChanged | {Boolean}

#### Returns

{Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn. False otherwise.

### setSize

> setSize: function( | size | )

Sets the size of the drawing surface.

Resolution has probably changed, so we nullify the resolution cache (this.resolution) -- this way it will be re-computed when next it is needed.

#### Parameters

size | {OpenLayers.Size}

### getResolution

> getResolution: function()

Uses cached copy of resolution if available to minimize computing

#### Returns

{Float} The current map’s resolution

### 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

### calculateFeatureDx

> calculateFeatureDx: function( | bounds,
> | worldBounds | )

{Number} Calculates the feature offset in x direction. Looking at the center of the feature bounds and the renderer extent, we calculate how many world widths the two are away from each other. This distance is used to shift the feature as close as possible to the center of the current enderer extent, which ensures that the feature is visible in the current viewport.

#### Parameters

bounds | {OpenLayers.Bounds} Bounds of the feature
worldBounds | {OpenLayers.Bounds} Bounds of the world

### drawGeometry

> drawGeometry: function( | geometry,
> | style,
> | featureId | )

Draw a geometry. This should only be called from the renderer itself. Use layer.drawFeature() from outside the renderer. virtual function

#### Parameters

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

### drawText

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

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

#### Parameters

featureId | {String} style -
location | {OpenLayers.Geometry.Point}

### removeText

> removeText: function( | featureId | )

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

#### Parameters

featureId | {String}

### clear

> clear: function()

Clear all vectors from the renderer. virtual function.

### getFeatureIdFromEvent

> getFeatureIdFromEvent: function( | evt | )

Returns a feature id from an event on the renderer. How this happens is specific to the renderer. This should be called from layer.getFeatureFromEvent(). Virtual function.

#### Parameters

evt | {OpenLayers.Event}

#### Returns

{String} A feature id or undefined.

### eraseFeatures

> eraseFeatures: function( | features | )

This is called by the layer to erase features

#### Parameters

features | {Array(OpenLayers.Feature.Vector)}

### eraseGeometry

> eraseGeometry: function( | geometry,
> | featureId | )

Remove a geometry from the renderer (by id). virtual function.

#### Parameters

geometry | {OpenLayers.Geometry}
featureId | {String}

### moveRoot

> moveRoot: function( | renderer | )

moves this renderer’s root to a (different) renderer. To be implemented by subclasses that require a common renderer root for feature selection.

#### Parameters

renderer | {OpenLayers.Renderer} target renderer for the moved root

### getRenderLayerId

> getRenderLayerId: function()

Gets the layer that this renderer’s output appears on. If moveRoot was used, this will be different from the id of the layer containing the features rendered by this renderer.

#### Returns

{String} the id of the output layer.

### applyDefaultSymbolizer

> applyDefaultSymbolizer: function( | symbolizer | )

#### Parameters

symbolizer | {Object}

#### Returns

{Object}

### Constants

### OpenLayers.Renderer.defaultSymbolizer

{Object} Properties from this symbolizer will be applied to symbolizers with missing properties. This can also be used to set a global symbolizer default in OpenLayers. To be SLD 1.x compliant, add the following code before rendering any vector features:

>     OpenLayers.Renderer.defaultSymbolizer = {
>         fillColor: "#808080",
>         fillOpacity: 1,
>         strokeColor: "#000000",
>         strokeOpacity: 1,
>         strokeWidth: 1,
>         pointRadius: 3,
>         graphicName: "square"
>     };

### OpenLayers.Renderer.symbol

Coordinate arrays for well known (named) symbols.

## OpenLayers.Renderer.Canvas

A renderer based on the 2D ‘canvas’ drawing element.

#### Inherits

- OpenLayers.Renderer

Summary

Properties |
hitOverflow | {Number} The method for converting feature identifiers to color values supports 16777215 sequential values.
canvas | {Canvas} The canvas context object.
features | {Object} Internal object of feature/style pairs for use in redrawing the layer.
pendingRedraw | {Boolean} The renderer needs a redraw call to render features added while the renderer was locked.
cachedSymbolBounds | {Object} Internal cache of calculated symbol extents.
Functions |
OpenLayers.Renderer.Canvas |
setExtent | Set the visible part of the layer.
eraseGeometry | Erase a geometry from the renderer.
setSize | Sets the size of the drawing surface.
drawFeature | Draw the feature.
drawGeometry | Used when looping (in redraw) over the features; draws the canvas.
drawExternalGraphic | Called to draw External graphics.
drawNamedSymbol | Called to draw Well Known Graphic Symbol Name.
setCanvasStyle | Prepare the canvas for drawing by setting various global settings.
featureIdToHex | Convert a feature ID string into an RGB hex string.
setHitContextStyle | Prepare the hit canvas for drawing by setting various global settings.
drawPoint | 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.
renderPath | Render a path with stroke and optional fill.
drawPolygon | This method is only called by the renderer itself.
drawText | This method is only called by the renderer itself.
getLocalXY | transform geographic xy into pixel xy
clear | Clear all vectors from the renderer.
getFeatureIdFromEvent | Returns a feature id from an event on the renderer.
eraseFeatures | This is called by the layer to erase features; removes the feature from the list, then redraws the layer.
redraw | The real ‘meat’ of the function: any time things have changed, redraw() can be called to loop over all the data and (you guessed it) redraw it.
Constants |
OpenLayers.Renderer.Canvas.LABEL_ALIGN | {Object}
OpenLayers.Renderer.Canvas.LABEL_FACTOR | {Object}
OpenLayers.Renderer.Canvas.drawImageScaleFactor | {Number} Scale factor to apply to the canvas drawImage arguments.

### Properties

### hitOverflow

{Number} The method for converting feature identifiers to color values supports 16777215 sequential values. Two features cannot be predictably detected if their identifiers differ by more than this value. The hitOverflow allows for bigger numbers (but the difference in values is still limited).

### canvas

{Canvas} The canvas context object.

### features

{Object} Internal object of feature/style pairs for use in redrawing the layer.

### pendingRedraw

{Boolean} The renderer needs a redraw call to render features added while the renderer was locked.

### cachedSymbolBounds

{Object} Internal cache of calculated symbol extents.

### Functions

### OpenLayers.Renderer.Canvas

#### Parameters

containerID | {String}
options | {Object} Optional properties to be set on the renderer.

### setExtent

> setExtent: function()

Set the visible part of the layer.

#### Parameters

extent | {OpenLayers.Bounds}
resolutionChanged | {Boolean}

#### Returns

{Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn. False otherwise.

### eraseGeometry

> eraseGeometry: function( | geometry,
> | featureId | )

Erase a geometry from the renderer. Because the Canvas renderer has ‘memory’ of the features that it has drawn, we have to remove the feature so it doesn’t redraw.

#### Parameters

geometry | {OpenLayers.Geometry}
featureId | {String}

### setSize

> setSize: function( | size | )

Sets the size of the drawing surface.

Once the size is updated, redraw the canvas.

#### Parameters

size | {OpenLayers.Size}

### drawFeature

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

Draw the feature. Stores the feature in the features list, then redraws the layer.

#### Parameters

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

#### Returns

{Boolean} The feature has been drawn completely. If the feature has no geometry, undefined will be returned. If the feature is not rendered for other reasons, false will be returned.

### drawGeometry

> drawGeometry: function( | geometry,
> | style,
> | featureId | )

Used when looping (in redraw) over the features; draws the canvas.

#### Parameters

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

### drawExternalGraphic

> drawExternalGraphic: function( | geometry,
> | style,
> | featureId | )

Called to draw External graphics.

#### Parameters

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

### drawNamedSymbol

> drawNamedSymbol: function( | geometry,
> | style,
> | featureId | )

Called to draw Well Known Graphic Symbol Name. This method is only called by the renderer itself.

#### Parameters

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

### setCanvasStyle

> setCanvasStyle: function( | type,
> | style | )

Prepare the canvas for drawing by setting various global settings.

#### Parameters

type | {String} one of ‘stroke’, ‘fill’, or ‘reset’
style | {Object} Symbolizer hash

### featureIdToHex

> featureIdToHex: function( | featureId | )

Convert a feature ID string into an RGB hex string.

#### Parameters

featureId | {String} Feature id

#### Returns

{String} RGB hex string.

### setHitContextStyle

> setHitContextStyle: function( | type,
> | featureId,
> | symbolizer,
> | strokeScaling | )

Prepare the hit canvas for drawing by setting various global settings.

#### Parameters

type | {String} one of ‘stroke’, ‘fill’, or ‘reset’
featureId | {String} The feature id.
symbolizer | {<OpenLayers.Symbolizer>} The symbolizer.

### drawPoint

> drawPoint: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

#### Parameters

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

### drawLineString

> drawLineString: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

#### Parameters

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

### drawLinearRing

> drawLinearRing: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

#### Parameters

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

### renderPath

> renderPath: function( | context,
> | geometry,
> | style,
> | featureId,
> | type | )

Render a path with stroke and optional fill.

### drawPolygon

> drawPolygon: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

#### Parameters

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

### drawText

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

This method is only called by the renderer itself.

#### Parameters

location | {<OpenLayers.Point>}
style | {Object}

### getLocalXY

> getLocalXY: function( | point | )

transform geographic xy into pixel xy

#### Parameters

point | {OpenLayers.Geometry.Point}

### clear

> clear: function()

Clear all vectors from the renderer.

### getFeatureIdFromEvent

> getFeatureIdFromEvent: function( | evt | )

Returns a feature id from an event on the renderer.

#### Parameters

evt | {OpenLayers.Event}

#### Returns

{<OpenLayers.Feature.Vector} A feature or undefined. This method returns a feature instead of a feature id to avoid an unnecessary lookup on the layer.

### eraseFeatures

> eraseFeatures: function( | features | )

This is called by the layer to erase features; removes the feature from the list, then redraws the layer.

#### Parameters

features | {Array(OpenLayers.Feature.Vector)}

### redraw

> redraw: function()

The real ‘meat’ of the function: any time things have changed, redraw() can be called to loop over all the data and (you guessed it) redraw it. Unlike Elements-based Renderers, we can’t interact with things once they’re drawn, to remove them, for example, so instead we have to just clear everything and draw from scratch.

### Constants

### OpenLayers.Renderer.Canvas.LABEL_ALIGN

{Object}

### OpenLayers.Renderer.Canvas.LABEL_FACTOR

{Object}

### OpenLayers.Renderer.Canvas.drawImageScaleFactor

{Number} Scale factor to apply to the canvas drawImage arguments. This is always 1 except for Android 2.1 devices, to work around http://code.google.com/p/android/issues/detail?id=5141.

## OpenLayers.Handler

Base class to construct a higher-level handler for event sequences. All handlers have activate and deactivate methods. In addition, they have methods named like browser events. When a handler is activated, any additional methods named like a browser event is registered as a listener for the corresponding event. When a handler is deactivated, those same methods are unregistered as event listeners.

Handlers also typically have a callbacks object with keys named like the abstracted events or event sequences that they are in charge of handling. The controls that wrap handlers define the methods that correspond to these abstract events - so instead of listening for individual browser events, they only listen for the abstract events defined by the handler.

Handlers are created by controls, which ultimately have the responsibility of making changes to the the state of the application. Handlers themselves may make temporary changes, but in general are expected to return the application in the same state that they found it.

Summary

Properties |
id | {String}
map | {OpenLayers.Map}
active | {Boolean}
evt | {Event} This property references the last event handled by the handler.
touch | {Boolean} Indicates the support of touch events.
Functions |
OpenLayers.Handler | Construct a handler.
setMap |
checkModifiers | Check the keyMask on the handler.
startTouch | Start touch events, this method must be called by subclasses in “touchstart” method.
callback | Trigger the control’s named callback with the given arguments
register | register an event on the map
unregister | unregister an event from the map
setEvent | With each registered browser event, the handler sets its own evt property.
destroy | Deconstruct the handler.
Constants |
OpenLayers.Handler.MOD_NONE | If set as the <keyMask>, checkModifiers returns false if any key is down.
OpenLayers.Handler.MOD_SHIFT | If set as the <keyMask>, checkModifiers returns false if Shift is down.
OpenLayers.Handler.MOD_CTRL | If set as the <keyMask>, checkModifiers returns false if Ctrl is down.
OpenLayers.Handler.MOD_ALT | If set as the <keyMask>, checkModifiers returns false if Alt is down.
OpenLayers.Handler.MOD_META | If set as the <keyMask>, checkModifiers returns false if Cmd is down.

### Properties

### id

{String}

### map

{OpenLayers.Map}

### active

{Boolean}

### evt

{Event} This property references the last event handled by the handler. Note that this property is not part of the stable API. Use of the evt property should be restricted to controls in the library or other applications that are willing to update with changes to the OpenLayers code.

### touch

{Boolean} Indicates the support of touch events. When touch events are started touch will be true and all mouse related listeners will do nothing.

### Functions

### OpenLayers.Handler

Construct a handler.

#### Parameters

control | {OpenLayers.Control} The control that initialized this handler. The control is assumed to have a valid map property; that map is used in the handler’s own setMap method. If a map property is present in the options argument it will be used instead.
callbacks | {Object} An object whose properties correspond to abstracted events or sequences of browser events. The values for these properties are functions defined by the control that get called by the handler.
options | {Object} An optional object whose properties will be set on the handler.

### setMap

> setMap: function ( | map | )

### checkModifiers

> checkModifiers: function ( | evt | )

Check the keyMask on the handler. If no <keyMask> is set, this always returns true. If a <keyMask> is set and it matches the combination of keys down on an event, this returns true.

#### Returns

{Boolean} The keyMask matches the keys down on an event.

### startTouch

> startTouch: function()

Start touch events, this method must be called by subclasses in “touchstart” method. When touch events are started touch will be true and all mouse related listeners will do nothing.

### callback

> callback: function ( | name,
> | args | )

Trigger the control’s named callback with the given arguments

#### Parameters

name | {String} The key for the callback that is one of the properties of the handler’s callbacks object.
args | {Array(*)} An array of arguments (any type) with which to call the callback (defined by the control).

### register

> register: function ( | name,
> | method | )

register an event on the map

### unregister

> unregister: function ( | name,
> | method | )

unregister an event from the map

### setEvent

> setEvent: function( | evt | )

With each registered browser event, the handler sets its own evt property. This property can be accessed by controls if needed to get more information about the event that the handler is processing.

This allows modifier keys on the event to be checked (alt, shift, ctrl, and meta cannot be checked with the keyboard handler). For a control to determine which modifier keys are associated with the event that a handler is currently processing, it should access (code)handler.evt.altKey || handler.evt.shiftKey || handler.evt.ctrlKey || handler.evt.metaKey(end).

#### Parameters

evt | {Event} The browser event.

### destroy

> destroy: function ()

Deconstruct the handler.

### Constants

### OpenLayers.Handler.MOD_NONE

If set as the <keyMask>, checkModifiers returns false if any key is down.

### OpenLayers.Handler.MOD_SHIFT

If set as the <keyMask>, checkModifiers returns false if Shift is down.

### OpenLayers.Handler.MOD_CTRL

If set as the <keyMask>, checkModifiers returns false if Ctrl is down.

### OpenLayers.Handler.MOD_ALT

If set as the <keyMask>, checkModifiers returns false if Alt is down.

### OpenLayers.Handler.MOD_META

If set as the <keyMask>, checkModifiers returns false if Cmd is down.

## OpenLayers.Handler.MouseWheel

Handler for wheel up/down events.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
wheelListener | {function}
interval | {Integer} In order to increase server performance, an interval (in milliseconds) can be set to reduce the number of up/down events called.
maxDelta | {Integer} Maximum delta to collect before breaking from the current interval.
delta | {Integer} When interval is set, delta collects the mousewheel z-deltas of the events that occur within the interval.
cumulative | {Boolean} When interval is set: true to collect all the mousewheel z-deltas, false to only record the delta direction (positive or negative)
Functions |
OpenLayers.Handler.MouseWheel |
destroy |
onWheelEvent | Catch the wheel event and handle it xbrowserly
wheelZoom | Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.
activate |
deactivate |

### Properties

### wheelListener

{function}

### interval

{Integer} In order to increase server performance, an interval (in milliseconds) can be set to reduce the number of up/down events called. If set, a new up/down event will not be set until the interval has passed. Defaults to 0, meaning no interval.

### maxDelta

{Integer} Maximum delta to collect before breaking from the current interval. In cumulative mode, this also limits the maximum delta returned from the handler. Default is Number.POSITIVE_INFINITY.

### delta

{Integer} When interval is set, delta collects the mousewheel z-deltas of the events that occur within the interval. See also the cumulative option

### cumulative

{Boolean} When interval is set: true to collect all the mousewheel z-deltas, false to only record the delta direction (positive or negative)

### Functions

### OpenLayers.Handler.MouseWheel

#### Parameters

control | {OpenLayers.Control}
callbacks | {Object} An object containing a single function to be called when the drag operation is finished. The callback should expect to recieve a single argument, the point geometry.
options | {Object}

### destroy

> destroy: function()

### onWheelEvent

> onWheelEvent: function( | e | )

Catch the wheel event and handle it xbrowserly

#### Parameters

e | {Event}

### wheelZoom

> wheelZoom: function( | e | )

Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.

#### Parameters

e | {Event}

### activate

> activate: function ( | evt | )

### deactivate

> deactivate: function ( | evt | )

## OpenLayers.Format.JSON

A parser to read/write JSON safely. Create a new instance with the OpenLayers.Format.JSON constructor.

#### Inherits from

- OpenLayers.Format

Summary

Properties |
level | {Integer} For “pretty” printing, this is incremented/decremented during serialization.
pretty | {Boolean} Serialize with extra whitespace for structure.
nativeJSON | {Boolean} Does the browser support native json?
Functions |
OpenLayers.Format.JSON | Create a new parser for JSON.
writeIndent | Output an indentation string depending on the indentation level.
writeNewline | Output a string representing a newline if in pretty printing mode.
writeSpace | Output a string representing a space if in pretty printing mode.
Properties |
serialize | Object with properties corresponding to the serializable data types.
Functions |
serialize.object | Transform an object into a JSON string.
serialize.array | Transform an array into a JSON string.
serialize.string | Transform a string into a JSON string.
serialize.number | Transform a number into a JSON string.
serialize.boolean | Transform a boolean into a JSON string.
serialize.object | Transform a date into a JSON string.

### Properties

### level

{Integer} For “pretty” printing, this is incremented/decremented during serialization.

### pretty

{Boolean} Serialize with extra whitespace for structure. This is set by the write method.

### nativeJSON

{Boolean} Does the browser support native json?

### Functions

### OpenLayers.Format.JSON

Create a new parser for JSON.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### writeIndent

> writeIndent: function()

Output an indentation string depending on the indentation level.

#### Returns

{String} An appropriate indentation string.

### writeNewline

> writeNewline: function()

Output a string representing a newline if in pretty printing mode.

#### Returns

{String} A string representing a new line.

### writeSpace

> writeSpace: function()

Output a string representing a space if in pretty printing mode.

#### Returns

{String} A space.

### Properties

### serialize

Object with properties corresponding to the serializable data types. Property values are functions that do the actual serializing.

### Functions

### serialize.object

Transform an object into a JSON string.

#### Parameters

object | {Object} The object to be serialized.

#### Returns

{String} A JSON string representing the object.

### serialize.array

Transform an array into a JSON string.

#### Parameters

array | {Array} The array to be serialized

#### Returns

{String} A JSON string representing the array.

### serialize.string

Transform a string into a JSON string.

#### Parameters

string | {String} The string to be serialized

#### Returns

{String} A JSON string representing the string.

### serialize.number

Transform a number into a JSON string.

#### Parameters

number | {Number} The number to be serialized.

#### Returns

{String} A JSON string representing the number.

### serialize.boolean

Transform a boolean into a JSON string.

#### Parameters

bool | {Boolean} The boolean to be serialized.

#### Returns

{String} A JSON string representing the boolean.

### serialize.object

Transform a date into a JSON string.

#### Parameters

date | {Date} The date to be serialized.

#### Returns

{String} A JSON string representing the date.

## OpenLayers.Format.GML.v2

Parses GML version 2.

#### Inherits from

- OpenLayers.Format.GML.Base

Summary

Properties and Functions |
schemaLocation | {String} Schema location for a particular minor version.
OpenLayers.Format.GML.v2 | Create a parser for GML v2.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
write |
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### Properties and Functions

### schemaLocation

{String} Schema location for a particular minor version.

### OpenLayers.Format.GML.v2

Create a parser for GML v2.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

#### Valid options properties

featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (required).
geometryName | {String} Geometry element name.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### write

> write: function( | features | )

#### Parameters

features | {Array(OpenLayers.Feature.Vector) | OpenLayers.Feature.Vector} An array of features or a single feature.

#### Returns

{String} Given an array of features, a doc with a gml:featureMembers element will be returned. Given a single feature, a doc with a gml:featureMember element will be returned.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

## OpenLayers.Format.Filter.v1_0_0

Write ogc:Filter version 1.0.0.

#### Inherits from

- OpenLayers.Format.GML.v2
- OpenLayers.Format.Filter.v1

Summary

Constants |
VERSION | {String} 1.0.0
Properties and Functions |
schemaLocation | {String} http://www.opengis.net/ogc/filter/1.0.0/filter.xsd
OpenLayers.Format.Filter.v1_0_0 | Instances of this class are not created directly.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
writeSpatial | Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.

### Constants

### VERSION

{String} 1.0.0

### Properties and Functions

### schemaLocation

{String} http://www.opengis.net/ogc/filter/1.0.0/filter.xsd

### OpenLayers.Format.Filter.v1_0_0

Instances of this class are not created directly. Use the OpenLayers.Format.Filter constructor instead.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### writeSpatial

> writeSpatial: function( | filter,
> | name | )

Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.

#### Parameters

filter | {OpenLayers.Filter.Spatial} The filter.
name | {String} Name of the generated XML element.

#### Returns

{DOMElement} The created XML element.

## OpenLayers.Format.WFST.v1_0_0

A format for creating WFS v1.0.0 transactions. Create a new instance with the OpenLayers.Format.WFST.v1_0_0 constructor.

#### Inherits from

- OpenLayers.Format.Filter.v1_0_0
- OpenLayers.Format.WFST.v1

Summary

Properties and Functions |
version | {String} WFS version number.
schemaLocations | {Object} Properties are namespace aliases, values are schema locations.
OpenLayers.Format.WFST.v1_0_0 | A class for parsing and generating WFS v1.0.0 transactions.
readNode | Shorthand for applying one of the named readers given the node namespace and local name.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
writers | As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

### Properties and Functions

### version

{String} WFS version number.

### schemaLocations

{Object} Properties are namespace aliases, values are schema locations.

### OpenLayers.Format.WFST.v1_0_0

A class for parsing and generating WFS v1.0.0 transactions.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Valid options properties

featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (optional).
featurePrefix | {String} Feature namespace alias (optional - only used if featureNS is provided). Default is ‘feature’.
geometryName | {String} Name of geometry attribute. Default is ‘the_geom’.

### readNode

> readNode: function( | node,
> | obj,
> | first | )

Shorthand for applying one of the named readers given the node namespace and local name. Readers take two args (node, obj) and generally extend or modify the second.

#### Parameters

node | {DOMElement} The node to be read (required).
obj | {Object} The object to be modified (optional).
first | {Boolean} Should be set to true for the first node read. This is usually the readNode call in the read method. Without this being set, auto-configured properties will stick on subsequent reads.

#### Returns

{Object} The input object, modified (or a new one if none was provided).

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### writers

As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.

## OpenLayers.ElementsIndexer

This class takes care of figuring out which order elements should be placed in the DOM based on given indexing methods.

Summary

Properties |
maxZIndex | {Integer} This is the largest-most z-index value for a node contained within the indexer.
order | {Array<String>} This is an array of node id’s stored in the order that they should show up on screen.
indices | {Object} This is a hash that maps node ids to their z-index value stored in the indexer.
compare | {Function} This is the function used to determine placement of of a new node within the indexer.
Functions |
determineZIndex | Determine the z-index for the current node if there isn’t one, and set the maximum value if we’ve found a new maximum.

### Properties

### maxZIndex

{Integer} This is the largest-most z-index value for a node contained within the indexer.

### order

{Array<String>} This is an array of node id’s stored in the order that they should show up on screen. Id’s higher up in the array (higher array index) represent nodes with higher z-indeces.

### indices

{Object} This is a hash that maps node ids to their z-index value stored in the indexer. This is done to make finding a nodes z-index value O(1).

### compare

{Function} This is the function used to determine placement of of a new node within the indexer. If null, this defaults to to the Z_ORDER_DRAWING_ORDER comparison method.

### Functions

### determineZIndex

> determineZIndex: function( | node | )

Determine the z-index for the current node if there isn’t one, and set the maximum value if we’ve found a new maximum.

#### Parameters

node | {DOMElement}

## OpenLayers.ElementsIndexer.IndexingMethods

These are the compare methods for figuring out where a new node should be placed within the indexer. These methods are very similar to general sorting methods in that they return -1, 0, and 1 to specify the direction in which new nodes fall in the ordering.

Summary

Functions |
Z_ORDER | This compare method is used by other comparison methods.

### Functions

### Z_ORDER

> Z_ORDER: function( | indexer,
> | newNode,
> | nextNode | )

This compare method is used by other comparison methods. It can be used individually for ordering, but is not recommended, because it doesn’t subscribe to drawing order.

#### Parameters

indexer | {OpenLayers.ElementsIndexer}
newNode | {DOMElement}
nextNode | {DOMElement}

#### Returns

{Integer}

## OpenLayers.Renderer.Elements

This is another virtual class in that it should never be instantiated by itself as a Renderer. It exists because there is tons of shared functionality between different vector libraries which use nodes/elements as a base for rendering vectors.

The highlevel bits of code that are implemented here are the adding and removing of geometries, which is essentially the same for any element-based renderer. The details of creating each node and drawing the paths are of course different, but the machinery is the same.

#### Inherits

- OpenLayers.Renderer

Summary

Properties |
rendererRoot | {DOMElement}
root | {DOMElement}
vectorRoot | {DOMElement}
textRoot | {DOMElement}
xmlns | {String}
xOffset | {Number} Offset to apply to the renderer viewport translation in x direction.
rightOfDateLine | {Boolean} Keeps track of the location of the map extent relative to the date line.
Indexer | {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer created upon initialization if the zIndexing or yOrdering options passed to this renderer’s constructor are set to true.
Constants |
BACKGROUND_ID_SUFFIX | {String}
LABEL_ID_SUFFIX | {String}
LABEL_OUTLINE_SUFFIX | {String}
Functions |
OpenLayers.Renderer.Elements |
destroy |
clear | Remove all the elements from the root
setExtent | Set the visible part of the layer.
getNodeType | This function is in charge of asking the specific renderer which type of node to create for the given geometry and style.
drawGeometry | Draw the geometry, creating new nodes, setting paths, setting style, setting featureId on the node.
redrawNode |
redrawBackgroundNode | Redraws the node using special ‘background’ style properties.
drawGeometryNode | Given a node, draw a geometry on the specified layer.
postDraw | Things that have do be done after the geometry node is appended to its parent node.
drawPoint | Virtual function for drawing Point Geometry.
drawLineString | Virtual function for drawing LineString Geometry.
drawLinearRing | Virtual function for drawing LinearRing Geometry.
drawPolygon | Virtual function for drawing Polygon Geometry.
drawRectangle | Virtual function for drawing Rectangle Geometry.
drawCircle | Virtual function for drawing Circle Geometry.
removeText | Removes a label
getFeatureIdFromEvent |
eraseGeometry | Erase a geometry from the renderer.
nodeFactory | Create new node of the specified type, with the (optional) specified id.
nodeTypeCompare |
createNode |
moveRoot | moves this renderer’s root to a different renderer.
getRenderLayerId | Gets the layer that this renderer’s output appears on.
isComplexSymbol | Determines if a symbol cannot be rendered using drawCircle

### Properties

### rendererRoot

{DOMElement}

### root

{DOMElement}

### vectorRoot

{DOMElement}

### textRoot

{DOMElement}

### xmlns

{String}

### xOffset

{Number} Offset to apply to the renderer viewport translation in x direction. If the renderer extent’s center is on the right of the dateline (i.e. exceeds the world bounds), we shift the viewport to the left by one world width. This avoids that features disappear from the map viewport. Because our dateline handling logic in other places ensures that extents crossing the dateline always have a center exceeding the world bounds on the left, we need this offset to make sure that the same is true for the renderer extent in pixel space as well.

### rightOfDateLine

{Boolean} Keeps track of the location of the map extent relative to the date line. The setExtent method compares this value (which is the one from the previous setExtent call) with the current position of the map extent relative to the date line and updates the xOffset when the extent has moved from one side of the date line to the other.

### Indexer

{<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer created upon initialization if the zIndexing or yOrdering options passed to this renderer’s constructor are set to true.

### Constants

### BACKGROUND_ID_SUFFIX

{String}

### LABEL_ID_SUFFIX

{String}

### LABEL_OUTLINE_SUFFIX

{String}

### Functions

### OpenLayers.Renderer.Elements

#### 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.

### destroy

> destroy: function()

### clear

> clear: function()

Remove all the elements from the root

### setExtent

> setExtent: function( | extent,
> | resolutionChanged | )

Set the visible part of the layer.

#### Parameters

extent | {OpenLayers.Bounds}
resolutionChanged | {Boolean}

#### Returns

{Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn. False otherwise.

### getNodeType

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

This function is in charge of asking the specific renderer which type of node to create for the given geometry and style. All geometries in an Elements-based renderer consist of one node and some attributes. We have the nodeFactory() function which creates a node for us, but it takes a ‘type’ as input, and that is precisely what this function tells us.

#### Parameters

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

#### Returns

{String} The corresponding node type for the specified geometry

### drawGeometry

> drawGeometry: function( | geometry,
> | style,
> | featureId | )

Draw the geometry, creating new nodes, setting paths, setting style, setting featureId on the node. This method should only be called by the renderer itself.

#### Parameters

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

#### Returns

{Boolean} true if the geometry has been drawn completely; null if incomplete; false otherwise

### redrawNode

> redrawNode: function( | id,
> | geometry,
> | style,
> | featureId | )

#### Parameters

id | {String}
geometry | {OpenLayers.Geometry}
style | {Object}
featureId | {String}

#### Returns

{Boolean} true if the complete geometry could be drawn, null if parts of the geometry could not be drawn, false otherwise

### redrawBackgroundNode

> redrawBackgroundNode: function( | id,
> | geometry,
> | style,
> | featureId | )

Redraws the node using special ‘background’ style properties. Basically just calls redrawNode(), but instead of directly using the ‘externalGraphic’, ‘graphicXOffset’, ‘graphicYOffset’, and ‘graphicZIndex’ properties directly from the specified ‘style’ parameter, we create a new style object and set those properties from the corresponding ‘background’-prefixed properties from specified ‘style’ parameter.

#### Parameters

id | {String}
geometry | {OpenLayers.Geometry}
style | {Object}
featureId | {String}

#### Returns

{Boolean} true if the complete geometry could be drawn, null if parts of the geometry could not be drawn, false otherwise

### drawGeometryNode

> drawGeometryNode: function( | node,
> | geometry,
> | style | )

Given a node, draw a geometry on the specified layer. node and geometry are required arguments, style is optional. This method is only called by the render itself.

#### Parameters

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

#### Returns

{Object} a hash with properties “node” (the drawn node) and “complete” (null if parts of the geometry could not be drawn, false if nothing could be drawn)

### postDraw

> postDraw: function( | node | )

Things that have do be done after the geometry node is appended to its parent node. To be overridden by subclasses.

#### Parameters

node | {DOMElement}

### drawPoint

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

Virtual function for drawing Point Geometry. Should be implemented by subclasses. 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

### drawLineString

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

Virtual function for drawing LineString Geometry. Should be implemented by subclasses. 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 | )

Virtual function for drawing LinearRing Geometry. Should be implemented by subclasses. 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 | )

Virtual function for drawing Polygon Geometry. Should be implemented by subclasses. 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 | )

Virtual function for drawing Rectangle Geometry. Should be implemented by subclasses. 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

### drawCircle

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

Virtual function for drawing Circle Geometry. Should be implemented by subclasses. 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 circle

### removeText

> removeText: function( | featureId | )

Removes a label

#### Parameters

featureId | {String}

### getFeatureIdFromEvent

> getFeatureIdFromEvent: function( | evt | )

#### Parameters

evt | {Object} An OpenLayers.Event object

#### Returns

{String} A feature id or undefined.

### eraseGeometry

> eraseGeometry: function( | geometry,
> | featureId | )

Erase a geometry from the renderer. In the case of a multi-geometry, we cycle through and recurse on ourselves. Otherwise, we look for a node with the geometry.id, destroy its geometry, and remove it from the DOM.

#### Parameters

geometry | {OpenLayers.Geometry}
featureId | {String}

### nodeFactory

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

Create new node of the specified type, with the (optional) specified id.

If node already exists with same ID and a different type, we remove it and then call ourselves again to recreate it.

#### Parameters

id | {String}
type | {String} type Kind of node to draw.

#### Returns

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

### nodeTypeCompare

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

#### Parameters

node | {DOMElement}
type | {String} Kind of node

#### Returns

{Boolean} Whether or not the specified node is of the specified type This function must be overridden by subclasses.

### 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. This function must be overridden by subclasses.

### moveRoot

> moveRoot: function( | renderer | )

moves this renderer’s root to a different renderer.

#### Parameters

renderer | {OpenLayers.Renderer} target renderer for the moved root

### getRenderLayerId

> getRenderLayerId: function()

Gets the layer that this renderer’s output appears on. If moveRoot was used, this will be different from the id of the layer containing the features rendered by this renderer.

#### Returns

{String} the id of the output layer.

### isComplexSymbol

> isComplexSymbol: function( | graphicName | )

Determines if a symbol cannot be rendered using drawCircle

#### Parameters

graphicName | {String}

Returns {Boolean} true if the symbol is complex, false if not

## OpenLayers.Strategy.Fixed

A simple strategy that requests features once and never requests new data.

#### Inherits from

- OpenLayers.Strategy

Summary

Functions |
OpenLayers.Strategy.Fixed | Create a new Fixed strategy.
activate | Activate the strategy: load data or add listener to load when visible
deactivate | Deactivate the strategy.
load | Tells protocol to load data and unhooks the visibilitychanged event
merge | Add all features to the layer.

### Functions

### OpenLayers.Strategy.Fixed

Create a new Fixed strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### activate

> activate: function()

Activate the strategy: load data or add listener to load when visible

#### Returns

{Boolean} True if the strategy was successfully activated or false if the strategy was already active.

### deactivate

> deactivate: function()

Deactivate the strategy. Undo what is done in activate.

#### Returns

{Boolean} The strategy was successfully deactivated.

### load

> load: function( | options | )

Tells protocol to load data and unhooks the visibilitychanged event

#### Parameters

options | {Object} options to pass to protocol read.

### merge

> merge: function( | resp | )

Add all features to the layer. If the layer projection differs from the map projection, features will be transformed from the layer projection to the map projection.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object passed by the protocol.

## OpenLayers.Format.WFSCapabilities

Read WFS Capabilities.

#### Inherits from

- OpenLayers.Format.XML.VersionedOGC

Summary

Functions |
OpenLayers.Format.WFSCapabilities | Create a new parser for WFS capabilities.

### Functions

### OpenLayers.Format.WFSCapabilities

Create a new parser for WFS capabilities.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

## OpenLayers.Format.WFSCapabilities.v1

Abstract class not to be instantiated directly.

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix |
OpenLayers.Format.WFSCapabilities.v1_1 | Create an instance of one of the subclasses.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.

### Properties and Functions

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### defaultPrefix

### OpenLayers.Format.WFSCapabilities.v1_1

Create an instance of one of the subclasses.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

## OpenLayers.Format.WFSCapabilities/v1_1_0

Read WFS Capabilities version 1.1.0.

#### Inherits from

- OpenLayers.Format.WFSCapabilities

Summary

Properties and Functions |
regExes | Compiled regular expressions for manipulating strings.
OpenLayers.Format.WFSCapabilities.v1_1_0 | Create a new parser for WFS capabilities version 1.1.0.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.

### Properties and Functions

### regExes

Compiled regular expressions for manipulating strings.

### OpenLayers.Format.WFSCapabilities.v1_1_0

Create a new parser for WFS capabilities version 1.1.0.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

## OpenLayers.Protocol

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

Summary

Properties |
format | {OpenLayers.Format} The format used by this protocol.
options | {Object} Any options sent to the constructor.
autoDestroy | {Boolean} The creator of the protocol can set autoDestroy to false to fully control when the protocol is destroyed.
defaultFilter | {OpenLayers.Filter} Optional default filter to read requests
Functions |
OpenLayers.Protocol | Abstract class for vector protocols.
mergeWithDefaultFilter | Merge filter passed to the read method with the default one
abort | Abort an ongoing request.
createCallback | Returns a function that applies the given public method with resp and options arguments.

### Properties

### format

{OpenLayers.Format} The format used by this protocol.

### options

{Object} Any options sent to the constructor.

### autoDestroy

{Boolean} The creator of the protocol can set autoDestroy to false to fully control when the protocol is destroyed. Defaults to true.

### defaultFilter

{OpenLayers.Filter} Optional default filter to read requests

### Functions

### OpenLayers.Protocol

Abstract class for vector protocols. Create instances of a subclass.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### mergeWithDefaultFilter

> mergeWithDefaultFilter: function( | filter | )

Merge filter passed to the read method with the default one

#### Parameters

filter | {OpenLayers.Filter}

### abort

> abort: function( | response | )

Abort an ongoing request.

#### Parameters

response | {OpenLayers.Protocol.Response}

### createCallback

> createCallback: function( | method,
> | response,
> | options | )

Returns a function that applies the given public method with resp and options arguments.

#### Parameters

method | {Function} The method to be applied by the callback.
response | {OpenLayers.Protocol.Response} The protocol response object.
options | {Object} Options sent to the protocol method

## OpenLayers.Protocol.Response

Protocols return Response objects to their users.

Summary

Properties |
code |
requestType | {String} The type of request this response corresponds to.
last |
features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features returned in the response by the server.
data | {Object} The data returned in the response by the server.
reqFeatures | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features provided by the user and placed in the request by the protocol.
priv |
error | {Object} The error object in case a service exception was encountered.
Functions |
OpenLayers.Protocol.Response |
success |

### Properties

### code

{Number} | OpenLayers.Protocol.Response.SUCCESS or OpenLayers.Protocol.Response.FAILURE

### requestType

{String} The type of request this response corresponds to. Either “create”, “read”, “update” or “delete”.

### last

{Boolean} | true if this is the last response expected in a commit, false otherwise, defaults to true.

### features

{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features returned in the response by the server. Depending on the protocol’s read payload, either features or data will be populated.

### data

{Object} The data returned in the response by the server. Depending on the protocol’s read payload, either features or data will be populated.

### reqFeatures

{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} The features provided by the user and placed in the request by the protocol.

### priv

### error

{Object} The error object in case a service exception was encountered.

### Functions

### OpenLayers.Protocol.Response

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### success

> success: function()

#### Returns

{Boolean} | true on success, false otherwise

## OpenLayers.Protocol.WFS

Used to create a versioned WFS protocol. Default version is 1.0.0.

#### Returns

{OpenLayers.Protocol} A WFS protocol of the given version.

#### Example

>     var protocol = new OpenLayers.Protocol.WFS({
>         version: "1.1.0",
>         url:  "http://demo.opengeo.org/geoserver/wfs",
>         featureType: "tasmania_roads",
>         featureNS: "http://www.openplans.org/topp",
>         geometryName: "the_geom"
>     });

See the protocols for specific WFS versions for more detail.

Summary

Functions |
fromWMSLayer | Convenience function to create a WFS protocol from a WMS layer.
Constants |
OpenLayers.Protocol.WFS.DEFAULTS |

### Functions

### fromWMSLayer

> OpenLayers.Protocol.WFS.fromWMSLayer = function( | layer,
> | options | )

Convenience function to create a WFS protocol from a WMS layer. This makes the assumption that a WFS requests can be issued at the same URL as WMS requests and that a WFS featureType exists with the same name as the WMS layer.

This function is designed to auto-configure <url>, <featureType>, <featurePrefix> and <srsName> for WFS <version> 1.1.0. Note that srsName matching with the WMS layer will not work with WFS 1.0.0.

#### Parameters

layer | {OpenLayers.Layer.WMS} WMS layer that has a matching WFS FeatureType at the same server url with the same typename.
options | {Object} Default properties to be set on the protocol.

#### Returns

{OpenLayers.Protocol.WFS}

### Constants

### OpenLayers.Protocol.WFS.DEFAULTS

## OpenLayers.Layer.Markers

#### Inherits from

- OpenLayers.Layer

Summary

Properties |
drawn | {Boolean} internal state of drawing.
Functions |
OpenLayers.Layer.Markers | Create a Markers layer.
moveTo |
clearMarkers | This method removes all markers from a layer.
drawMarker | Calculate the pixel location for the marker, create it, and add it to the layer’s div

### Properties

### drawn

{Boolean} internal state of drawing. This is a workaround for the fact that the map does not call moveTo with a zoomChanged when the map is first starting up. This lets us catch the case where we have never drawn the layer, and draw it even if the zoom hasn’t changed.

### Functions

### OpenLayers.Layer.Markers

Create a Markers layer.

#### Parameters

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

### moveTo

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

#### Parameters

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

### clearMarkers

> clearMarkers: function()

This method removes all markers from a layer. The markers are not destroyed by this function, but are removed from the list of markers.

### drawMarker

> drawMarker: function( | marker | )

Calculate the pixel location for the marker, create it, and add it to the layer’s div

#### Parameters

marker | {OpenLayers.Marker}

## OpenLayers.Protocol.WFS.v1

Abstract class for for v1.0.0 and v1.1.0 protocol.

#### Inherits from

- OpenLayers.Protocol

Summary

Properties |
version | {String} WFS version number.
srsName | {String} Name of spatial reference system.
featureType | {String} Local feature typeName.
featureNS | {String} Feature namespace.
geometryName | {String} Name of the geometry attribute for features.
maxFeatures | {Integer} Optional maximum number of features to retrieve.
schema | {String} Optional schema location that will be included in the schemaLocation attribute value.
featurePrefix | {String} Namespace alias for feature type.
formatOptions | {Object} Optional options for the format.
readFormat | {OpenLayers.Format} For WFS requests it is possible to get a different output format than GML.
readOptions | {Object} Optional object to pass to format’s read.
Functions |
OpenLayers.Protocol.WFS | A class for giving layers WFS protocol.
handleRead | Deal with response from the read request.
parseResponse | Read HTTP response body and return features
commit | Given a list of feature, assemble a batch request for update, create, and delete transactions.
handleCommit | Called when the commit request returns.
filterDelete | Send a request that deletes all features by their filter.
abort | Abort an ongoing request, the response object passed to this method must come from this protocol (as a result of a read, or commit operation).

### Properties

### version

{String} WFS version number.

### srsName

{String} Name of spatial reference system. Default is “EPSG:4326”.

### featureType

{String} Local feature typeName.

### featureNS

{String} Feature namespace.

### geometryName

{String} Name of the geometry attribute for features. Default is “the_geom” for WFS version 1.0, and null for higher versions.

### maxFeatures

{Integer} Optional maximum number of features to retrieve.

### schema

{String} Optional schema location that will be included in the schemaLocation attribute value. Note that the feature type schema is required for a strict XML validator (on transactions with an insert for example), but is not required by the WFS specification (since the server is supposed to know about feature type schemas).

### featurePrefix

{String} Namespace alias for feature type. Default is “feature”.

### formatOptions

{Object} Optional options for the format. If a format is not provided, this property can be used to extend the default format options.

### readFormat

{OpenLayers.Format} For WFS requests it is possible to get a different output format than GML. In that case, we cannot parse the response with the default format (WFST) and we need a different format for reading.

### readOptions

{Object} Optional object to pass to format’s read.

### Functions

### OpenLayers.Protocol.WFS

A class for giving layers WFS protocol.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Valid options properties

url | {String} URL to send requests to (required).
featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (required, but can be autodetected during the first query if GML is used as readFormat and featurePrefix is provided and matches the prefix used by the server for this featureType).
featurePrefix | {String} Feature namespace alias (optional - only used for writing if featureNS is provided). Default is ‘feature’.
geometryName | {String} Name of geometry attribute. The default is ‘the_geom’ for WFS version 1.0, and null for higher versions. If null, it will be set to the name of the first geometry found in the first read operation.
multi | {Boolean} If set to true, geometries will be casted to Multi geometries before they are written in a transaction. No casting will be done when reading features.

### handleRead

> handleRead: function( | response,
> | options | )

Deal with response from the read request.

#### Parameters

response | {OpenLayers.Protocol.Response} The response object to pass to the user callback.
options | {Object} The user options passed to the read call.

### parseResponse

> parseResponse: function( | request,
> | options | )

Read HTTP response body and return features

#### Parameters

request | {XMLHttpRequest} The request object
options | {Object} Optional object to pass to format’s read

#### Returns

{Object} or {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} An object with a features property, an array of features or a single feature.

### commit

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

Given a list of feature, assemble a batch request for update, create, and delete transactions. A commit call on the prototype amounts to writing a WFS transaction - so the write method on the format is used.

#### Parameters

features | {Array(OpenLayers.Feature.Vector)}
options | {Object}

#### Valid options properties

nativeElements | {Array({Object})} Array of objects with information for writing out <Native> elements, these objects have vendorId, safeToIgnore and value properties. The <Native> element is intended to allow access to vendor specific capabilities of any particular web feature server or datastore.

#### Returns

{OpenLayers.Protocol.Response} A response object with a features property containing any insertIds and a priv property referencing the XMLHttpRequest object.

### handleCommit

> handleCommit: function( | response,
> | options | )

Called when the commit request returns.

#### Parameters

response | {OpenLayers.Protocol.Response} The response object to pass to the user callback.
options | {Object} The user options passed to the commit call.

### filterDelete

> filterDelete: function( | filter,
> | options | )

Send a request that deletes all features by their filter.

#### Parameters

filter | {OpenLayers.Filter} filter

### abort

> abort: function( | response | )

Abort an ongoing request, the response object passed to this method must come from this protocol (as a result of a read, or commit operation).

#### Parameters

response | {OpenLayers.Protocol.Response}

## OpenLayers.Handler.Point

Handler to draw a point on the map. Point is displayed on activation, moves on mouse move, and is finished on mouse up. The handler triggers callbacks for ‘done’, ‘cancel’, and ‘modify’. The modify callback is called with each change in the sketch and will receive the latest point drawn. Create a new instance with the OpenLayers.Handler.Point constructor.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
point | {OpenLayers.Feature.Vector} The currently drawn point
layer | {OpenLayers.Layer.Vector} The temporary drawing layer
mouseDown | {Boolean} The mouse is down
stoppedDown | {Boolean} Indicate whether the last mousedown stopped the event propagation.
lastDown | {OpenLayers.Pixel} Location of the last mouse down
lastUp | {OpenLayers.Pixel}
layerOptions | {Object} Any optional properties to be set on the sketch layer.
lastTouchPx | {OpenLayers.Pixel} The last pixel used to know the distance between two touches (for double touch).
Functions |
OpenLayers.Handler.Point | Create a new point handler.
createFeature | Add temporary features
destroyFeature | Destroy the temporary geometries
destroyPersistedFeature | Destroy the persisted feature.
finalize | Finish the geometry and call the “done” callback.
click | Handle clicks.
dblclick | Handle double-clicks.
modifyFeature | Modify the existing geometry given a pixel location.
drawFeature | Render features on the temporary layer.
getGeometry | Return the sketch geometry.
geometryClone | Return a clone of the relevant geometry.
mousedown | Handle mousedown.
touchstart | Handle touchstart.
mousemove | Handle mousemove.
touchmove | Handle touchmove.
mouseup | Handle mouseup.
touchend | Handle touchend.
down | Handle mousedown and touchstart.
move | Handle mousemove and touchmove.
up | Handle mouseup and touchend.
mouseout | Handle mouse out.
passesTolerance | Determine whether the event is within the optional pixel tolerance.

### Properties

### point

{OpenLayers.Feature.Vector} The currently drawn point

### layer

{OpenLayers.Layer.Vector} The temporary drawing layer

### mouseDown

{Boolean} The mouse is down

### stoppedDown

{Boolean} Indicate whether the last mousedown stopped the event propagation.

### lastDown

{OpenLayers.Pixel} Location of the last mouse down

### lastUp

{OpenLayers.Pixel}

### layerOptions

{Object} Any optional properties to be set on the sketch layer.

### lastTouchPx

{OpenLayers.Pixel} The last pixel used to know the distance between two touches (for double touch).

### Functions

### OpenLayers.Handler.Point

Create a new point handler.

#### Parameters

control | {OpenLayers.Control} The control that owns this handler
callbacks | {Object} An object with a properties whose values are functions. Various callbacks described below.
options | {Object} An optional object with properties to be set on the handler

#### Named callbacks

create | Called when a sketch is first created. Callback called with the creation point geometry and sketch feature.
modify | Called with each move of a vertex with the vertex (point) geometry and the sketch feature.
done | Called when the point drawing is finished. The callback will recieve a single argument, the point geometry.
cancel | Called when the handler is deactivated while drawing. The cancel callback will receive a geometry.

### createFeature

> createFeature: function( | pixel | )

Add temporary features

#### Parameters

pixel | {OpenLayers.Pixel} A pixel location on the map.

### destroyFeature

> destroyFeature: function( | force | )

Destroy the temporary geometries

#### Parameters

force | {Boolean} Destroy even if persist is true.

### destroyPersistedFeature

> destroyPersistedFeature: function()

Destroy the persisted feature.

### finalize

> finalize: function( | cancel | )

Finish the geometry and call the “done” callback.

#### Parameters

cancel | {Boolean} Call cancel instead of done callback. Default is false.

### click

> click: function( | evt | )

Handle clicks. Clicks are stopped from propagating to other listeners on map.events or other dom elements.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### dblclick

> dblclick: function( | evt | )

Handle double-clicks. Double-clicks are stopped from propagating to other listeners on map.events or other dom elements.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### modifyFeature

> modifyFeature: function( | pixel | )

Modify the existing geometry given a pixel location.

#### Parameters

pixel | {OpenLayers.Pixel} A pixel location on the map.

### drawFeature

> drawFeature: function()

Render features on the temporary layer.

### getGeometry

> getGeometry: function()

Return the sketch geometry. If <multi> is true, this will return a multi-part geometry.

#### Returns

{OpenLayers.Geometry.Point}

### geometryClone

> geometryClone: function()

Return a clone of the relevant geometry.

#### Returns

{OpenLayers.Geometry}

### mousedown

> mousedown: function( | evt | )

Handle mousedown.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### touchstart

> touchstart: function( | evt | )

Handle touchstart.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### mousemove

> mousemove: function( | evt | )

Handle mousemove.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### touchmove

> touchmove: function( | evt | )

Handle touchmove.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### mouseup

> mouseup: function( | evt | )

Handle mouseup.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### touchend

> touchend: function( | evt | )

Handle touchend.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### down

> down: function( | evt | )

Handle mousedown and touchstart. Adjust the geometry and redraw. Return determines whether to propagate the event on the map.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### move

> move: function ( | evt | )

Handle mousemove and touchmove. Adjust the geometry and redraw. Return determines whether to propagate the event on the map.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### up

> up: function ( | evt | )

Handle mouseup and touchend. Send the latest point in the geometry to the control. Return determines whether to propagate the event on the map.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### mouseout

> mouseout: function( | evt | )

Handle mouse out. For better user experience reset mouseDown and stoppedDown when the mouse leaves the map viewport.

#### Parameters

evt | {Event} The browser event

### passesTolerance

> passesTolerance: function( | pixel1,
> | pixel2,
> | tolerance | )

Determine whether the event is within the optional pixel tolerance.

#### Returns

{Boolean} The event is within the pixel tolerance (if specified).

## OpenLayers.Handler.Path

Handler to draw a path on the map. Path is displayed on mouse down, moves on mouse move, and is finished on mouse up.

#### Inherits from

- OpenLayers.Handler.Point

Summary

Properties |
line | {OpenLayers.Feature.Vector}
doubleTouchTolerance | {Number} Maximum number of pixels between two touches for the gesture to be considered a “finalize feature” action.
freehand | {Boolean} In freehand mode, the handler starts the path on mouse down, adds a point for every mouse move, and finishes the path on mouse up.
freehandToggle | {String} If set, freehandToggle is checked on mouse events and will set the freehand mode to the opposite of this.freehand.
timerId | {Integer} The timer used to test the double touch.
redoStack | {Array} Stack containing points removed with undo.
Functions |
OpenLayers.Handler.Path | Create a new path hander
createFeature | Add temporary geometries
destroyFeature | Destroy temporary geometries
destroyPersistedFeature | Destroy the persisted feature.
removePoint | Destroy the temporary point.
addPoint | Add point to geometry.
insertXY | Insert a point in the current sketch given x & y coordinates.
insertDeltaXY | Insert a point given offsets from the previously inserted point.
insertDirectionLength | Insert a point in the current sketch given a direction and a length.
insertDeflectionLength | Insert a point in the current sketch given a deflection and a length.
getCurrentPointIndex | {Number} The index of the most recently drawn point.
undo | Remove the most recently added point in the sketch geometry.
redo | Reinsert the most recently removed point resulting from an undo call.
freehandMode | Determine whether to behave in freehand mode or not.
modifyFeature | Modify the existing geometry given the new point
drawFeature | Render geometries on the temporary layer.
getSketch | Return the sketch feature.
getGeometry | Return the sketch geometry.
touchstart | handle touchstart.
down | Handle mousedown and touchstart.
move | Handle mousemove and touchmove.
up | Handle mouseup and touchend.
dblclick | Handle double-clicks.

### Properties

### line

{OpenLayers.Feature.Vector}

### doubleTouchTolerance

{Number} Maximum number of pixels between two touches for the gesture to be considered a “finalize feature” action. Default is 20.

### freehand

{Boolean} In freehand mode, the handler starts the path on mouse down, adds a point for every mouse move, and finishes the path on mouse up. Outside of freehand mode, a point is added to the path on every mouse click and double-click finishes the path.

### freehandToggle

{String} If set, freehandToggle is checked on mouse events and will set the freehand mode to the opposite of this.freehand. To disallow toggling between freehand and non-freehand mode, set freehandToggle to null. Acceptable toggle values are ‘shiftKey’, ‘ctrlKey’, and ‘altKey’.

### timerId

{Integer} The timer used to test the double touch.

### redoStack

{Array} Stack containing points removed with undo.

### Functions

### OpenLayers.Handler.Path

Create a new path hander

#### Parameters

control | {OpenLayers.Control} The control that owns this handler
callbacks | {Object} An object with a properties whose values are functions. Various callbacks described below.
options | {Object} An optional object with properties to be set on the handler

#### Named callbacks

create | Called when a sketch is first created. Callback called with the creation point geometry and sketch feature.
modify | Called with each move of a vertex with the vertex (point) geometry and the sketch feature.
point | Called as each point is added. Receives the new point geometry.
done | Called when the point drawing is finished. The callback will recieve a single argument, the linestring geometry.
cancel | Called when the handler is deactivated while drawing. The cancel callback will receive a geometry.

### createFeature

> createFeature: function( | pixel | )

Add temporary geometries

#### Parameters

pixel | {OpenLayers.Pixel} The initial pixel location for the new feature.

### destroyFeature

> destroyFeature: function( | force | )

Destroy temporary geometries

#### Parameters

force | {Boolean} Destroy even if persist is true.

### destroyPersistedFeature

> destroyPersistedFeature: function()

Destroy the persisted feature.

### removePoint

> removePoint: function()

Destroy the temporary point.

### addPoint

> addPoint: function( | pixel | )

Add point to geometry. Send the point index to override the behavior of LinearRing that disregards adding duplicate points.

#### Parameters

pixel | {OpenLayers.Pixel} The pixel location for the new point.

### insertXY

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

Insert a point in the current sketch given x & y coordinates. The new point is inserted immediately before the most recently drawn point.

#### Parameters

x | {Number} The x-coordinate of the point.
y | {Number} The y-coordinate of the point.

### insertDeltaXY

> insertDeltaXY: function( | dx,
> | dy | )

Insert a point given offsets from the previously inserted point.

#### Parameters

dx | {Number} The x-coordinate offset of the point.
dy | {Number} The y-coordinate offset of the point.

### insertDirectionLength

> insertDirectionLength: function( | direction,
> | length | )

Insert a point in the current sketch given a direction and a length.

#### Parameters

direction | {Number} Degrees clockwise from the positive x-axis.
length | {Number} Distance from the previously drawn point.

### insertDeflectionLength

> insertDeflectionLength: function( | deflection,
> | length | )

Insert a point in the current sketch given a deflection and a length. The deflection should be degrees clockwise from the previously digitized segment.

#### Parameters

deflection | {Number} Degrees clockwise from the previous segment.
length | {Number} Distance from the previously drawn point.

### getCurrentPointIndex

> getCurrentPointIndex: function()

#### Returns

{Number} The index of the most recently drawn point.

### undo

> undo: function()

Remove the most recently added point in the sketch geometry.

#### Returns

{Boolean} A point was removed.

### redo

> redo: function()

Reinsert the most recently removed point resulting from an undo call. The undo stack is deleted whenever a point is added by other means.

#### Returns

{Boolean} A point was added.

### freehandMode

> freehandMode: function( | evt | )

Determine whether to behave in freehand mode or not.

#### Returns

{Boolean}

### modifyFeature

> modifyFeature: function( | pixel,
> | drawing | )

Modify the existing geometry given the new point

#### Parameters

pixel | {OpenLayers.Pixel} The updated pixel location for the latest point.
drawing | {Boolean} Indicate if we’re currently drawing.

### drawFeature

> drawFeature: function()

Render geometries on the temporary layer.

### getSketch

> getSketch: function()

Return the sketch feature.

#### Returns

{OpenLayers.Feature.Vector}

### getGeometry

> getGeometry: function()

Return the sketch geometry. If <multi> is true, this will return a multi-part geometry.

#### Returns

{OpenLayers.Geometry.LineString}

### touchstart

> touchstart: function( | evt | )

handle touchstart.

#### parameters

evt | {event} the browser event

#### returns

{boolean} allow event propagation

### down

> down: function( | evt | )

Handle mousedown and touchstart. Add a new point to the geometry and render it. Return determines whether to propagate the event on the map.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### move

> move: function ( | evt | )

Handle mousemove and touchmove. Adjust the geometry and redraw. Return determines whether to propagate the event on the map.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### up

> up: function ( | evt | )

Handle mouseup and touchend. Send the latest point in the geometry to the control. Return determines whether to propagate the event on the map.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

### dblclick

> dblclick: function( | evt | )

Handle double-clicks.

#### Parameters

evt | {Event} The browser event

#### Returns

{Boolean} Allow event propagation

## OpenLayers.Control

Controls affect the display or behavior of the map. They allow everything from panning and zooming to displaying a scale indicator. Controls by default are added to the map they are contained within however it is possible to add a control to an external div by passing the div in the options parameter.

#### Example

The following example shows how to add many of the common controls to a map.

>     var map = new OpenLayers.Map('map', { controls: [] });

>     map.addControl(new OpenLayers.Control.PanZoomBar());
>     map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
>     map.addControl(new OpenLayers.Control.Permalink());
>     map.addControl(new OpenLayers.Control.Permalink('permalink'));
>     map.addControl(new OpenLayers.Control.MousePosition());
>     map.addControl(new OpenLayers.Control.OverviewMap());
>     map.addControl(new OpenLayers.Control.KeyboardDefaults());

The next code fragment is a quick example of how to intercept shift-mouse click to display the extent of the bounding box dragged out by the user. Usually controls are not created in exactly this manner. See the source for a more complete example:

>     var control = new OpenLayers.Control();
>     OpenLayers.Util.extend(control, {
>         draw: function () {
>             // this Handler.Box will intercept the shift-mousedown
>             // before Control.MouseDefault gets to see it
>             this.box = new OpenLayers.Handler.Box( control,
>                 {"done": this.notice},
>                 {keyMask: OpenLayers.Handler.MOD_SHIFT});
>             this.box.activate();
>         },

>         notice: function (bounds) {
>             OpenLayers.Console.userError(bounds);
>         }
>     });
>     map.addControl(control);

Summary

Properties |
id | {String}
map | {OpenLayers.Map} this gets set in the addControl() function in OpenLayers.Map
allowSelection | {Boolean} By default, controls do not allow selection, because it may interfere with map dragging.
displayClass | {string} This property is used for CSS related to the drawing of the Control.
handlerOptions | {Object} Used to set non-default properties on the control’s handler
handler | {OpenLayers.Handler} null
Functions |
OpenLayers.Control | Create an OpenLayers Control.
destroy | The destroy method is used to perform any clean up before the control is dereferenced.
setMap | Set the map property for the control.
draw | The draw method is called when the control is ready to be displayed on the page.
moveTo | Sets the left and top style attributes to the passed in pixel coordinates.
Constants |
OpenLayers.Control.TYPE_BUTTON |
OpenLayers.Control.TYPE_TOGGLE |
OpenLayers.Control.TYPE_TOOL |

### Properties

### id

{String}

### map

{OpenLayers.Map} this gets set in the addControl() function in OpenLayers.Map

### allowSelection

{Boolean} By default, controls do not allow selection, because it may interfere with map dragging. If this is true, OpenLayers will not prevent selection of the control. Default is false.

### displayClass

{string} This property is used for CSS related to the drawing of the Control.

### handlerOptions

{Object} Used to set non-default properties on the control’s handler

### handler

{OpenLayers.Handler} null

### Functions

### OpenLayers.Control

Create an OpenLayers Control. The options passed as a parameter directly extend the control. For example passing the following:

>     var control = new OpenLayers.Control({div: myDiv});

Overrides the default div attribute value of null.

#### Parameters

options | {Object}

### destroy

> destroy: function ()

The destroy method is used to perform any clean up before the control is dereferenced. Typically this is where event listeners are removed to prevent memory leaks.

### setMap

> setMap: function( | map | )

Set the map property for the control. This is done through an accessor so that subclasses can override this and take special action once they have their map variable set.

#### Parameters

map | {OpenLayers.Map}

### draw

> draw: function ( | px | )

The draw method is called when the control is ready to be displayed on the page. If a div has not been created one is created. Controls with a visual component will almost always want to override this method to customize the look of control.

#### Parameters

px | {OpenLayers.Pixel} The top-left pixel position of the control or null.

#### Returns

{DOMElement} A reference to the DIV DOMElement containing the control

### moveTo

> moveTo: function ( | px | )

Sets the left and top style attributes to the passed in pixel coordinates.

#### Parameters

px | {OpenLayers.Pixel}

### Constants

### OpenLayers.Control.TYPE_BUTTON

### OpenLayers.Control.TYPE_TOGGLE

### OpenLayers.Control.TYPE_TOOL

## OpenLayers.Handler.Drag

The drag handler is used to deal with sequences of browser events related to dragging. The handler is used by controls that want to know when a drag sequence begins, when a drag is happening, and when it has finished.

Controls that use the drag handler typically construct it with callbacks for ‘down’, ‘move’, and ‘done’. Callbacks for these keys are called when the drag begins, with each move, and when the drag is done. In addition, controls can have callbacks keyed to ‘up’ and ‘out’ if they care to differentiate between the types of events that correspond with the end of a drag sequence. If no drag actually occurs (no mouse move) the ‘down’ and ‘up’ callbacks will be called, but not the ‘done’ callback.

Create a new drag handler with the OpenLayers.Handler.Drag constructor.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
started | {Boolean} When a mousedown or touchstart event is received, we want to record it, but not set ‘dragging’ until the mouse moves after starting.
stopDown | {Boolean} Stop propagation of mousedown events from getting to listeners on the same element.
dragging | {Boolean}
last | {OpenLayers.Pixel} The last pixel location of the drag.
start | {OpenLayers.Pixel} The first pixel location of the drag.
lastMoveEvt | {Object} The last mousemove event that occurred.
oldOnselectstart | {Function}
interval | {Integer} In order to increase performance, an interval (in milliseconds) can be set to reduce the number of drag events called.
timeoutId | {String} The id of the timeout used for the mousedown interval.
documentEvents | {Boolean} Are we currently observing document events?
Functions |
OpenLayers.Handler.Drag | Returns OpenLayers.Handler.Drag
dragstart | This private method is factorized from mousedown and touchstart methods
dragmove | This private method is factorized from mousemove and touchmove methods
dragend | This private method is factorized from mouseup and touchend methods
down | This method is called during the handling of the mouse down event.
move | This method is called during the handling of the mouse move event.
up | This method is called during the handling of the mouse up event.
out | This method is called during the handling of the mouse out event.
mousedown | Handle mousedown events
touchstart | Handle touchstart events
mousemove | Handle mousemove events
touchmove | Handle touchmove events
removeTimeout | Private.
mouseup | Handle mouseup events
touchend | Handle touchend events
mouseout | Handle mouseout events
click | The drag handler captures the click event.
activate | Activate the handler.
deactivate | Deactivate the handler.
adjustXY | Converts event coordinates that are relative to the document body to ones that are relative to the map viewport.
addDocumentEvents | Start observing document events when documentDrag is true and the mouse cursor leaves the map viewport while dragging.
removeDocumentEvents | Stops observing document events when documentDrag is true and the mouse cursor re-enters the map viewport while dragging.

### Properties

### started

{Boolean} When a mousedown or touchstart event is received, we want to record it, but not set ‘dragging’ until the mouse moves after starting.

### stopDown

{Boolean} Stop propagation of mousedown events from getting to listeners on the same element. Default is true.

### dragging

{Boolean}

### last

{OpenLayers.Pixel} The last pixel location of the drag.

### start

{OpenLayers.Pixel} The first pixel location of the drag.

### lastMoveEvt

{Object} The last mousemove event that occurred. Used to position the map correctly when our “delay drag” timeout expired.

### oldOnselectstart

{Function}

### interval

{Integer} In order to increase performance, an interval (in milliseconds) can be set to reduce the number of drag events called. If set, a new drag event will not be set until the interval has passed. Defaults to 0, meaning no interval.

### timeoutId

{String} The id of the timeout used for the mousedown interval. This is “private”, and should be left alone.

### documentEvents

{Boolean} Are we currently observing document events?

### Functions

### OpenLayers.Handler.Drag

Returns OpenLayers.Handler.Drag

#### Parameters

control | {OpenLayers.Control} The control that is making use of this handler. If a handler is being used without a control, the handlers setMap method must be overridden to deal properly with the map.
callbacks | {Object} An object containing a single function to be called when the drag operation is finished. The callback should expect to recieve a single argument, the pixel location of the event. Callbacks for ‘move’ and ‘done’ are supported. You can also speficy callbacks for ‘down’, ‘up’, and ‘out’ to respond to those events.
options | {Object}

### dragstart

> dragstart: function ( | evt | )

This private method is factorized from mousedown and touchstart methods

#### Parameters

evt | {Event} The event

#### Returns

{Boolean} Let the event propagate.

### dragmove

> dragmove: function ( | evt | )

This private method is factorized from mousemove and touchmove methods

#### Parameters

evt | {Event} The event

#### Returns

{Boolean} Let the event propagate.

### dragend

> dragend: function ( | evt | )

This private method is factorized from mouseup and touchend methods

#### Parameters

evt | {Event} The event

#### Returns

{Boolean} Let the event propagate.

### down

> down: function( | evt | )

This method is called during the handling of the mouse down event. Subclasses can do their own processing here.

#### Parameters

evt | {Event} The mouse down event

### move

> move: function( | evt | )

This method is called during the handling of the mouse move event. Subclasses can do their own processing here.

#### Parameters

evt | {Event} The mouse move event

### up

> up: function( | evt | )

This method is called during the handling of the mouse up event. Subclasses can do their own processing here.

#### Parameters

evt | {Event} The mouse up event

### out

> out: function( | evt | )

This method is called during the handling of the mouse out event. Subclasses can do their own processing here.

#### Parameters

evt | {Event} The mouse out event

### mousedown

> mousedown: function( | evt | )

Handle mousedown events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### touchstart

> touchstart: function( | evt | )

Handle touchstart events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### mousemove

> mousemove: function( | evt | )

Handle mousemove events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### touchmove

> touchmove: function( | evt | )

Handle touchmove events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### removeTimeout

> removeTimeout: function()

Private. Called by mousemove() to remove the drag timeout.

### mouseup

> mouseup: function( | evt | )

Handle mouseup events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### touchend

> touchend: function( | evt | )

Handle touchend events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### mouseout

> mouseout: function ( | evt | )

Handle mouseout events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### click

> click: function ( | evt | )

The drag handler captures the click event. If something else registers for clicks on the same element, its listener will not be called after a drag.

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### activate

> activate: function()

Activate the handler.

#### Returns

{Boolean} The handler was successfully activated.

### deactivate

> deactivate: function()

Deactivate the handler.

#### Returns

{Boolean} The handler was successfully deactivated.

### adjustXY

> adjustXY: function( | evt | )

Converts event coordinates that are relative to the document body to ones that are relative to the map viewport. The latter is the default in OpenLayers.

#### Parameters

evt | {Object}

### addDocumentEvents

> addDocumentEvents: function()

Start observing document events when documentDrag is true and the mouse cursor leaves the map viewport while dragging.

### removeDocumentEvents

> removeDocumentEvents: function()

Stops observing document events when documentDrag is true and the mouse cursor re-enters the map viewport while dragging.

## OpenLayers.Handler.Box

Handler for dragging a rectangle across the map. Box is displayed on mouse down, moves on mouse move, and is finished on mouse up.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
dragHandler | {OpenLayers.Handler.Drag}
boxOffsets | {Object} Caches box offsets from css.
Functions |
OpenLayers.Handler.Box |
destroy |
setMap |
startBox |
moveBox |
endBox |
removeBox | Remove the zoombox from the screen and nullify our reference to it.
activate |
deactivate |
getBoxOffsets | Determines border offsets for a box, according to the box model.

### Properties

### dragHandler

{OpenLayers.Handler.Drag}

### boxOffsets

{Object} Caches box offsets from css. This is used by the getBoxOffsets method.

### Functions

### OpenLayers.Handler.Box

#### Parameters

control | {OpenLayers.Control}
callbacks | {Object} An object with a properties whose values are functions. Various callbacks described below.
options | {Object}

#### Named callbacks

start | Called when the box drag operation starts.
done | Called when the box drag operation is finished. The callback should expect to receive a single argument, the box bounds or a pixel. If the box dragging didn’t span more than a 5 pixel distance, a pixel will be returned instead of a bounds object.

### destroy

> destroy: function()

### setMap

> setMap: function ( | map | )

### startBox

> startBox: function ( | xy | )

#### Parameters

xy | {OpenLayers.Pixel}

### moveBox

> moveBox: function ( | xy | )

### endBox

> endBox: function( | end | )

### removeBox

> removeBox: function()

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

### activate

> activate: function ()

### deactivate

> deactivate: function ()

### getBoxOffsets

> getBoxOffsets: function()

Determines border offsets for a box, according to the box model.

#### Returns

{Object} an object with the following offsets:

- left
- right
- top
- bottom
- width
- height

## OpenLayers.Control.ZoomBox

The ZoomBox control enables zooming directly to a given extent, by drawing a box on the map. The box is drawn by holding down shift, whilst dragging the mouse.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
type | {OpenLayers.Control.TYPE}
out | {Boolean} Should the control be used for zooming out?
Functions |
draw |
zoomBox |

### Properties

### type

{OpenLayers.Control.TYPE}

### out

{Boolean} Should the control be used for zooming out?

### Functions

### draw

> draw: function()

### zoomBox

> zoomBox: function ( | position | )

#### Parameters

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

## OpenLayers.Control.DragPan

The DragPan control pans the map with a drag of the mouse.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
type | {OpenLayers.Control.TYPES}
panned | {Boolean} The map moved.
interval | {Integer} The number of milliseconds that should ellapse before panning the map again.
kinetic | {<OpenLayers.Kinetic>} The OpenLayers.Kinetic object.
Functions |
draw | Creates a Drag handler, using panMap and panMapDone as callbacks.
panMapStart |
panMap |
panMapDone | Finish the panning operation.

### Properties

### type

{OpenLayers.Control.TYPES}

### panned

{Boolean} The map moved.

### interval

{Integer} The number of milliseconds that should ellapse before panning the map again. Defaults to 0 milliseconds, which means that no separate cycle is used for panning. In most cases you won’t want to change this value. For slow machines/devices larger values can be tried out.

### kinetic

{<OpenLayers.Kinetic>} The OpenLayers.Kinetic object.

### Functions

### draw

> draw: function()

Creates a Drag handler, using panMap and panMapDone as callbacks.

### panMapStart

> panMapStart: function()

### panMap

> panMap: function( | xy | )

#### Parameters

xy | {OpenLayers.Pixel} Pixel of the mouse position

### panMapDone

> panMapDone: function( | xy | )

Finish the panning operation. Only call setCenter (through panMap) if the map has actually been moved.

#### Parameters

xy | {OpenLayers.Pixel} Pixel of the mouse position

## OpenLayers.Handler.Click

A handler for mouse clicks. The intention of this handler is to give controls more flexibility with handling clicks. Browsers trigger click events twice for a double-click. In addition, the mousedown, mousemove, mouseup sequence fires a click event. With this handler, controls can decide whether to ignore clicks associated with a double click. By setting a <pixelTolerance>, controls can also ignore clicks that include a drag. Create a new instance with the OpenLayers.Handler.Click constructor.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
timerId | {Number} The id of the timeout waiting to clear the delayedCall.
down | {Object} Object that store relevant information about the last mousedown or touchstart.
last | {Object} Object that store relevant information about the last mousemove or touchmove.
first | {Object} When waiting for double clicks, this object will store information about the first click in a two click sequence.
rightclickTimerId | {Number} The id of the right mouse timeout waiting to clear the <delayedEvent>.
Functions |
OpenLayers.Handler.Click | Create a new click handler.
touchstart | Handle touchstart.
touchmove | Store position of last move, because touchend event can have an empty “touches” property.
touchend | Correctly set event xy property, and add lastTouches to have touches property from last touchstart or touchmove
mousedown | Handle mousedown.
mouseup | Handle mouseup.
rightclick | Handle rightclick.
delayedRightCall | Sets rightclickTimerId to null.
click | Handle click events from the browser.
dblclick | Handle dblclick.
handleDouble | Handle double-click sequence.
handleSingle | Handle single click sequence.
queuePotentialClick | This method is separated out largely to make testing easier (so we don’t have to override window.setTimeout)
passesTolerance | Determine whether the event is within the optional pixel tolerance.
getTouchDistance | {Boolean} The pixel displacement between two touches.
passesDblclickTolerance | Determine whether the event is within the optional double-cick pixel tolerance.
clearTimer | Clear the timer and set timerId to null.
delayedCall | Sets timerId to null.
getEventInfo | This method allows us to store event information without storing the actual event.

### Properties

### timerId

{Number} The id of the timeout waiting to clear the delayedCall.

### down

{Object} Object that store relevant information about the last mousedown or touchstart. Its ‘xy’ OpenLayers.Pixel property gives the average location of the mouse/touch event. Its ‘touches’ property records clientX/clientY of each touches.

### last

{Object} Object that store relevant information about the last mousemove or touchmove. Its ‘xy’ OpenLayers.Pixel property gives the average location of the mouse/touch event. Its ‘touches’ property records clientX/clientY of each touches.

### first

{Object} When waiting for double clicks, this object will store information about the first click in a two click sequence.

### rightclickTimerId

{Number} The id of the right mouse timeout waiting to clear the <delayedEvent>.

### Functions

### OpenLayers.Handler.Click

Create a new click handler.

#### Parameters

control | {OpenLayers.Control} The control that is making use of this handler. If a handler is being used without a control, the handler’s setMap method must be overridden to deal properly with the map.
callbacks | {Object} An object with keys corresponding to callbacks that will be called by the handler. The callbacks should expect to recieve a single argument, the click event. Callbacks for ‘click’ and ‘dblclick’ are supported.
options | {Object} Optional object whose properties will be set on the handler.

### touchstart

> touchstart: function( | evt | )

Handle touchstart.

#### Returns

{Boolean} Continue propagating this event.

### touchmove

> touchmove: function( | evt | )

Store position of last move, because touchend event can have an empty “touches” property.

#### Returns

{Boolean} Continue propagating this event.

### touchend

> touchend: function( | evt | )

Correctly set event xy property, and add lastTouches to have touches property from last touchstart or touchmove

#### Returns

{Boolean} Continue propagating this event.

### mousedown

> mousedown: function( | evt | )

Handle mousedown.

#### Returns

{Boolean} Continue propagating this event.

### mouseup

> mouseup: function ( | evt | )

Handle mouseup. Installed to support collection of right mouse events.

#### Returns

{Boolean} Continue propagating this event.

### rightclick

> rightclick: function( | evt | )

Handle rightclick. For a dblrightclick, we get two clicks so we need to always register for dblrightclick to properly handle single clicks.

#### Returns

{Boolean} Continue propagating this event.

### delayedRightCall

> delayedRightCall: function( | evt | )

Sets rightclickTimerId to null. And optionally triggers the rightclick callback if evt is set.

### click

> click: function( | evt | )

Handle click events from the browser. This is registered as a listener for click events and should not be called from other events in this handler.

#### Returns

{Boolean} Continue propagating this event.

### dblclick

> dblclick: function( | evt | )

Handle dblclick. For a dblclick, we get two clicks in some browsers (FF) and one in others (IE). So we need to always register for dblclick to properly handle single clicks. This method is registered as a listener for the dblclick browser event. It should not be called by other methods in this handler.

#### Returns

{Boolean} Continue propagating this event.

### handleDouble

> handleDouble: function( | evt | )

Handle double-click sequence.

### handleSingle

> handleSingle: function( | evt | )

Handle single click sequence.

### queuePotentialClick

> queuePotentialClick: function( | evt | )

This method is separated out largely to make testing easier (so we don’t have to override window.setTimeout)

### passesTolerance

> passesTolerance: function( | evt | )

Determine whether the event is within the optional pixel tolerance. Note that the pixel tolerance check only works if mousedown events get to the listeners registered here. If they are stopped by other elements, the <pixelTolerance> will have no effect here (this method will always return true).

#### Returns

{Boolean} The click is within the pixel tolerance (if specified).

### getTouchDistance

> getTouchDistance: function( | from,
> | to | )

#### Returns

{Boolean} The pixel displacement between two touches.

### passesDblclickTolerance

> passesDblclickTolerance: function( | evt | )

Determine whether the event is within the optional double-cick pixel tolerance.

#### Returns

{Boolean} The click is within the double-click pixel tolerance.

### clearTimer

> clearTimer: function()

Clear the timer and set timerId to null.

### delayedCall

> delayedCall: function( | evt | )

Sets timerId to null. And optionally triggers the click callback if evt is set.

### getEventInfo

> getEventInfo: function( | evt | )

This method allows us to store event information without storing the actual event. In touch devices (at least), the same event is modified between touchstart, touchmove, and touchend.

#### Returns

{Object} An object with event related info.

## OpenLayers.Control.Navigation

The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel). Create a new navigation control with the OpenLayers.Control.Navigation control.

Note that this control is added to the map by default (if no controls array is sent in the options object to the OpenLayers.Map constructor).

#### Inherits

- OpenLayers.Control

Summary

Properties |
dragPan | {OpenLayers.Control.DragPan}
pinchZoom | {OpenLayers.Control.PinchZoom}
zoomBox | {OpenLayers.Control.ZoomBox}
mouseWheelOptions | {Object} Options passed to the MouseWheel control (only useful if <zoomWheelEnabled> is set to true).
Functions |
OpenLayers.Control.Navigation | Create a new navigation control
destroy | The destroy method is used to perform any clean up before the control is dereferenced.
activate |
deactivate |
draw |
defaultClick |
defaultDblClick |
defaultDblRightClick |
wheelChange |
wheelUp | User spun scroll wheel up
wheelDown | User spun scroll wheel down
disableZoomBox |
enableZoomBox |
disableZoomWheel |
enableZoomWheel |

### Properties

### dragPan

{OpenLayers.Control.DragPan}

### pinchZoom

{OpenLayers.Control.PinchZoom}

### zoomBox

{OpenLayers.Control.ZoomBox}

### mouseWheelOptions

{Object} Options passed to the MouseWheel control (only useful if <zoomWheelEnabled> is set to true). Default is no options for maps with fractionalZoom set to true, otherwise {cumulative: false, interval: 50, maxDelta: 6}

### Functions

### OpenLayers.Control.Navigation

Create a new navigation control

#### Parameters

options | {Object} An optional object whose properties will be set on the control

### destroy

> destroy: function()

The destroy method is used to perform any clean up before the control is dereferenced. Typically this is where event listeners are removed to prevent memory leaks.

### activate

> activate: function()

### deactivate

> deactivate: function()

### draw

> draw: function()

### defaultClick

> defaultClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultDblClick

> defaultDblClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultDblRightClick

> defaultDblRightClick: function ( | evt | )

#### Parameters

evt | {Event}

### wheelChange

> wheelChange: function( | evt,
> | deltaZ | )

#### Parameters

evt | {Event}
deltaZ | {Integer}

### wheelUp

> wheelUp: function( | evt,
> | delta | )

User spun scroll wheel up

#### Parameters

evt | {Event}
delta | {Integer}

### wheelDown

> wheelDown: function( | evt,
> | delta | )

User spun scroll wheel down

#### Parameters

evt | {Event}
delta | {Integer}

### disableZoomBox

> disableZoomBox : function()

### enableZoomBox

> enableZoomBox : function()

### disableZoomWheel

> disableZoomWheel : function()

### enableZoomWheel

> enableZoomWheel : function()

## OpenLayers.Layer.WMS

Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services. Create a new WMS layer with the OpenLayers.Layer.WMS constructor.

#### Inherits from

- OpenLayers.Layer.Grid

Summary

Constants |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs
Properties |
yx | {Object} Keys in this object are EPSG codes for which the axis order is to be reversed (yx instead of xy, LatLon instead of LonLat), with true as value.
Functions |
OpenLayers.Layer.WMS | Create a new WMS layer object
clone | Create a clone of this layer
getURL | Return a GetMap query string for this layer

### Constants

### DEFAULT_PARAMS

{Object} Hashtable of default parameter key/value pairs

### Properties

### yx

{Object} Keys in this object are EPSG codes for which the axis order is to be reversed (yx instead of xy, LatLon instead of LonLat), with true as value. This is only relevant for WMS versions >= 1.3.0, and only if yx is not set in <OpenLayers.Projection.defaults> for the used projection.

### Functions

### OpenLayers.Layer.WMS

Create a new WMS layer object

#### Examples

The code below creates a simple WMS layer using the image/jpeg format.

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

Note the 3rd argument (params). Properties added to this object will be added to the WMS GetMap requests used for this layer’s tiles. The only mandatory parameter is “layers”. Other common WMS params include “transparent”, “styles” and “format”. Note that the “srs” param will always be ignored. Instead, it will be derived from the baseLayer’s or map’s projection.

The code below creates a transparent WMS layer with additional options.

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

Note that by default, a WMS layer is configured as baseLayer. Setting the “transparent” param to true will apply some magic (see <noMagic>). The default image format changes from image/jpeg to image/png, and the layer is not configured as baseLayer.

#### 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. These options include all properties listed above, plus the ones inherited from superclasses.

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

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

### getURL

> getURL: function ( | bounds | )

Return a GetMap query string for this layer

#### Parameters

bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request.

#### Returns

{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.

## OpenLayers.StyleMap

Summary

Properties |
styles | {Object} Hash of {OpenLayers.Style}, keyed by names of well known rendering intents (e.g.
extendDefault | {Boolean} if true, every render intent will extend the symbolizers specified for the “default” intent at rendering time.
Functions |
OpenLayers.StyleMap |
destroy |
createSymbolizer | Creates the symbolizer for a feature for a render intent.
addUniqueValueRules | Convenience method to create comparison rules for unique values of a property.

### Properties

### styles

{Object} Hash of {OpenLayers.Style}, keyed by names of well known rendering intents (e.g. “default”, “temporary”, “select”, “delete”).

### extendDefault

{Boolean} if true, every render intent will extend the symbolizers specified for the “default” intent at rendering time. Otherwise, every rendering intent will be treated as a completely independent style.

### Functions

### OpenLayers.StyleMap

#### Parameters

style | {Object} Optional. Either a style hash, or a style object, or a hash of style objects (style hashes) keyed by rendering intent. If just one style hash or style object is passed, this will be used for all known render intents (default, select, temporary)
options | {Object} optional hash of additional options for this instance

### destroy

> destroy: function()

### createSymbolizer

> createSymbolizer: function( | feature,
> | intent | )

Creates the symbolizer for a feature for a render intent.

#### Parameters

feature | {OpenLayers.Feature} The feature to evaluate the rules of the intended style against.
intent | {String} The intent determines the symbolizer that will be used to draw the feature. Well known intents are “default” (for just drawing the features), “select” (for selected features) and “temporary” (for drawing features).

#### Returns

{Object} symbolizer hash

### addUniqueValueRules

> addUniqueValueRules: function( | renderIntent,
> | property,
> | symbolizers,
> | context | )

Convenience method to create comparison rules for unique values of a property. The rules will be added to the style object for a specified rendering intent. This method is a shortcut for creating something like the “unique value legends” familiar from well known desktop GIS systems

#### Parameters

renderIntent | {String} rendering intent to add the rules to
property | {String} values of feature attributes to create the rules for
symbolizers | {Object} Hash of symbolizers, keyed by the desired property values
context | {Object} An optional object with properties that symbolizers’ property values should be evaluated against. If no context is specified, feature.attributes will be used

## OpenLayers.Layer.Vector

Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources. Create a new vector layer with the OpenLayers.Layer.Vector constructor.

#### Inherits from

- OpenLayers.Layer

Summary

Properties |
filter | {OpenLayers.Filter} The filter set in this layer, a strategy launching read requests can combined this filter with its own filter.
selectedFeatures | {Array(OpenLayers.Feature.Vector)}
unrenderedFeatures | {Object} hash of features, keyed by feature.id, that the renderer failed to draw
styleMap | {OpenLayers.StyleMap}
strategies | {Array(OpenLayers.Strategy})} Optional list of strategies for the layer.
protocol | {OpenLayers.Protocol} Optional protocol for the layer.
renderers | {Array(String)} List of supported Renderer classes.
renderer | {OpenLayers.Renderer}
drawn | {Boolean} Whether the Vector Layer features have been drawn yet.
Functions |
OpenLayers.Layer.Vector | Create a new vector layer
clone | Create a clone of this layer.
refresh | Ask the layer to request features again and redraw them.
assignRenderer | Iterates through the available renderer implementations and selects and assigns the first one whose “supported()” function returns true.
displayError | Let the user know their browser isn’t supported.
setMap | The layer has been added to the map.
afterAdd | Called at the end of the map.addLayer sequence.
removeMap | The layer has been removed from the map.
onMapResize | Notify the renderer of the change in size.
moveTo | Reset the vector layer’s div so that it once again is lined up with the map.
eraseFeatures | Erase features from the layer.
getFeatureFromEvent | Given an event, return a feature if the event occurred over one.

### Properties

### filter

{OpenLayers.Filter} The filter set in this layer, a strategy launching read requests can combined this filter with its own filter.

### selectedFeatures

{Array(OpenLayers.Feature.Vector)}

### unrenderedFeatures

{Object} hash of features, keyed by feature.id, that the renderer failed to draw

### styleMap

{OpenLayers.StyleMap}

### strategies

{Array(OpenLayers.Strategy})} Optional list of strategies for the layer.

### protocol

{OpenLayers.Protocol} Optional protocol for the layer.

### renderers

{Array(String)} List of supported Renderer classes. Add to this list to add support for additional renderers. This list is ordered: the first renderer which returns true for the ‘supported()’ method will be used, if not defined in the ‘renderer’ option.

### renderer

{OpenLayers.Renderer}

### drawn

{Boolean} Whether the Vector Layer features have been drawn yet.

### Functions

### OpenLayers.Layer.Vector

Create a new vector layer

#### Parameters

name | {String} A name for the layer
options | {Object} Optional object with non-default properties to set on the layer.

#### Returns

{OpenLayers.Layer.Vector} A new vector layer

### clone

> clone: function ( | obj | )

Create a clone of this layer.

Note: Features of the layer are also cloned.

#### Returns

{OpenLayers.Layer.Vector} An exact clone of this layer

### refresh

> refresh: function( | obj | )

Ask the layer to request features again and redraw them. Triggers the refresh event if the layer is in range and visible.

#### Parameters

obj | {Object} Optional object with properties for any listener of the refresh event.

### assignRenderer

> assignRenderer: function()

Iterates through the available renderer implementations and selects and assigns the first one whose “supported()” function returns true.

### displayError

> displayError: function()

Let the user know their browser isn’t supported.

### setMap

> setMap: function( | map | )

The layer has been added to the map.

If there is no renderer set, the layer can’t be used. Remove it. Otherwise, give the renderer a reference to the map and set its size.

#### Parameters

map | {OpenLayers.Map}

### afterAdd

> afterAdd: function()

Called at the end of the map.addLayer sequence. At this point, the map will have a base layer. Any autoActivate strategies will be activated here.

### removeMap

> removeMap: function( | map | )

The layer has been removed from the map.

#### Parameters

map | {OpenLayers.Map}

### onMapResize

> onMapResize: function()

Notify the renderer of the change in size.

### moveTo

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

Reset the vector layer’s div so that it once again is lined up with the map. Notify the renderer of the change of extent, and in the case of a change of zoom level (resolution), have the renderer redraw features.

If the layer has not yet been drawn, cycle through the layer’s features and draw each one.

#### Parameters

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

### eraseFeatures

> eraseFeatures: function( | features | )

Erase features from the layer.

#### Parameters

features | {Array(OpenLayers.Feature.Vector)}

### getFeatureFromEvent

> getFeatureFromEvent: function( | evt | )

Given an event, return a feature if the event occurred over one. Otherwise, return null.

#### Parameters

evt | {Event}

#### Returns

{OpenLayers.Feature.Vector} A feature if one was under the event.

## OpenLayers.Renderer.SVG

#### Inherits

- OpenLayers.Renderer.Elements

Summary

Properties |
xmlns | {String}
xlinkns | {String}
Constants |
MAX_PIXEL | {Integer} Firefox has a limitation where values larger or smaller than about 15000 in an SVG document lock the browser up.
Properties |
translationParameters | {Object} Hash with “x” and “y” properties
symbolMetrics | {Object} Cache for symbol metrics according to their svg coordinate space.
Functions |
OpenLayers.Renderer.SVG |
inValidRange | See #669 for more information
setExtent |
translate | Transforms the SVG coordinate system
setSize | Sets the size of the drawing surface.
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 | This method is only called by the renderer itself.
getComponentString |
clipLine | Given two points (one inside the valid range, and one outside), clips the line betweeen the two points so that the new points are both inside the valid range.
getShortString |
getPosition | Finds the position of an svg node.
importSymbol | add a new symbol definition from the rendererer’s symbol hash
getFeatureIdFromEvent |
Constants |
OpenLayers.Renderer.SVG.LABEL_ALIGN | {Object}
OpenLayers.Renderer.SVG.LABEL_VSHIFT | {Object}
OpenLayers.Renderer.SVG.LABEL_VFACTOR | {Object}
Functions |
OpenLayers.Renderer.SVG.preventDefault | Deprecated.

### Properties

### xmlns

{String}

### xlinkns

{String}

### Constants

### MAX_PIXEL

{Integer} Firefox has a limitation where values larger or smaller than about 15000 in an SVG document lock the browser up. This works around it.

### Properties

### translationParameters

{Object} Hash with “x” and “y” properties

### 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 array of [width, centerX, centerY].

### Functions

### OpenLayers.Renderer.SVG

#### Parameters

containerID | {String}

### inValidRange

> inValidRange: function( | x,
> | y,
> | xyOnly | )

See #669 for more information

#### Parameters

x | {Integer}
y | {Integer}
xyOnly | {Boolean} whether or not to just check for x and y, which means to not take the current translation parameters into account if true.

#### Returns

{Boolean} Whether or not the ‘x’ and ‘y’ coordinates are in the valid range.

### setExtent

> setExtent: function( | extent,
> | resolutionChanged | )

#### Parameters

extent | {OpenLayers.Bounds}
resolutionChanged | {Boolean}

#### Returns

{Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn. False otherwise.

### translate

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

Transforms the SVG coordinate system

#### Parameters

x | {Float}
y | {Float}

#### Returns

{Boolean} true if the translation parameters are in the valid coordinates range, false otherwise.

### setSize

> setSize: function( | size | )

Sets the size of the drawing surface.

#### Parameters

size | {OpenLayers.Size} The size of the drawing surface

### 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 | )

This method is only called by the renderer itself.

#### Parameters

featureId | {String} style -
location | {OpenLayers.Geometry.Point}

### 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)

### clipLine

> clipLine: function( | badComponent,
> | goodComponent | )

Given two points (one inside the valid range, and one outside), clips the line betweeen the two points so that the new points are both inside the valid range.

#### Parameters

badComponent | {OpenLayers.Geometry.Point} original geometry of the invalid point
goodComponent | {OpenLayers.Geometry.Point} original geometry of the valid point Returns {String} the SVG coordinate pair of the clipped point (like getShortString), or an empty string if both passed componets are at the same point.

### getShortString

> getShortString: function( | point | )

#### Parameters

point | {OpenLayers.Geometry.Point}

#### Returns

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

### getPosition

> getPosition: function( | node | )

Finds the position of an svg node.

#### Parameters

node | {DOMElement}

#### Returns

{Object} hash with x and y properties, representing the coordinates within the svg coordinate system

### 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.SVG.LABEL_ALIGN

{Object}

### OpenLayers.Renderer.SVG.LABEL_VSHIFT

{Object}

### OpenLayers.Renderer.SVG.LABEL_VFACTOR

{Object}

### Functions

### OpenLayers.Renderer.SVG.preventDefault

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

Deprecated. Use OpenLayers.Event.preventDefault method instead. Used to prevent default events (especially opening images in a new tab on ctrl-click) from being executed for externalGraphic symbols

## OpenLayers.Control.ScaleLine

The ScaleLine displays a small line indicator representing the current map scale on the map. By default it is drawn in the lower left corner of the map.

#### Inherits from

- OpenLayers.Control

#### Is a very close copy of

- <OpenLayers.Control.Scale>

Summary

Properties |
maxWidth | {Integer} Maximum width of the scale line in pixels.
topOutUnits | {String} Units for zoomed out on top bar.
topInUnits | {String} Units for zoomed in on top bar.
bottomOutUnits | {String} Units for zoomed out on bottom bar.
bottomInUnits | {String} Units for zoomed in on bottom bar.
eTop | {DOMElement}
eBottom | {DOMElement}
Functions |
OpenLayers.Control.ScaleLine | Create a new scale line control.
draw | {DOMElement}
getBarLen | Given a number, round it down to the nearest 1,2,5 times a power of 10.
update | Update the size of the bars, and the labels they contain.

### Properties

### maxWidth

{Integer} Maximum width of the scale line in pixels. Default is 100.

### topOutUnits

{String} Units for zoomed out on top bar. Default is km.

### topInUnits

{String} Units for zoomed in on top bar. Default is m.

### bottomOutUnits

{String} Units for zoomed out on bottom bar. Default is mi.

### bottomInUnits

{String} Units for zoomed in on bottom bar. Default is ft.

### eTop

{DOMElement}

### eBottom

{DOMElement}

### Functions

### OpenLayers.Control.ScaleLine

Create a new scale line control.

#### Parameters

options | {Object} An optional object whose properties will be used to extend the control.

### draw

> draw: function()

#### Returns

{DOMElement}

### getBarLen

> getBarLen: function( | maxLen | )

Given a number, round it down to the nearest 1,2,5 times a power of 10. That seems a fairly useful set of number groups to use.

#### Parameters

maxLen | {float} the number we’re rounding down from

#### Returns

{Float} the rounded number (less than or equal to maxLen)

### update

> update: function()

Update the size of the bars, and the labels they contain.

## OpenLayers.Control.PanZoom

The PanZoom is a visible control, composed of a <OpenLayers.Control.PanPanel> and a <OpenLayers.Control.ZoomPanel>. By default it is drawn in the upper left corner of the map.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
buttons | {Array(DOMElement)} Array of Button Divs
position | {OpenLayers.Pixel}
Functions |
OpenLayers.Control.PanZoom |
setMap |
draw |
_addButton |
_removeButton |
removeButtons |
onButtonClick |
getSlideFactor |
Constants |
X | {Integer}
Y | {Integer}

### Properties

### buttons

{Array(DOMElement)} Array of Button Divs

### position

{OpenLayers.Pixel}

### Functions

### OpenLayers.Control.PanZoom

#### Parameters

options | {Object}

### setMap

> setMap: function( | map | )

#### Properties

map | {OpenLayers.Map}

### draw

> draw: function( | px | )

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{DOMElement} A reference to the container div for the PanZoom control.

### _addButton

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

#### Parameters

id | {String}
img | {String}
xy | {OpenLayers.Pixel}
sz | {OpenLayers.Size}

#### Returns

{DOMElement} A Div (an alphaImageDiv, to be precise) that contains the image of the button, and has all the proper event handlers set.

### _removeButton

> _removeButton: function( | btn | )

#### Parameters

btn | {Object}

### removeButtons

> removeButtons: function()

### onButtonClick

> onButtonClick: function( | evt | )

#### Parameters

evt | {Event}

### getSlideFactor

> getSlideFactor: function( | dim | )

#### Parameters

dim | {String} “w” or “h” (for width or height).

#### Returns

{Number} The slide factor for panning in the requested direction.

### Constants

### X

{Integer}

### Y

{Integer}

## OpenLayers.Icon

The icon represents a graphical icon on the screen. Typically used in conjunction with a OpenLayers.Marker to represent markers on a screen.

An icon has a url, size and position. It also contains an offset which allows the center point to be represented correctly. This can be provided either as a fixed offset or a function provided to calculate the desired offset.

Summary

Properties |
url | {String} image url
size | {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
offset | {<OpenLayers.Pixel>|Object} distance in pixels to offset the image when being rendered.
calculateOffset | {Function} Function to calculate the offset (based on the size)
imageDiv | {DOMElement}
px | {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
Functions |
OpenLayers.Icon | Creates an icon, which is an image tag in a div.
destroy | Nullify references and remove event listeners to prevent circular references and memory leaks
clone | {OpenLayers.Icon} A fresh copy of the icon.
setSize |
setUrl |
draw | Move the div to the given pixel.
erase | Erase the underlying image element.
setOpacity | Change the icon’s opacity
moveTo | move icon to passed in px.
display | Hide or show the icon

### Properties

### url

{String} image url

### size

{<OpenLayers.Size>|Object} An OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.

### offset

{<OpenLayers.Pixel>|Object} distance in pixels to offset the image when being rendered. An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

### calculateOffset

{Function} Function to calculate the offset (based on the size)

### imageDiv

{DOMElement}

### px

{<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

### Functions

### OpenLayers.Icon

Creates an icon, which is an image tag in a div.

url | {String}
size | {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.
offset | {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.
calculateOffset | {Function}

### destroy

> destroy: function()

Nullify references and remove event listeners to prevent circular references and memory leaks

### clone

> clone: function()

#### Returns

{OpenLayers.Icon} A fresh copy of the icon.

### setSize

> setSize: function( | size | )

#### Parameters

size | {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with a ‘w’ and ‘h’ properties.

### setUrl

> setUrl: function( | url | )

#### Parameters

url | {String}

### draw

> draw: function( | px | )

Move the div to the given pixel.

#### Parameters

px | {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

#### Returns

{DOMElement} A new DOM Image of this icon set at the location passed-in

### erase

> erase: function()

Erase the underlying image element.

### setOpacity

> setOpacity: function( | opacity | )

Change the icon’s opacity

#### Parameters

opacity | {float}

### moveTo

> moveTo: function ( | px | )

move icon to passed in px.

#### Parameters

px | {<OpenLayers.Pixel>|Object} the pixel position to move to. An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

### display

> display: function( | display | )

Hide or show the icon

#### Parameters

display | {Boolean}

## OpenLayers.Marker

Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.

Markers are generally added to a special layer called OpenLayers.Layer.Markers.

#### Example

>     var markers = new OpenLayers.Layer.Markers( "Markers" );
>     map.addLayer(markers);

>     var size = new OpenLayers.Size(21,25);
>     var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
>     var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png', size, offset);
>     markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon));
>     markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon.clone()));

Note that if you pass an icon into the Marker constructor, it will take that icon and use it. This means that you should not share icons between markers -- you use them once, but you should clone() for any additional markers using that same icon.

Summary

Properties |
icon | {OpenLayers.Icon} The icon used by this marker.
lonlat | {OpenLayers.LonLat} location of object
events | {OpenLayers.Events} the event handler.
map | {OpenLayers.Map} the map this marker is attached to
Functions |
OpenLayers.Marker |
draw | Calls draw on the icon, and returns that output.
erase | Erases any drawn elements for this marker.
moveTo | Move the marker to the new location.
onScreen | {Boolean} Whether or not the marker is currently visible on screen.
inflate | Englarges the markers icon by the specified ratio.
setOpacity | Change the opacity of the marker by changin the opacity of its icon
setUrl | Change URL of the Icon Image.
display | Hide or show the icon
defaultIcon | Creates a default OpenLayers.Icon.

### Properties

### icon

{OpenLayers.Icon} The icon used by this marker.

### lonlat

{OpenLayers.LonLat} location of object

### events

{OpenLayers.Events} the event handler.

### map

{OpenLayers.Map} the map this marker is attached to

### Functions

### OpenLayers.Marker

#### Parameters

lonlat | {OpenLayers.LonLat} the position of this marker
icon | {OpenLayers.Icon} the icon for this marker

### draw

> draw: function( | px | )

Calls draw on the icon, and returns that output.

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{DOMElement} A new DOM Image with this marker’s icon set at the location passed-in

### erase

> erase: function()

Erases any drawn elements for this marker.

### moveTo

> moveTo: function ( | px | )

Move the marker to the new location.

#### Parameters

px | {<OpenLayers.Pixel>|Object} the pixel position to move to. An OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

### onScreen

> onScreen:function()

#### Returns

{Boolean} Whether or not the marker is currently visible on screen.

### inflate

> inflate: function( | inflate | )

Englarges the markers icon by the specified ratio.

#### Parameters

inflate | {float} the ratio to enlarge the marker by (passing 2 will double the size).

### setOpacity

> setOpacity: function( | opacity | )

Change the opacity of the marker by changin the opacity of its icon

#### Parameters

opacity | {float} Specified as fraction (0.4, etc)

### setUrl

> setUrl: function( | url | )

Change URL of the Icon Image.

url | {String}

### display

> display: function( | display | )

Hide or show the icon

display | {Boolean}

### defaultIcon

> OpenLayers.Marker.defaultIcon = function()

Creates a default OpenLayers.Icon.

#### Returns

{OpenLayers.Icon} A default OpenLayers.Icon to use for a marker

## OpenLayers.Strategy.Paging

Strategy for vector feature paging

#### Inherits from

- OpenLayers.Strategy

Summary

Properties |
features | {Array(OpenLayers.Feature.Vector)} Cached features.
length | {Integer} Number of features per page.
num | {Integer} The currently displayed page number.
paging | {Boolean} The strategy is currently changing pages.
Functions |
OpenLayers.Strategy.Paging | Create a new paging strategy.
cacheFeatures | Cache features before they are added to the layer.
clearCache | Clear out the cached features.
page | Display the page starting at the given index from the cache.

### Properties

### features

{Array(OpenLayers.Feature.Vector)} Cached features.

### length

{Integer} Number of features per page. Default is 10.

### num

{Integer} The currently displayed page number.

### paging

{Boolean} The strategy is currently changing pages.

### Functions

### OpenLayers.Strategy.Paging

Create a new paging strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### cacheFeatures

> cacheFeatures: function( | event | )

Cache features before they are added to the layer.

#### Parameters

event | {Object} The event that this was listening for. This will come with a batch of features to be paged.

### clearCache

> clearCache: function()

Clear out the cached features. This destroys features, assuming nothing else has a reference.

### page

> page: function( | start,
> | event | )

Display the page starting at the given index from the cache.

#### Returns

{Boolean} A new page was displayed.

## OpenLayers.Format.WKT

Class for reading and writing Well-Known Text. Create a new instance with the OpenLayers.Format.WKT constructor.

#### Inherits from

- OpenLayers.Format

Summary

Functions |
OpenLayers.Format.WKT | Create a new parser for WKT
extractGeometry | Entry point to construct the WKT for a single Geometry object.

### Functions

### OpenLayers.Format.WKT

Create a new parser for WKT

#### Parameters

options | {Object} An optional object whose properties will be set on this instance

#### Returns

{OpenLayers.Format.WKT} A new WKT parser.

### extractGeometry

> extractGeometry: function( | geometry | )

Entry point to construct the WKT for a single Geometry object.

#### Parameters

geometry | {<OpenLayers.Geometry.Geometry>}

#### Returns

{String} A WKT string of representing the geometry

## OpenLayers.Popup

A popup is a small div that can opened and closed on the map. Typically opened in response to clicking on a marker. See OpenLayers.Marker. Popup’s don’t require their own layer and are added the the map using the <OpenLayers.Map.addPopup> method.

#### Example

>     popup = new OpenLayers.Popup("chicken",
>                        new OpenLayers.LonLat(5,40),
>                        new OpenLayers.Size(200,200),
>                        "example popup",
>                        true);

>     map.addPopup(popup);

Summary

Properties and Functions |
events | {OpenLayers.Events} custom event manager
id | {String} the unique identifier assigned to this popup.
lonlat | {OpenLayers.LonLat} the position of this popup on the map
div | {DOMElement} the div that contains this popup.
contentSize | {OpenLayers.Size} the width and height of the content.
size | {OpenLayers.Size} the width and height of the popup.
contentHTML | {String} An HTML string for this popup to display.
backgroundColor | {String} the background color used by the popup.
opacity | {float} the opacity of this popup (between 0.0 and 1.0)
border | {String} the border size of the popup.
contentDiv | {DOMElement} a reference to the element that holds the content of the div.
groupDiv | {DOMElement} First and only child of ‘div’.
closeDiv | {DOMElement} the optional closer image
displayClass | {String} The CSS class of the popup.
contentDisplayClass | {String} The CSS class of the popup content div.
padding | {int or OpenLayers.Bounds} An extra opportunity to specify internal padding of the content div inside the popup.
disableFirefoxOverflowHack | {Boolean} The hack for overflow in Firefox causes all elements to be re-drawn, which causes Flash elements to be re-initialized, which is troublesome.
fixPadding | To be removed in 3.0, this function merely helps us to deal with the case where the user may have set an integer value for padding, instead of an OpenLayers.Bounds object.
map | {OpenLayers.Map} this gets set in Map.js when the popup is added to the map
OpenLayers.Popup | Create a popup.
destroy | nullify references to prevent circular references and memory leaks
draw | Constructs the elements that make up the popup.
updatePosition | if the popup has a lonlat and its map members set, then have it move itself to its proper position
moveTo |
visible | {Boolean} Boolean indicating whether or not the popup is visible
toggle | Toggles visibility of the popup.
show | Makes the popup visible.
hide | Makes the popup invisible.
setSize | Used to adjust the size of the popup.
setBackgroundColor | Sets the background color of the popup.
setOpacity | Sets the opacity of the popup.
setBorder | Sets the border style of the popup.
setContentHTML | Allows the user to set the HTML content of the popup.
registerImageListeners | Called when an image contained by the popup loaded.
getContentDivPadding | Glorious, oh glorious hack in order to determine the css ‘padding’ of the contentDiv.
addCloseBox |
panIntoView | Pans the map such that the popup is totaly viewable (if necessary)
registerEvents | Registers events on the popup.
onmousedown | When mouse goes down within the popup, make a note of it locally, and then do not propagate the mousedown (but do so safely so that user can select text inside)
onmousemove | If the drag was started within the popup, then do not propagate the mousemove (but do so safely so that user can select text inside)
onmouseup | When mouse comes up within the popup, after going down in it, reset the flag, and then (once again) do not propagate the event, but do so safely so that user can select text inside
onclick | Ignore clicks, but allowing default browser handling
onmouseout | When mouse goes out of the popup set the flag to false so that if they let go and then drag back in, we won’t be confused.
ondblclick | Ignore double-clicks, but allowing default browser handling

### Properties and Functions

### events

{OpenLayers.Events} custom event manager

### id

{String} the unique identifier assigned to this popup.

### lonlat

{OpenLayers.LonLat} the position of this popup on the map

### div

{DOMElement} the div that contains this popup.

### contentSize

{OpenLayers.Size} the width and height of the content.

### size

{OpenLayers.Size} the width and height of the popup.

### contentHTML

{String} An HTML string for this popup to display.

### backgroundColor

{String} the background color used by the popup.

### opacity

{float} the opacity of this popup (between 0.0 and 1.0)

### border

{String} the border size of the popup. (eg 2px)

### contentDiv

{DOMElement} a reference to the element that holds the content of the div.

### groupDiv

{DOMElement} First and only child of ‘div’. The group Div contains the ‘contentDiv’ and the ‘closeDiv’.

### closeDiv

{DOMElement} the optional closer image

### displayClass

{String} The CSS class of the popup.

### contentDisplayClass

{String} The CSS class of the popup content div.

### padding

{int or OpenLayers.Bounds} An extra opportunity to specify internal padding of the content div inside the popup. This was originally confused with the css padding as specified in style.css’s ‘olPopupContent’ class. We would like to get rid of this altogether, except that it does come in handy for the framed and anchoredbubble popups, who need to maintain yet another barrier between their content and the outer border of the popup itself.

Note that in order to not break API, we must continue to support this property being set as an integer. Really, though, we’d like to have this specified as a Bounds object so that user can specify distinct left, top, right, bottom paddings. With the 3.0 release we can make this only a bounds.

### disableFirefoxOverflowHack

{Boolean} The hack for overflow in Firefox causes all elements to be re-drawn, which causes Flash elements to be re-initialized, which is troublesome. With this property the hack can be disabled.

### fixPadding

> fixPadding: function()

To be removed in 3.0, this function merely helps us to deal with the case where the user may have set an integer value for padding, instead of an OpenLayers.Bounds object.

### map

{OpenLayers.Map} this gets set in Map.js when the popup is added to the map

### OpenLayers.Popup

Create a popup.

#### Parameters

id | {String} a unqiue identifier for this popup. If null is passed an identifier will be automatically generated.
lonlat | {OpenLayers.LonLat} The position on the map the popup will be shown.
contentSize | {OpenLayers.Size} The size of the content.
contentHTML | {String} An HTML string to display inside the popup.
closeBox | {Boolean} Whether to display a close box inside the popup.
closeBoxCallback | {Function} Function to be called on closeBox click.

### destroy

> destroy: function()

nullify references to prevent circular references and memory leaks

### draw

> draw: function( | px | )

Constructs the elements that make up the popup.

#### Parameters

px | {OpenLayers.Pixel} the position the popup in pixels.

#### Returns

{DOMElement} Reference to a div that contains the drawn popup

### updatePosition

> updatePosition: function()

if the popup has a lonlat and its map members set, then have it move itself to its proper position

### moveTo

> moveTo: function( | px | )

#### Parameters

px | {OpenLayers.Pixel} the top and left position of the popup div.

### visible

> visible: function()

#### Returns

{Boolean} Boolean indicating whether or not the popup is visible

### toggle

> toggle: function()

Toggles visibility of the popup.

### show

> show: function()

Makes the popup visible.

### hide

> hide: function()

Makes the popup invisible.

### setSize

> setSize:function( | contentSize | )

Used to adjust the size of the popup.

#### Parameters

contentSize | {OpenLayers.Size} the new size for the popup’s contents div (in pixels).

### setBackgroundColor

> setBackgroundColor:function( | color | )

Sets the background color of the popup.

#### Parameters

color | {String} the background color. eg “#FFBBBB”

### setOpacity

> setOpacity:function( | opacity | )

Sets the opacity of the popup.

#### Parameters

opacity | {float} A value between 0.0 (transparent) and 1.0 (solid).

### setBorder

> setBorder:function( | border | )

Sets the border style of the popup.

#### Parameters

border | {String} The border style value. eg 2px

### setContentHTML

> setContentHTML:function( | contentHTML | )

Allows the user to set the HTML content of the popup.

#### Parameters

contentHTML | {String} HTML for the div.

### registerImageListeners

> registerImageListeners: function()

Called when an image contained by the popup loaded. this function updates the popup size, then unregisters the image load listener.

### getContentDivPadding

> getContentDivPadding: function()

Glorious, oh glorious hack in order to determine the css ‘padding’ of the contentDiv. IE/Opera return null here unless we actually add the popup’s main ‘div’ element (which contains contentDiv) to the DOM. So we make it invisible and then add it to the document temporarily.

Once we’ve taken the padding readings we need, we then remove it from the DOM (it will actually get added to the DOM in Map.js’s addPopup)

#### Returns

{OpenLayers.Bounds}

### addCloseBox

> addCloseBox: function( | callback | )

#### Parameters

callback | {Function} The callback to be called when the close button is clicked.

### panIntoView

> panIntoView: function()

Pans the map such that the popup is totaly viewable (if necessary)

### registerEvents

> registerEvents:function()

Registers events on the popup.

Do this in a separate function so that subclasses can choose to override it if they wish to deal differently with mouse events

Note in the following handler functions that some special care is needed to deal correctly with mousing and popups.

Because the user might select the zoom-rectangle option and then drag it over a popup, we need a safe way to allow the mousemove and mouseup events to pass through the popup when they are initiated from outside. The same procedure is needed for touchmove and touchend events.

Otherwise, we want to essentially kill the event propagation for all other events, though we have to do so carefully, without disabling basic html functionality, like clicking on hyperlinks or drag-selecting text.

### onmousedown

> onmousedown: function ( | evt | )

When mouse goes down within the popup, make a note of it locally, and then do not propagate the mousedown (but do so safely so that user can select text inside)

#### Parameters

evt | {Event}

### onmousemove

> onmousemove: function ( | evt | )

If the drag was started within the popup, then do not propagate the mousemove (but do so safely so that user can select text inside)

#### Parameters

evt | {Event}

### onmouseup

> onmouseup: function ( | evt | )

When mouse comes up within the popup, after going down in it, reset the flag, and then (once again) do not propagate the event, but do so safely so that user can select text inside

#### Parameters

evt | {Event}

### onclick

> onclick: function ( | evt | )

Ignore clicks, but allowing default browser handling

#### Parameters

evt | {Event}

### onmouseout

> onmouseout: function ( | evt | )

When mouse goes out of the popup set the flag to false so that if they let go and then drag back in, we won’t be confused.

#### Parameters

evt | {Event}

### ondblclick

> ondblclick: function ( | evt | )

Ignore double-clicks, but allowing default browser handling

#### Parameters

evt | {Event}

## OpenLayers.Strategy.BBOX

A simple strategy that reads new features when the viewport invalidates some bounds.

#### Inherits from

- OpenLayers.Strategy

Summary

Properties |
bounds | {OpenLayers.Bounds} The current data bounds (in the same projection as the layer - not always the same projection as the map).
resolution | {Float} The current data resolution.
resFactor | {Float} Optional factor used to determine when previously requested features are invalid.
response | {OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.
Functions |
OpenLayers.Strategy.BBOX | Create a new BBOX strategy.
activate | Set up strategy with regard to reading new batches of remote data.
deactivate | Tear down strategy with regard to reading new batches of remote data.
update | Callback function called on “moveend” or “refresh” layer events.
getMapBounds | Get the map bounds expressed in the same projection as this layer.
invalidBounds | Determine whether the previously requested set of features is invalid.
calculateBounds |
triggerRead |
createFilter | Creates a spatial BBOX filter.
merge | Given a list of features, determine which ones to add to the layer.
Constants |
OpenLayers.Layer.Google.v3 | Mixin providing functionality specific to the Google Maps API v3.
DEFAULTS | {Object} It is not recommended to change the properties set here.
Functions |
loadMapObject | Load the GMap and register appropriate event listeners.
setGMapVisibility | Display the GMap container and associated elements.
getMapContainer | {DOMElement} the GMap container’s div

### Properties

### bounds

{OpenLayers.Bounds} The current data bounds (in the same projection as the layer - not always the same projection as the map).

### resolution

{Float} The current data resolution.

### resFactor

{Float} Optional factor used to determine when previously requested features are invalid. If set, the resFactor will be compared to the resolution of the previous request to the current map resolution. If resFactor > (old / new) and 1/resFactor < (old / new). If you set a resFactor of 1, data will be requested every time the resolution changes. If you set a resFactor of 3, data will be requested if the old resolution is 3 times the new, or if the new is 3 times the old. If the old bounds do not contain the new bounds new data will always be requested (with or without considering resFactor).

### response

{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.

### Functions

### OpenLayers.Strategy.BBOX

Create a new BBOX strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### activate

> activate: function()

Set up strategy with regard to reading new batches of remote data.

#### Returns

{Boolean} The strategy was successfully activated.

### deactivate

> deactivate: function()

Tear down strategy with regard to reading new batches of remote data.

#### Returns

{Boolean} The strategy was successfully deactivated.

### update

> update: function( | options | )

Callback function called on “moveend” or “refresh” layer events.

#### Parameters

options | {Object} Optional object whose properties will determine the behaviour of this Strategy

#### Valid options include

force | {Boolean} if true, new data must be unconditionally read.
noAbort | {Boolean} if true, do not abort previous requests.

### getMapBounds

> getMapBounds: function()

Get the map bounds expressed in the same projection as this layer.

#### Returns

{OpenLayers.Bounds} Map bounds in the projection of the layer.

### invalidBounds

> invalidBounds: function( | mapBounds | )

Determine whether the previously requested set of features is invalid. This occurs when the new map bounds do not contain the previously requested bounds. In addition, if resFactor is set, it will be considered.

#### Parameters

mapBounds | {OpenLayers.Bounds} the current map extent, will be retrieved from the map object if not provided

#### Returns

{Boolean}

### calculateBounds

> calculateBounds: function( | mapBounds | )

#### Parameters

mapBounds | {OpenLayers.Bounds} the current map extent, will be retrieved from the map object if not provided

### triggerRead

> triggerRead: function( | options | )

#### Parameters

options | {Object} Additional options for the protocol’s read method (optional)

#### Returns

{OpenLayers.Protocol.Response} The protocol response object returned by the layer protocol.

### createFilter

> createFilter: function()

Creates a spatial BBOX filter. If the layer that this strategy belongs to has a filter property, this filter will be combined with the BBOX filter.

Returns {OpenLayers.Filter} The filter object.

### merge

> merge: function( | resp | )

Given a list of features, determine which ones to add to the layer. If the layer projection differs from the map projection, features will be transformed from the layer projection to the map projection.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object passed by the protocol.

### Constants

### OpenLayers.Layer.Google.v3

Mixin providing functionality specific to the Google Maps API v3.

To use this layer, you must include the GMaps v3 API in your html.

Note that this layer configures the google.maps.map object with the “disableDefaultUI” option set to true. Using UI controls that the Google Maps API provides is not supported by the OpenLayers API.

### DEFAULTS

{Object} It is not recommended to change the properties set here. Note that Google.v3 layers only work when sphericalMercator is set to true.

>     {
>         sphericalMercator: true,
>         projection: "EPSG:900913"
>     }

### Functions

### loadMapObject

> loadMapObject: function()

Load the GMap and register appropriate event listeners.

### setGMapVisibility

> setGMapVisibility: function( | visible | )

Display the GMap container and associated elements.

#### Parameters

visible | {Boolean} Display the GMap elements.

### getMapContainer

> getMapContainer: function()

#### Returns

{DOMElement} the GMap container’s div

## OpenLayers.Request

The OpenLayers.Request namespace contains convenience methods for working with XMLHttpRequests. These methods work with a cross-browser W3C compliant OpenLayers.Request.XMLHttpRequest class.

Summary

Constants |
DEFAULT_CONFIG | {Object} Default configuration for all requests.
URL_SPLIT_REGEX |
Functions |
makeSameOrigin | Using the specified proxy, returns a same origin url of the provided url.
runCallbacks | Calls the complete, success and failure callbacks.

### Constants

### DEFAULT_CONFIG

{Object} Default configuration for all requests.

### URL_SPLIT_REGEX

### Functions

### makeSameOrigin

> makeSameOrigin: function( | url,
> | proxy | )

Using the specified proxy, returns a same origin url of the provided url.

#### Parameters

url | {String} An arbitrary url proxy {String|Function} The proxy to use to make the provided url a same origin url.

Returns {String} the same origin url. If no proxy is provided, the returned url will be the same as the provided url.

### runCallbacks

> runCallbacks: function( | options | )

Calls the complete, success and failure callbacks. Application can listen to the “complete” event, have the listener display a confirm window and always return false, and execute OpenLayers.Request.runCallbacks if the user hits “yes” in the confirm window.

#### Parameters

options | {Object} Hash containing request, config and requestUrl keys

## OpenLayers.Request.XMLHttpRequest

Standard-compliant (W3C) cross-browser implementation of the XMLHttpRequest object. From http://code.google.com/p/xmlhttprequest/.

## OpenLayers.Marker.Box

#### Inherits from

- OpenLayers.Marker

Summary

Properties |
bounds | {OpenLayers.Bounds}
div | {DOMElement}
Functions |
OpenLayers.Marker.Box |
destroy |
setBorder | Allow the user to change the box’s color and border width
draw |
onScreen | {Boolean} Whether or not the marker is currently visible on screen.
display | Hide or show the icon

### Properties

### bounds

{OpenLayers.Bounds}

### div

{DOMElement}

### Functions

### OpenLayers.Marker.Box

#### Parameters

bounds | {OpenLayers.Bounds}
borderColor | {String}
borderWidth | {int}

### destroy

> destroy: function()

### setBorder

> setBorder: function ( | color,
> | width | )

Allow the user to change the box’s color and border width

#### Parameters

color | {String} Default is “red”
width | {int} Default is 2

### draw

> draw: function( | px,
> | sz | )

#### Parameters

px | {OpenLayers.Pixel}
sz | {OpenLayers.Size}

#### Returns

{DOMElement} A new DOM Image with this marker’s icon set at the location passed-in

### onScreen

> onScreen:function()

#### Rreturn

{Boolean} Whether or not the marker is currently visible on screen.

### display

> display: function( | display | )

Hide or show the icon

#### Parameters

display | {Boolean}

## OpenLayers.Layer.MapGuide

Instances of OpenLayers.Layer.MapGuide are used to display data from a MapGuide OS instance.

#### Inherits from

- OpenLayers.Layer.Grid

Summary

Constants |
TILE_PARAMS | {Object} Hashtable of default parameter key/value pairs for tiled layer
SINGLE_TILE_PARAMS | {Object} Hashtable of default parameter key/value pairs for untiled layer
OVERLAY_PARAMS | {Object} Hashtable of default parameter key/value pairs for untiled layer
FOLDER_PARAMS | {Object} Hashtable of parameter key/value pairs which describe the folder structure for tiles as configured in the mapguide serverconfig.ini section [TileServiceProperties]
Properties |
defaultSize | {OpenLayers.Size} Tile size as produced by MapGuide server
tileOriginCorner | {String} MapGuide tile server uses top-left as tile origin
Functions |
OpenLayers.Layer.MapGuide | Create a new Mapguide layer, either tiled or untiled.
clone | Create a clone of this layer
getURL | Return a query string for this layer
getFullRequestString | getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.
getImageFilePath | special handler to request mapguide tiles from an http exposed tilecache

### Constants

### TILE_PARAMS

{Object} Hashtable of default parameter key/value pairs for tiled layer

### SINGLE_TILE_PARAMS

{Object} Hashtable of default parameter key/value pairs for untiled layer

### OVERLAY_PARAMS

{Object} Hashtable of default parameter key/value pairs for untiled layer

### FOLDER_PARAMS

{Object} Hashtable of parameter key/value pairs which describe the folder structure for tiles as configured in the mapguide serverconfig.ini section [TileServiceProperties]

### Properties

### defaultSize

{OpenLayers.Size} Tile size as produced by MapGuide server

### tileOriginCorner

{String} MapGuide tile server uses top-left as tile origin

### Functions

### OpenLayers.Layer.MapGuide

Create a new Mapguide layer, either tiled or untiled.

For tiled layers, the ‘groupName’ and ‘mapDefinition’ values must be specified as parameters in the constructor.

For untiled base layers, specify either combination of ‘mapName’ and ‘session’, or ‘mapDefinition’ and ‘locale’.

For older versions of MapGuide and overlay layers, set useAsyncOverlay to false and in this case mapName and session are required parameters for the constructor.

NOTE: MapGuide OS uses a DPI value and degrees to meters conversion factor that are different than the defaults used in OpenLayers, so these must be adjusted accordingly in your application. See the MapGuide example for how to set these values for MGOS.

#### Parameters

name | {String} Name of the layer displayed in the interface
url | {String} Location of the MapGuide mapagent executable (e.g. http://localhost:8008/mapguide/mapagent/mapagent.fcgi)
params | {Object} hashtable of additional parameters to use. Some parameters may require additional code on the server. The ones that you may want to use are:

- mapDefinition - {String} The MapGuide resource definition (e.g. Library://Samples/Gmap/Maps/gmapTiled.MapDefinition)
- locale - Locale setting (for untiled overlays layers only)
- mapName - {String} Name of the map as stored in the MapGuide session. (for untiled layers with a session parameter only)
- session - { String} MapGuide session ID (for untiled overlays layers only)
- basemaplayergroupname - {String} GroupName for tiled MapGuide layers only
- format - Image format to be returned (for untiled overlay layers only)
- showLayers - {String} A comma separated list of GUID’s for the layers to display eg: ‘cvc-xcv34,453-345-345sdf’.
- hideLayers - {String} A comma separated list of GUID’s for the layers to hide eg: ‘cvc-xcv34,453-345-345sdf’.
- showGroups - {String} A comma separated list of GUID’s for the groups to display eg: ‘cvc-xcv34,453-345-345sdf’.
- hideGroups - {String} A comma separated list of GUID’s for the groups to hide eg: ‘cvc-xcv34,453-345-345sdf’
- selectionXml - {String} A selection xml string Some server plumbing is required to read such a value.

options | {Object} Hashtable of extra options to tag onto the layer; will vary depending if tiled or untiled maps are being requested

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

{OpenLayers.Layer.MapGuide} An exact clone of this layer

### getURL

> getURL: function ( | bounds | )

Return a query string for this layer

#### Parameters

bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request

#### Returns

{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.

### getFullRequestString

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

getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’. This is why it is subclassed here.

#### Parameters

altUrl | {String} Alternative base URL to use.

#### Returns

{String} A string with the layer’s url appropriately encoded for MapGuide

### getImageFilePath

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

special handler to request mapguide tiles from an http exposed tilecache

#### Parameters

altUrl | {String} Alternative base URL to use.

#### Returns

{String} A string with the url for the tile image

## OpenLayers.Control.Measure

Allows for drawing of features for measurements.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
callbacks | {Object} The functions that are sent to the handler for callback
displaySystemUnits | {Object} Units for various measurement systems.
delay | {Number} Number of milliseconds between clicks before the event is considered a double-click.
delayedTrigger | {Number} Timeout id of trigger for measurepartial.
Functions |
OpenLayers.Control.Measure |
updateHandler |
measureComplete | Called when the measurement sketch is done.
measurePartial | Called each time a new point is added to the measurement sketch.
measureImmediate | Called each time the measurement sketch is modified.
cancelDelay | Cancels the delay measurement that measurePartial began.
measure |
getBestArea | Based on the <displaySystem> returns the area of a geometry.
getArea |
getBestLength | Based on the <displaySystem> returns the length of a geometry.
getLength |

### Properties

### callbacks

{Object} The functions that are sent to the handler for callback

### displaySystemUnits

{Object} Units for various measurement systems. Values are arrays of unit abbreviations (from OpenLayers.INCHES_PER_UNIT) in decreasing order of length.

### delay

{Number} Number of milliseconds between clicks before the event is considered a double-click. The “measurepartial” event will not be triggered if the sketch is completed within this time. This is required for IE where creating a browser reflow (if a listener is modifying the DOM by displaying the measurement values) messes with the dblclick listener in the sketch handler.

### delayedTrigger

{Number} Timeout id of trigger for measurepartial.

### Functions

### OpenLayers.Control.Measure

#### Parameters

handler | {OpenLayers.Handler}
options | {Object}

### updateHandler

> updateHandler: function( | handler,
> | options | )

#### Parameters

handler | {Function} One of the sketch handler constructors.
options | {Object} Options for the handler.

### measureComplete

> measureComplete: function( | geometry | )

Called when the measurement sketch is done.

#### Parameters

geometry | {OpenLayers.Geometry}

### measurePartial

> measurePartial: function( | point,
> | geometry | )

Called each time a new point is added to the measurement sketch.

#### Parameters

point | {OpenLayers.Geometry.Point} The last point added.
geometry | {OpenLayers.Geometry} The sketch geometry.

### measureImmediate

> measureImmediate : function( | point,
> | feature,
> | drawing | )

Called each time the measurement sketch is modified.

#### Parameters

point | {OpenLayers.Geometry.Point} The point at the mouse position.
feature | {OpenLayers.Feature.Vector} The sketch feature.
drawing | {Boolean} Indicates whether we’re currently drawing.

### cancelDelay

> cancelDelay: function()

Cancels the delay measurement that measurePartial began.

### measure

> measure: function( | geometry,
> | eventType | )

#### Parameters

geometry | {OpenLayers.Geometry}
eventType | {String}

### getBestArea

> getBestArea: function( | geometry | )

Based on the <displaySystem> returns the area of a geometry.

#### Parameters

geometry | {OpenLayers.Geometry}

#### Returns

{Array([Float, String])} Returns a two item array containing the area and the units abbreviation.

### getArea

> getArea: function( | geometry,
> | units | )

#### Parameters

geometry | {OpenLayers.Geometry}
units | {String} Unit abbreviation

#### Returns

{Float} The geometry area in the given units.

### getBestLength

> getBestLength: function( | geometry | )

Based on the <displaySystem> returns the length of a geometry.

#### Parameters

geometry | {OpenLayers.Geometry}

#### Returns

{Array([Float, String])} Returns a two item array containing the length and the units abbreviation.

### getLength

> getLength: function( | geometry,
> | units | )

#### Parameters

geometry | {OpenLayers.Geometry}
units | {String} Unit abbreviation

#### Returns

{Float} The geometry length in the given units.

## OpenLayers.Control.DrawFeature

The DrawFeature control draws point, line or polygon features on a vector layer when active.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
layer | {OpenLayers.Layer.Vector}
callbacks | {Object} The functions that are sent to the handler for callback
Functions |
OpenLayers.Control.DrawFeature |
drawFeature |

### Properties

### layer

{OpenLayers.Layer.Vector}

### callbacks

{Object} The functions that are sent to the handler for callback

### Functions

### OpenLayers.Control.DrawFeature

#### Parameters

layer | {OpenLayers.Layer.Vector}
handler | {OpenLayers.Handler}
options | {Object}

### drawFeature

> drawFeature: function( | geometry | )

## OpenLayers.Rule

This class represents an SLD Rule, as being used for rule-based SLD styling.

Summary

Properties |
id | {String} A unique id for this session.
title | {String} Title of this rule (set if included in SLD)
description | {String} Description of this rule (set if abstract is included in SLD)
context | {Object} An optional object with properties that the rule should be evaluated against.
filter | {OpenLayers.Filter} Optional filter for the rule.
elseFilter | {Boolean} Determines whether this rule is only to be applied only if no other rules match (ElseFilter according to the SLD specification).
symbolizer | {Object} Symbolizer or hash of symbolizers for this rule.
symbolizers | {Array} Collection of symbolizers associated with this rule.
Functions |
OpenLayers.Rule | Creates a Rule.
getContext | Gets the context for evaluating this rule

### Properties

### id

{String} A unique id for this session.

### title

{String} Title of this rule (set if included in SLD)

### description

{String} Description of this rule (set if abstract is included in SLD)

### context

{Object} An optional object with properties that the rule should be evaluated against. If no context is specified, feature.attributes will be used.

### filter

{OpenLayers.Filter} Optional filter for the rule.

### elseFilter

{Boolean} Determines whether this rule is only to be applied only if no other rules match (ElseFilter according to the SLD specification). Default is false. For instances of OpenLayers.Rule, if elseFilter is false, the rule will always apply. For subclasses, the else property is ignored.

### symbolizer

{Object} Symbolizer or hash of symbolizers for this rule. If hash of symbolizers, keys are one or more of [“Point”, “Line”, “Polygon”]. The latter if useful if it is required to style e.g. vertices of a line with a point symbolizer. Note, however, that this is not implemented yet in OpenLayers, but it is the way how symbolizers are defined in SLD.

### symbolizers

{Array} Collection of symbolizers associated with this rule. If provided at construction, the symbolizers array has precedence over the deprecated symbolizer property. Note that multiple symbolizers are not currently supported by the vector renderers. Rules with multiple symbolizers are currently only useful for maintaining elements in an SLD document.

### Functions

### OpenLayers.Rule

Creates a Rule.

#### Parameters

options | {Object} An optional object with properties to set on the rule

#### Returns

{OpenLayers.Rule}

### getContext

> getContext: function( | feature | )

Gets the context for evaluating this rule

#### Paramters

feature | {OpenLayers.Feature} feature to take the context from if none is specified.

## OpenLayers.Handler.Pinch

The pinch handler is used to deal with sequences of browser events related to pinch gestures. The handler is used by controls that want to know when a pinch sequence begins, when a pinch is happening, and when it has finished.

Controls that use the pinch handler typically construct it with callbacks for ‘start’, ‘move’, and ‘done’. Callbacks for these keys are called when the pinch begins, with each change, and when the pinch is done.

Create a new pinch handler with the OpenLayers.Handler.Pinch constructor.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
started | {Boolean} When a touchstart event is received, we want to record it, but not set ‘pinching’ until the touchmove get started after starting.
stopDown | {Boolean} Stop propagation of touchstart events from getting to listeners on the same element.
pinching | {Boolean}
last | {Object} Object that store informations related to pinch last touch.
start | {Object} Object that store informations related to pinch touchstart.
Functions |
OpenLayers.Handler.Pinch | Returns OpenLayers.Handler.Pinch
touchstart | Handle touchstart events
touchmove | Handle touchmove events
touchend | Handle touchend events
activate | Activate the handler.
deactivate | Deactivate the handler.
getDistance | Get the distance in pixels between two touches.
getPinchData | Get informations about the pinch event.

### Properties

### started

{Boolean} When a touchstart event is received, we want to record it, but not set ‘pinching’ until the touchmove get started after starting.

### stopDown

{Boolean} Stop propagation of touchstart events from getting to listeners on the same element. Default is false.

### pinching

{Boolean}

### last

{Object} Object that store informations related to pinch last touch.

### start

{Object} Object that store informations related to pinch touchstart.

### Functions

### OpenLayers.Handler.Pinch

Returns OpenLayers.Handler.Pinch

#### Parameters

control | {OpenLayers.Control} The control that is making use of this handler. If a handler is being used without a control, the handlers setMap method must be overridden to deal properly with the map.
callbacks | {Object} An object containing functions to be called when the pinch operation start, change, or is finished. The callbacks should expect to receive an object argument, which contains information about scale, distance, and position of touch points.
options | {Object}

### touchstart

> touchstart: function( | evt | )

Handle touchstart events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### touchmove

> touchmove: function( | evt | )

Handle touchmove events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### touchend

> touchend: function( | evt | )

Handle touchend events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### activate

> activate: function()

Activate the handler.

#### Returns

{Boolean} The handler was successfully activated.

### deactivate

> deactivate: function()

Deactivate the handler.

#### Returns

{Boolean} The handler was successfully deactivated.

### getDistance

> getDistance: function( | touches | )

Get the distance in pixels between two touches.

#### Parameters

touches | {Array(Object)}

#### Returns

{Number} The distance in pixels.

### getPinchData

> getPinchData: function( | evt | )

Get informations about the pinch event.

#### Parameters

evt | {Event}

#### Returns

{Object} Object that contains data about the current pinch.

## OpenLayers.Handler.Hover

The hover handler is to be used to emulate mouseovers on objects on the map that aren’t DOM elements. For example one can use this handler to send WMS/GetFeatureInfo requests as the user moves the mouve over the map.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
px |
timerId |
Functions |
OpenLayers.Handler.Hover | Construct a hover handler.
mousemove | Called when the mouse moves on the map.
mouseout | Called when the mouse goes out of the map.
passesTolerance | Determine whether the mouse move is within the optional pixel tolerance.
clearTimer | Clear the timer and set timerId to null.
delayedCall | Triggers pause callback.

### Properties

### px

{<OpenLayers.Pixel>} | The location of the last mousemove, expressed in pixels.

### timerId

{Number} | The id of the timer.

### Functions

### OpenLayers.Handler.Hover

Construct a hover handler.

#### Parameters

control | {OpenLayers.Control} The control that initialized this handler. The control is assumed to have a valid map property; that map is used in the handler’s own setMap method.
callbacks | {Object} An object with keys corresponding to callbacks that will be called by the handler. The callbacks should expect to receive a single argument, the event. Callbacks for ‘move’, the mouse is moving, and ‘pause’, the mouse is pausing, are supported.
options | {Object} An optional object whose properties will be set on the handler.

### mousemove

> mousemove: function( | evt | )

Called when the mouse moves on the map.

#### Parameters

evt | {OpenLayers.Event}

#### Returns

{Boolean} Continue propagating this event.

### mouseout

> mouseout: function( | evt | )

Called when the mouse goes out of the map.

#### Parameters

evt | {OpenLayers.Event}

#### Returns

{Boolean} Continue propagating this event.

### passesTolerance

> passesTolerance: function( | px | )

Determine whether the mouse move is within the optional pixel tolerance.

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{Boolean} The mouse move is within the pixel tolerance.

### clearTimer

> clearTimer: function()

Clear the timer and set timerId to null.

### delayedCall

> delayedCall: function( | evt | )

Triggers pause callback.

#### Parameters

evt | {OpenLayers.Event}

## OpenLayers.Format.WFSDescribeFeatureType

Read WFS DescribeFeatureType response

#### Inherits from

- OpenLayers.Format.XML

Summary

Properties and Functions |
regExes | Compiled regular expressions for manipulating strings.
namespaces | {Object} Mapping of namespace aliases to namespace URIs.
OpenLayers.Format.WFSDescribeFeatureType | Create a new parser for WFS DescribeFeatureType responses.
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.
readRestriction | Reads restriction defined in the child nodes of a restriction element
read |

### Properties and Functions

### regExes

Compiled regular expressions for manipulating strings.

### namespaces

{Object} Mapping of namespace aliases to namespace URIs.

### OpenLayers.Format.WFSDescribeFeatureType

Create a new parser for WFS DescribeFeatureType responses.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

### readRestriction

> readRestriction: function( | node,
> | obj | )

Reads restriction defined in the child nodes of a restriction element

#### Parameters

node | {DOMElement} the node to parse
obj | {Object} the object that receives the read result

### read

> read: function( | data | )

#### Parameters

data | {DOMElement|String} A WFS DescribeFeatureType document.

#### Returns

{Object} An object representing the WFS DescribeFeatureType response.

## OpenLayers.Strategy.Refresh

A strategy that refreshes the layer. By default the strategy waits for a call to <refresh> before refreshing. By configuring the strategy with the interval option, refreshing can take place automatically.

#### Inherits from

- OpenLayers.Strategy

Summary

Properties |
force | {Boolean} Force a refresh on the layer.
interval | {Number} Auto-refresh.
timer | {Number} The id of the timer.
Functions |
OpenLayers.Strategy.Refresh | Create a new Refresh strategy.
reset | Start or cancel the refresh interval depending on the visibility of the layer.
start | Start the refresh interval.
stop | Cancels the refresh interval.

### Properties

### force

{Boolean} Force a refresh on the layer. Default is false.

### interval

{Number} Auto-refresh. Default is 0. If > 0, layer will be refreshed every N milliseconds.

### timer

{Number} The id of the timer.

### Functions

### OpenLayers.Strategy.Refresh

Create a new Refresh strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### reset

> reset: function()

Start or cancel the refresh interval depending on the visibility of the layer.

### start

> start: function()

Start the refresh interval.

### stop

> stop: function()

Cancels the refresh interval.

## OpenLayers.Control.MousePosition

The MousePosition control displays geographic coordinates of the mouse pointer, as it is moved about the map.

You can use the <prefix>- or <suffix>-properties to provide more information about the displayed coordinates to the user:

>     var mousePositionCtrl = new OpenLayers.Control.MousePosition({
>         prefix: '<a target="_blank" ' +
>             'href="http://spatialreference.org/ref/epsg/4326/">' +
>             'EPSG:4326</a> coordinates: '
>         }
>     );

#### Inherits from

- OpenLayers.Control

Summary

Properties |
element | {DOMElement}
lastXy | {OpenLayers.Pixel}
Functions |
OpenLayers.Control.MousePosition |
destroy |
draw | {DOMElement}
redraw |
reset |
formatOutput | Override to provide custom display output

### Properties

### element

{DOMElement}

### lastXy

{OpenLayers.Pixel}

### Functions

### OpenLayers.Control.MousePosition

#### Parameters

options | {Object} Options for control.

### destroy

> destroy: function()

### draw

> draw: function()

{DOMElement}

### redraw

> redraw: function( | evt | )

### reset

> reset: function( | evt | )

### formatOutput

> formatOutput: function( | lonLat | )

Override to provide custom display output

#### Parameters

lonLat | {OpenLayers.LonLat} Location to display

## OpenLayers.Protocol.HTTP

A basic HTTP protocol for vector layers. Create a new instance with the OpenLayers.Protocol.HTTP constructor.

#### Inherits from

- OpenLayers.Protocol

Summary

Properties |
url | {String} Service URL, read-only, set through the options passed to constructor.
headers | {Object} HTTP request headers, read-only, set through the options passed to the constructor, Example: {‘Content-Type’: ‘plain/text’}
params | {Object} Parameters of GET requests, read-only, set through the options passed to the constructor, Example: {‘bbox’: ‘5,5,5,5’}
callback | {Object} Function to be called when the <read>, <create>, <update>, <delete> or <commit> operation completes, read-only, set through the options passed to the constructor.
scope | {Object} Callback execution scope, read-only, set through the options passed to the constructor.
wildcarded. | {Boolean} If true percent signs are added around values read from LIKE filters, for example if the protocol read method is passed a LIKE filter whose property is “foo” and whose value is “bar” the string “foo__ilike=%bar%” will be sent in the query string; defaults to false.
Functions |
OpenLayers.Protocol.HTTP | A class for giving layers generic HTTP protocol.
handleRead | Individual callbacks are created for read, create and update, should a subclass need to override each one separately.
handleCreate | Called the the request issued by <create> is complete.
handleUpdate | Called the the request issued by <update> is complete.
handleDelete | Called the the request issued by <delete> is complete.
handleResponse | Called by CRUD specific handlers.
parseFeatures | Read HTTP response body and return features.
callUserCallback | This method is used from within the commit method each time an an HTTP response is received from the server, it is responsible for calling the user-supplied callbacks.

### Properties

### url

{String} Service URL, read-only, set through the options passed to constructor.

### headers

{Object} HTTP request headers, read-only, set through the options passed to the constructor, Example: {‘Content-Type’: ‘plain/text’}

### params

{Object} Parameters of GET requests, read-only, set through the options passed to the constructor, Example: {‘bbox’: ‘5,5,5,5’}

### callback

{Object} Function to be called when the <read>, <create>, <update>, <delete> or <commit> operation completes, read-only, set through the options passed to the constructor.

### scope

{Object} Callback execution scope, read-only, set through the options passed to the constructor.

### wildcarded.

{Boolean} If true percent signs are added around values read from LIKE filters, for example if the protocol read method is passed a LIKE filter whose property is “foo” and whose value is “bar” the string “foo__ilike=%bar%” will be sent in the query string; defaults to false.

### Functions

### OpenLayers.Protocol.HTTP

A class for giving layers generic HTTP protocol.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Valid options include

url | {String}
headers | {Object}
params | {Object} URL parameters for GET requests
format | {OpenLayers.Format}
callback | {Function}
scope | {Object}

### handleRead

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

Individual callbacks are created for read, create and update, should a subclass need to override each one separately.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object to pass to the user callback.
options | {Object} The user options passed to the read call.

### handleCreate

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

Called the the request issued by <create> is complete. May be overridden by subclasses.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object to pass to any user callback.
options | {Object} The user options passed to the create call.

### handleUpdate

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

Called the the request issued by <update> is complete. May be overridden by subclasses.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object to pass to any user callback.
options | {Object} The user options passed to the update call.

### handleDelete

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

Called the the request issued by <delete> is complete. May be overridden by subclasses.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object to pass to any user callback.
options | {Object} The user options passed to the delete call.

### handleResponse

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

Called by CRUD specific handlers.

#### Parameters

resp | {OpenLayers.Protocol.Response} The response object to pass to any user callback.
options | {Object} The user options passed to the create, read, update, or delete call.

### parseFeatures

> parseFeatures: function( | request | )

Read HTTP response body and return features.

#### Parameters

request | {XMLHttpRequest} The request object

#### Returns

{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} Array of features or a single feature.

### callUserCallback

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

This method is used from within the commit method each time an an HTTP response is received from the server, it is responsible for calling the user-supplied callbacks.

#### Parameters

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

## OpenLayers.Strategy.Cluster

Strategy for vector feature clustering.

#### Inherits from

- OpenLayers.Strategy

Summary

Properties |
features | {Array(OpenLayers.Feature.Vector)} Cached features.
clusters | {Array(OpenLayers.Feature.Vector)} Calculated clusters.
clustering | {Boolean} The strategy is currently clustering features.
resolution | {Float} The resolution (map units per pixel) of the current cluster set.
Functions |
OpenLayers.Strategy.Cluster | Create a new clustering strategy.
cacheFeatures | Cache features before they are added to the layer.
clearCache | Clear out the cached features.
cluster | Cluster features based on some threshold distance.
clustersExist | Determine whether calculated clusters are already on the layer.
shouldCluster | Determine whether to include a feature in a given cluster.
addToCluster | Add a feature to a cluster.
createCluster | Given a feature, create a cluster.

### Properties

### features

{Array(OpenLayers.Feature.Vector)} Cached features.

### clusters

{Array(OpenLayers.Feature.Vector)} Calculated clusters.

### clustering

{Boolean} The strategy is currently clustering features.

### resolution

{Float} The resolution (map units per pixel) of the current cluster set.

### Functions

### OpenLayers.Strategy.Cluster

Create a new clustering strategy.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

### cacheFeatures

> cacheFeatures: function( | event | )

Cache features before they are added to the layer.

#### Parameters

event | {Object} The event that this was listening for. This will come with a batch of features to be clustered.

#### Returns

{Boolean} False to stop features from being added to the layer.

### clearCache

> clearCache: function()

Clear out the cached features.

### cluster

> cluster: function( | event | )

Cluster features based on some threshold distance.

#### Parameters

event | {Object} The event received when cluster is called as a result of a moveend event.

### clustersExist

> clustersExist: function()

Determine whether calculated clusters are already on the layer.

#### Returns

{Boolean} The calculated clusters are already on the layer.

### shouldCluster

> shouldCluster: function( | cluster,
> | feature | )

Determine whether to include a feature in a given cluster.

#### Parameters

cluster | {OpenLayers.Feature.Vector} A cluster.
feature | {OpenLayers.Feature.Vector} A feature.

#### Returns

{Boolean} The feature should be included in the cluster.

### addToCluster

> addToCluster: function( | cluster,
> | feature | )

Add a feature to a cluster.

#### Parameters

cluster | {OpenLayers.Feature.Vector} A cluster.
feature | {OpenLayers.Feature.Vector} A feature.

### createCluster

> createCluster: function( | feature | )

Given a feature, create a cluster.

#### Parameters

feature | {OpenLayers.Feature.Vector}

#### Returns

{OpenLayers.Feature.Vector} A cluster.

## OpenLayers.Control.OverviewMap

The OverMap control creates a small overview map, useful to display the extent of a zoomed map and your main map and provide additional navigation options to the User. By default the overview map is drawn in the lower right corner of the main map. Create a new overview map with the OpenLayers.Control.OverviewMap constructor.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
element | {DOMElement} The DOM element that contains the overview map
handlers | {Object}
resolutionFactor | {Object}
Functions |
OpenLayers.Control.OverviewMap | Create a new overview map
draw | Render the control in the browser.
baseLayerDraw |
rectDrag | Handle extent rectangle drag
mapDivClick | Handle browser events
onButtonClick |
maximizeControl | Unhide the control.
minimizeControl | Hide all the contents of the control, shrink the size, add the maximize icon
showToggle | Hide/Show the toggle depending on whether the control is minimized
update | Update the overview map after layers move.
isSuitableOverview | Determines if the overview map is suitable given the extent and resolution of the main map.
createMap | Construct the map that this control contains
updateRectToMap | Updates the extent rectangle position and size to match the map extent
updateMapToRect | Updates the map extent to match the extent rectangle position and size
setRectPxBounds | Set extent rectangle pixel bounds.
getRectBoundsFromMapBounds | Get the rect bounds from the map bounds.
getMapBoundsFromRectBounds | Get the map bounds from the rect bounds.
getLonLatFromOverviewPx | Get a map location from a pixel location
getOverviewPxFromLonLat | Get a pixel location from a map location

### Properties

### element

{DOMElement} The DOM element that contains the overview map

### handlers

{Object}

### resolutionFactor

{Object}

### Functions

### OpenLayers.Control.OverviewMap

Create a new overview map

#### Parameters

options | {Object} Properties of this object will be set on the overview map object. Note, to set options on the map object contained in this control, set <mapOptions> as one of the options properties.

### draw

> draw: function()

Render the control in the browser.

### baseLayerDraw

> baseLayerDraw: function()

Draw the base layer | called if unable to complete in the initial draw

### rectDrag

> rectDrag: function( | px | )

Handle extent rectangle drag

#### Parameters

px | {OpenLayers.Pixel} The pixel location of the drag.

### mapDivClick

> mapDivClick: function( | evt | )

Handle browser events

#### Parameters

evt | {OpenLayers.Event} evt

### onButtonClick

> onButtonClick: function( | evt | )

#### Parameters

evt | {Event}

### maximizeControl

> maximizeControl: function( | e | )

Unhide the control. Called when the control is in the map viewport.

#### Parameters

e | {OpenLayers.Event}

### minimizeControl

> minimizeControl: function( | e | )

Hide all the contents of the control, shrink the size, add the maximize icon

#### Parameters

e | {OpenLayers.Event}

### showToggle

> showToggle: function( | minimize | )

Hide/Show the toggle depending on whether the control is minimized

#### Parameters

minimize | {Boolean}

### update

> update: function()

Update the overview map after layers move.

### isSuitableOverview

> isSuitableOverview: function()

Determines if the overview map is suitable given the extent and resolution of the main map.

### createMap

> createMap: function()

Construct the map that this control contains

### updateRectToMap

> updateRectToMap: function()

Updates the extent rectangle position and size to match the map extent

### updateMapToRect

> updateMapToRect: function()

Updates the map extent to match the extent rectangle position and size

### setRectPxBounds

> setRectPxBounds: function( | pxBounds | )

Set extent rectangle pixel bounds.

#### Parameters

pxBounds | {OpenLayers.Bounds}

### getRectBoundsFromMapBounds

> getRectBoundsFromMapBounds: function( | lonLatBounds | )

Get the rect bounds from the map bounds.

#### Parameters

lonLatBounds | {OpenLayers.Bounds}

#### Returns

{OpenLayers.Bounds}A bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map

### getMapBoundsFromRectBounds

> getMapBoundsFromRectBounds: function( | pxBounds | )

Get the map bounds from the rect bounds.

#### Parameters

pxBounds | {OpenLayers.Bounds}

#### Returns

{OpenLayers.Bounds} Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map

### getLonLatFromOverviewPx

> getLonLatFromOverviewPx: function( | overviewMapPx | )

Get a map location from a pixel location

#### Parameters

overviewMapPx | {<OpenLayers.Pixel>|Object} OpenLayers.Pixel or an object with a ‘x’ and ‘y’ properties.

#### Returns

{Object} Location which is the passed-in overview map OpenLayers.Pixel, translated into lon/lat by the overview map. An object with a ‘lon’ and ‘lat’ properties.

### getOverviewPxFromLonLat

> getOverviewPxFromLonLat: function( | lonlat | )

Get a pixel location from a map location

#### Parameters

lonlat | {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an object with a ‘lon’ and ‘lat’ properties.

#### Returns

{Object} Location which is the passed-in OpenLayers.LonLat, translated into overview map pixels

## OpenLayers.Control.PinchZoom

#### Inherits

- OpenLayers.Control

Summary

Properties |
type | {OpenLayers.Control.TYPES}
pinchOrigin | {Object} Cached object representing the pinch start (in pixels).
currentCenter | {Object} Cached object representing the latest pinch center (in pixels).
Functions |
OpenLayers.Control.PinchZoom | Create a control for zooming with pinch gestures.
pinchStart |
pinchMove |
pinchDone |

### Properties

### type

{OpenLayers.Control.TYPES}

### pinchOrigin

{Object} Cached object representing the pinch start (in pixels).

### currentCenter

{Object} Cached object representing the latest pinch center (in pixels).

### Functions

### OpenLayers.Control.PinchZoom

Create a control for zooming with pinch gestures. This works on devices with multi-touch support.

#### Parameters

options | {Object} An optional object whose properties will be set on the control

### pinchStart

> pinchStart: function( | evt,
> | pinchData | )

#### Parameters

evt | {Event}
pinchData | {Object} pinch data object related to the current touchmove of the pinch gesture. This give us the current scale of the pinch.

### pinchMove

> pinchMove: function( | evt,
> | pinchData | )

#### Parameters

evt | {Event}
pinchData | {Object} pinch data object related to the current touchmove of the pinch gesture. This give us the current scale of the pinch.

### pinchDone

> pinchDone: function( | evt,
> | start,
> | last | )

#### Parameters

evt | {Event}
start | {Object} pinch data object related to the touchstart event that started the pinch gesture.
last | {Object} pinch data object related to the last touchmove event of the pinch gesture. This give us the final scale of the pinch.

## OpenLayers.Control.TouchNavigation

The navigation control handles map browsing with touch events (dragging, double-tapping, tap with two fingers, and pinch zoom). Create a new control with the OpenLayers.Control.TouchNavigation constructor.

If you’re only targeting touch enabled devices with your mapping application, you can create a map with only a TouchNavigation control. The OpenLayers.Control.Navigation control is mobile ready by default, but you can generate a smaller build of the library by only including this touch navigation control if you aren’t concerned about mouse interaction.

#### Inherits

- OpenLayers.Control

Summary

Properties |
dragPan | {OpenLayers.Control.DragPan}
pinchZoom | {OpenLayers.Control.PinchZoom}
Functions |
OpenLayers.Control.TouchNavigation | Create a new navigation control
destroy | The destroy method is used to perform any clean up before the control is dereferenced.
activate |
deactivate |
draw |
defaultClick |
defaultDblClick |

### Properties

### dragPan

{OpenLayers.Control.DragPan}

### pinchZoom

{OpenLayers.Control.PinchZoom}

### Functions

### OpenLayers.Control.TouchNavigation

Create a new navigation control

#### Parameters

options | {Object} An optional object whose properties will be set on the control

### destroy

> destroy: function()

The destroy method is used to perform any clean up before the control is dereferenced. Typically this is where event listeners are removed to prevent memory leaks.

### activate

> activate: function()

### deactivate

> deactivate: function()

### draw

> draw: function()

### defaultClick

> defaultClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultDblClick

> defaultDblClick: function ( | evt | )

#### Parameters

evt | {Event}

## OpenLayers.Format.WFSCapabilities/v1_0_0

Read WFS Capabilities version 1.0.0.

#### Inherits from

- OpenLayers.Format.WFSCapabilities.v1

Summary

Functions |
OpenLayers.Format.WFSCapabilities.v1_0_0 | Create a new parser for WFS capabilities version 1.0.0.
Properties |
readers | Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.

### Functions

### OpenLayers.Format.WFSCapabilities.v1_0_0

Create a new parser for WFS capabilities version 1.0.0.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### Properties

### readers

Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name. The function will be applied in the scope of this parser with two arguments: the node being read and a context object passed from the parent.

## OpenLayers.Layer.MapServer

Instances of OpenLayers.Layer.MapServer are used to display data from a MapServer CGI instance.

#### Inherits from

- OpenLayers.Layer.Grid

Summary

Constants |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs
Functions |
OpenLayers.Layer.MapServer | Create a new MapServer layer object
clone | Create a clone of this layer
getURL | Return a query string for this layer
getFullRequestString | combine the layer’s url with its params and these newParams.

### Constants

### DEFAULT_PARAMS

{Object} Hashtable of default parameter key/value pairs

### Functions

### OpenLayers.Layer.MapServer

Create a new MapServer layer object

#### Parameters

name | {String} A name for the layer
url | {String} Base url for the MapServer CGI (e.g. http://www2.dmsolutions.ca/cgi-bin/mapserv)
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

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

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

### getURL

> getURL: function ( | bounds | )

Return a query string for this layer

#### Parameters

bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request

#### Returns

{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.

### getFullRequestString

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

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

#### Parameters

newParams | {Object} New parameters that should be added to the request string.
altUrl | {String} (optional) Replace the URL in the full request string with the provided URL.

#### Returns

{String} A string with the layer’s url and parameters embedded in it.

## OpenLayers.Renderer.VML

Render vector features in browsers with VML capability. Construct a new VML renderer with the OpenLayers.Renderer.VML constructor.

Note that for all calculations in this class, we use (num | 0) to truncate a float value to an integer. This is done because it seems that VML doesn’t support float values.

#### Inherits from

- OpenLayers.Renderer.Elements

Summary

Properties |
xmlns | {String} XML Namespace URN
symbolCache | {DOMElement} node holding symbols.
offset | {Object} Hash with “x” and “y” properties
Functions |
OpenLayers.Renderer.VML | Create a new VML renderer.
setExtent | Set the renderer’s extent
setSize | Set the size of the drawing surface
getNodeType | Get the node type for a geometry and style
setStyle | Use to set all the style attributes to a VML node.
graphicRotate | If a point is to be styled with externalGraphic and rotation, VML fills cannot be used to display the graphic, because rotation of graphic fills is not supported by the VML implementation of Internet Explorer.
postDraw |
setNodeDimension | Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.
dashStyle |
createNode | Create a new node
nodeTypeCompare | Determine whether a node is of a given type
createRenderRoot | Create the renderer root
createRoot | Create the main root element
drawPoint | Render a point
drawCircle | Render a circle.
drawLineString | Render a linestring.
drawLinearRing | Render a linearring
DrawLine | Render a line.
drawPolygon | Render a polygon
drawRectangle | Render a rectangle
drawText | This method is only called by the renderer itself.
moveRoot | moves this renderer’s root to a different renderer.
importSymbol | add a new symbol definition from the rendererer’s symbol hash
Constants |
OpenLayers.Renderer.VML.LABEL_SHIFT | {Object}

### Properties

### xmlns

{String} XML Namespace URN

### symbolCache

{DOMElement} node holding symbols. This hash is keyed by symbol name, and each value is a hash with a “path” and an “extent” property.

### offset

{Object} Hash with “x” and “y” properties

### Functions

### OpenLayers.Renderer.VML

Create a new VML renderer.

#### Parameters

containerID | {String} The id for the element that contains the renderer

### setExtent

> setExtent: function( | extent,
> | resolutionChanged | )

Set the renderer’s extent

#### Parameters

extent | {OpenLayers.Bounds}
resolutionChanged | {Boolean}

#### Returns

{Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn.

### setSize

> setSize: function( | size | )

Set the size of the drawing surface

#### Parameters

size | {OpenLayers.Size} the size of the drawing surface

### getNodeType

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

Get the node type for a geometry and style

#### Parameters

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

#### Returns

{String} The corresponding node type for the specified geometry

### setStyle

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

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

#### Parameters

node | {DOMElement} An VML element to decorate
style | {Object}
options | {Object} Currently supported options include ‘isFilled’ {Boolean} and ‘isStroked’ {Boolean}
geometry | {OpenLayers.Geometry}

### graphicRotate

> graphicRotate: function( | node,
> | xOffset,
> | yOffset,
> | style | )

If a point is to be styled with externalGraphic and rotation, VML fills cannot be used to display the graphic, because rotation of graphic fills is not supported by the VML implementation of Internet Explorer. This method creates a olv:imagedata element inside the VML node, DXImageTransform.Matrix and BasicImage filters for rotation and opacity, and a 3-step hack to remove rendering artefacts from the graphic and preserve the ability of graphics to trigger events. Finally, OpenLayers methods are used to determine the correct insertion point of the rotated image, because DXImageTransform.Matrix does the rotation without the ability to specify a rotation center point.

#### Parameters

node | {DOMElement}
xOffset | {Number} rotation center relative to image, x coordinate
yOffset | {Number} rotation center relative to image, y coordinate
style | {Object}

### postDraw

> postDraw: function( | node | )

#### Does some node postprocessing to work around browser issues

- Some versions of Internet Explorer seem to be unable to set fillcolor and strokecolor to “none” correctly before the fill node is appended to a visible vml node. This method takes care of that and sets fillcolor and strokecolor again if needed.
- In some cases, a node won’t become visible after being drawn. Setting style.visibility to “visible” works around that.

#### Parameters

node | {DOMElement}

### setNodeDimension

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

Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.

#### Parameters

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

### dashStyle

> dashStyle: function( | style | )

#### Parameters

style | {Object}

#### Returns

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

### createNode

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

Create a new node

#### 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 | )

Determine whether a node is of a given type

#### Parameters

node | {DOMElement} An VML element
type | {String} Kind of node

#### Returns

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

### createRenderRoot

> createRenderRoot: function()

Create the renderer root

#### Returns

{DOMElement} The specific render engine’s root element

### createRoot

> createRoot: function( | suffix | )

Create the main root element

#### Parameters

suffix | {String} suffix to append to the id

#### Returns

{DOMElement}

### drawPoint

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

Render a point

#### Parameters

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

#### Returns

{DOMElement} or false if the point could not be drawn

### drawCircle

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

Render a circle. Size and Center a circle given geometry (x,y center) and radius

#### Parameters

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

#### Returns

{DOMElement} or false if the circle could not ne drawn

### drawLineString

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

Render a linestring.

#### Parameters

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

#### Returns

{DOMElement}

### drawLinearRing

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

Render a linearring

#### Parameters

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

#### Returns

{DOMElement}

### DrawLine

Render a line.

#### Parameters

node | {DOMElement}
geometry | {OpenLayers.Geometry}
closeLine | {Boolean} Close the line? (make it a ring?)

#### Returns

{DOMElement}

### drawPolygon

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

Render a polygon

#### Parameters

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

#### Returns

{DOMElement}

### drawRectangle

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

Render a rectangle

#### Parameters

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

#### Returns

{DOMElement}

### drawText

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

This method is only called by the renderer itself.

#### Parameters

featureId | {String} style -
location | {OpenLayers.Geometry.Point}

### moveRoot

> moveRoot: function( | renderer | )

moves this renderer’s root to a different renderer.

#### Parameters

renderer | {OpenLayers.Renderer} target renderer for the moved root
root | {DOMElement} optional root node. To be used when this renderer holds roots from multiple layers to tell this method which one to detach

#### Returns

{Boolean} true if successful, false otherwise

### 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

{Object} | hash of {DOMElement} “symbol” and {Number} “size”

### Constants

### OpenLayers.Renderer.VML.LABEL_SHIFT

{Object}

## OpenLayers.Protocol.WFS.v1_0_0

A WFS v1.0.0 protocol for vector layers. Create a new instance with the OpenLayers.Protocol.WFS.v1_0_0 constructor.

#### Inherits from

- OpenLayers.Protocol.WFS.v1

Summary

Properties |
version | {String} WFS version number.
Functions |
OpenLayers.Protocol.WFS.v1_0_0 | A class for giving layers WFS v1.0.0 protocol.

### Properties

### version

{String} WFS version number.

### Functions

### OpenLayers.Protocol.WFS.v1_0_0

A class for giving layers WFS v1.0.0 protocol.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Valid options properties

featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (optional).
featurePrefix | {String} Feature namespace alias (optional - only used if featureNS is provided). Default is ‘feature’.
geometryName | {String} Name of geometry attribute. Default is ‘the_geom’.

## OpenLayers.Handler.RegularPolygon

Handler to draw a regular polygon on the map. Polygon is displayed on mouse down, moves or is modified on mouse move, and is finished on mouse up. The handler triggers callbacks for ‘done’ and ‘cancel’. Create a new instance with the OpenLayers.Handler.RegularPolygon constructor.

#### Inherits from

- OpenLayers.Handler.Drag

Summary

Properties |
layerOptions | {Object} Any optional properties to be set on the sketch layer.
angle | {Float} The angle from the origin (mouse down) to the current mouse position, in radians.
fixedRadius | {Boolean} The polygon has a fixed radius.
feature | {OpenLayers.Feature.Vector} The currently drawn polygon feature
layer | {OpenLayers.Layer.Vector} The temporary drawing layer
origin | {OpenLayers.Geometry.Point} Location of the first mouse down
Functions |
OpenLayers.Handler.RegularPolygon | Create a new regular polygon handler.
down | Start drawing a new feature
move | Respond to drag move events
up | Finish drawing the feature
out | Finish drawing the feature.
createGeometry | Create the new polygon geometry.
modifyGeometry | Modify the polygon geometry in place.
calculateAngle | Calculate the angle based on settings.
finalize | Finish the geometry and call the “done” callback.
callback | Trigger the control’s named callback with the given arguments

### Properties

### layerOptions

{Object} Any optional properties to be set on the sketch layer.

### angle

{Float} The angle from the origin (mouse down) to the current mouse position, in radians. This is measured counterclockwise from the positive x-axis.

### fixedRadius

{Boolean} The polygon has a fixed radius. True if a radius is set before drawing begins. False otherwise.

### feature

{OpenLayers.Feature.Vector} The currently drawn polygon feature

### layer

{OpenLayers.Layer.Vector} The temporary drawing layer

### origin

{OpenLayers.Geometry.Point} Location of the first mouse down

### Functions

### OpenLayers.Handler.RegularPolygon

Create a new regular polygon handler.

#### Parameters

control | {OpenLayers.Control} The control that owns this handler
callbacks | {Object} An object with a properties whose values are functions. Various callbacks described below.
options | {Object} An object with properties to be set on the handler. If the options.sides property is not specified, the number of sides will default to 4.

#### Named callbacks

create | Called when a sketch is first created. Callback called with the creation point geometry and sketch feature.
done | Called when the sketch drawing is finished. The callback will recieve a single argument, the sketch geometry.
cancel | Called when the handler is deactivated while drawing. The cancel callback will receive a geometry.

### down

> down: function( | evt | )

Start drawing a new feature

#### Parameters

evt | {Event} The drag start event

### move

> move: function( | evt | )

Respond to drag move events

#### Parameters

evt | {Evt} The move event

### up

> up: function( | evt | )

Finish drawing the feature

#### Parameters

evt | {Event} The mouse up event

### out

> out: function( | evt | )

Finish drawing the feature.

#### Parameters

evt | {Event} The mouse out event

### createGeometry

> createGeometry: function()

Create the new polygon geometry. This is called at the start of the drag and at any point during the drag if the number of sides changes.

### modifyGeometry

> modifyGeometry: function()

Modify the polygon geometry in place.

### calculateAngle

> calculateAngle: function( | point,
> | evt | )

Calculate the angle based on settings.

#### Parameters

point | {OpenLayers.Geometry.Point}
evt | {Event}

### finalize

> finalize: function()

Finish the geometry and call the “done” callback.

### callback

> callback: function ( | name,
> | args | )

Trigger the control’s named callback with the given arguments

#### Parameters

name | {String} The key for the callback that is one of the properties of the handler’s callbacks object.
args | {Array} An array of arguments with which to call the callback (defined by the control).

## OpenLayers.Handler.Feature

Handler to respond to mouse events related to a drawn feature. Callbacks with the following keys will be notified of the following events associated with features: click, clickout, over, out, and dblclick.

This handler stops event propagation for mousedown and mouseup if those browser events target features that can be selected.

#### Inherits from

- OpenLayers.Handler

Summary

Properties |
EVENTMAP | {Object} A object mapping the browser events to objects with callback keys for in and out.
feature | {OpenLayers.Feature.Vector} The last feature that was hovered.
lastFeature | {OpenLayers.Feature.Vector} The last feature that was handled.
down | {OpenLayers.Pixel} The location of the last mousedown.
up | {OpenLayers.Pixel} The location of the last mouseup.
clickTolerance | {Number} The number of pixels the mouse can move between mousedown and mouseup for the event to still be considered a click.
geometryTypes | To restrict dragging to a limited set of geometry types, send a list of strings corresponding to the geometry class names.
stopClick | {Boolean} If stopClick is set to true, handled clicks do not propagate to other click listeners.
stopDown | {Boolean} If stopDown is set to true, handled mousedowns do not propagate to other mousedown listeners.
stopUp | {Boolean} If stopUp is set to true, handled mouseups do not propagate to other mouseup listeners.
Functions |
OpenLayers.Handler.Feature |
touchstart | Handle touchstart events
touchmove | Handle touchmove events.
mousedown | Handle mouse down.
mouseup | Handle mouse up.
click | Handle click.
mousemove | Handle mouse moves.
dblclick | Handle dblclick.
geometryTypeMatches | Return true if the geometry type of the passed feature matches one of the geometry types in the geometryTypes array.
handle |
triggerCallback | Call the callback keyed in the event map with the supplied arguments.
activate | Turn on the handler.
deactivate | Turn off the handler.
handleMapEvents |
moveLayerToTop | Moves the layer for this handler to the top, so mouse events can reach it.
moveLayerBack | Moves the layer back to the position determined by the map’s layers array.

### Properties

### EVENTMAP

{Object} A object mapping the browser events to objects with callback keys for in and out.

### feature

{OpenLayers.Feature.Vector} The last feature that was hovered.

### lastFeature

{OpenLayers.Feature.Vector} The last feature that was handled.

### down

{OpenLayers.Pixel} The location of the last mousedown.

### up

{OpenLayers.Pixel} The location of the last mouseup.

### clickTolerance

{Number} The number of pixels the mouse can move between mousedown and mouseup for the event to still be considered a click. Dragging the map should not trigger the click and clickout callbacks unless the map is moved by less than this tolerance. Defaults to 4.

### geometryTypes

To restrict dragging to a limited set of geometry types, send a list of strings corresponding to the geometry class names.

@type Array(String)

### stopClick

{Boolean} If stopClick is set to true, handled clicks do not propagate to other click listeners. Otherwise, handled clicks do propagate. Unhandled clicks always propagate, whatever the value of stopClick. Defaults to true.

### stopDown

{Boolean} If stopDown is set to true, handled mousedowns do not propagate to other mousedown listeners. Otherwise, handled mousedowns do propagate. Unhandled mousedowns always propagate, whatever the value of stopDown. Defaults to true.

### stopUp

{Boolean} If stopUp is set to true, handled mouseups do not propagate to other mouseup listeners. Otherwise, handled mouseups do propagate. Unhandled mouseups always propagate, whatever the value of stopUp. Defaults to false.

### Functions

### OpenLayers.Handler.Feature

#### Parameters

control | {OpenLayers.Control}
layer | {OpenLayers.Layer.Vector}
callbacks | {Object} An object with a ‘over’ property whos value is a function to be called when the mouse is over a feature. The callback should expect to recieve a single argument, the feature.
options | {Object}

### touchstart

> touchstart: function( | evt | )

Handle touchstart events

#### Parameters

evt | {Event}

#### Returns

{Boolean} Let the event propagate.

### touchmove

> touchmove: function( | evt | )

Handle touchmove events. We just prevent the browser default behavior, for Android Webkit not to select text when moving the finger after selecting a feature.

#### Parameters

evt | {Event}

### mousedown

> mousedown: function( | evt | )

Handle mouse down. Stop propagation if a feature is targeted by this event (stops map dragging during feature selection).

#### Parameters

evt | {Event}

### mouseup

> mouseup: function( | evt | )

Handle mouse up. Stop propagation if a feature is targeted by this event.

#### Parameters

evt | {Event}

### click

> click: function( | evt | )

Handle click. Call the “click” callback if click on a feature, or the “clickout” callback if click outside any feature.

#### Parameters

evt | {Event}

#### Returns

{Boolean}

### mousemove

> mousemove: function( | evt | )

Handle mouse moves. Call the “over” callback if moving in to a feature, or the “out” callback if moving out of a feature.

#### Parameters

evt | {Event}

#### Returns

{Boolean}

### dblclick

> dblclick: function( | evt | )

Handle dblclick. Call the “dblclick” callback if dblclick on a feature.

#### Parameters

evt | {Event}

#### Returns

{Boolean}

### geometryTypeMatches

> geometryTypeMatches: function( | feature | )

Return true if the geometry type of the passed feature matches one of the geometry types in the geometryTypes array.

#### Parameters

feature | {<OpenLayers.Vector.Feature>}

#### Returns

{Boolean}

### handle

> handle: function( | evt | )

#### Parameters

evt | {Event}

#### Returns

{Boolean} The event occurred over a relevant feature.

### triggerCallback

> triggerCallback: function( | type,
> | mode,
> | args | )

Call the callback keyed in the event map with the supplied arguments. For click and clickout, the clickTolerance is checked first.

#### Parameters

type | {String}

### activate

> activate: function()

Turn on the handler. Returns false if the handler was already active.

#### Returns

{Boolean}

### deactivate

> deactivate: function()

Turn off the handler. Returns false if the handler was already active.

#### Returns

{Boolean}

### handleMapEvents

> handleMapEvents: function( | evt | )

#### Parameters

evt | {Object}

### moveLayerToTop

> moveLayerToTop: function()

Moves the layer for this handler to the top, so mouse events can reach it.

### moveLayerBack

> moveLayerBack: function()

Moves the layer back to the position determined by the map’s layers array.

## OpenLayers.Control.DragFeature

The DragFeature control moves a feature with a drag of the mouse. Create a new control with the OpenLayers.Control.DragFeature constructor.

#### Inherits From

- OpenLayers.Control

Summary

Properties |
layer | {OpenLayers.Layer.Vector}
feature | {OpenLayers.Feature.Vector}
dragCallbacks | {Object} The functions that are sent to the drag handler for callback.
featureCallbacks | {Object} The functions that are sent to the feature handler for callback.
lastPixel | {OpenLayers.Pixel}
Functions |
OpenLayers.Control.DragFeature | Create a new control to drag features.
clickFeature | Called when the feature handler detects a click-in on a feature.
clickoutFeature | Called when the feature handler detects a click-out on a feature.
overFeature | Called when the feature handler detects a mouse-over on a feature.
downFeature | Called when the drag handler detects a mouse-down.
moveFeature | Called when the drag handler detects a mouse-move.
upFeature | Called when the drag handler detects a mouse-up.
doneDragging | Called when the drag handler is done dragging.
outFeature | Called when the feature handler detects a mouse-out on a feature.
cancel | Called when the drag handler detects a mouse-out (from the map viewport).
setMap | Set the map property for the control and all handlers.

### Properties

### layer

{OpenLayers.Layer.Vector}

### feature

{OpenLayers.Feature.Vector}

### dragCallbacks

{Object} The functions that are sent to the drag handler for callback.

### featureCallbacks

{Object} The functions that are sent to the feature handler for callback.

### lastPixel

{OpenLayers.Pixel}

### Functions

### OpenLayers.Control.DragFeature

Create a new control to drag features.

#### Parameters

layer | {OpenLayers.Layer.Vector} The layer containing features to be dragged.
options | {Object} Optional object whose properties will be set on the control.

### clickFeature

> clickFeature: function( | feature | )

Called when the feature handler detects a click-in on a feature.

#### Parameters

feature | {OpenLayers.Feature.Vector}

### clickoutFeature

> clickoutFeature: function( | feature | )

Called when the feature handler detects a click-out on a feature.

#### Parameters

feature | {OpenLayers.Feature.Vector}

### overFeature

> overFeature: function( | feature | )

Called when the feature handler detects a mouse-over on a feature. This activates the drag handler.

#### Parameters

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

#### Returns

{Boolean} Successfully activated the drag handler.

### downFeature

> downFeature: function( | pixel | )

Called when the drag handler detects a mouse-down.

#### Parameters

pixel | {OpenLayers.Pixel} Location of the mouse event.

### moveFeature

> moveFeature: function( | pixel | )

Called when the drag handler detects a mouse-move. Also calls the optional onDrag method.

#### Parameters

pixel | {OpenLayers.Pixel} Location of the mouse event.

### upFeature

> upFeature: function( | pixel | )

Called when the drag handler detects a mouse-up.

#### Parameters

pixel | {OpenLayers.Pixel} Location of the mouse event.

### doneDragging

> doneDragging: function( | pixel | )

Called when the drag handler is done dragging.

#### Parameters

pixel | {OpenLayers.Pixel} The last event pixel location. If this event came from a mouseout, this may not be in the map viewport.

### outFeature

> outFeature: function( | feature | )

Called when the feature handler detects a mouse-out on a feature.

#### Parameters

feature | {OpenLayers.Feature.Vector} The feature that the mouse left.

### cancel

> cancel: function()

Called when the drag handler detects a mouse-out (from the map viewport).

### setMap

> setMap: function( | map | )

Set the map property for the control and all handlers.

#### Parameters

map | {OpenLayers.Map} The control’s map.

## OpenLayers.Handler.Polygon

Handler to draw a polygon on the map. Polygon is displayed on mouse down, moves on mouse move, and is finished on mouse up.

#### Inherits from

- OpenLayers.Handler.Path
- OpenLayers.Handler

Summary

Properties |
drawingHole | {Boolean} Currently drawing an interior ring.
polygon | {OpenLayers.Feature.Vector}
Functions |
OpenLayers.Handler.Polygon | Create a Polygon Handler.
createFeature | Add temporary geometries
addPoint | Add point to geometry.
getCurrentPointIndex | {Number} The index of the most recently drawn point.
enforceTopology | Simple topology enforcement for drawing interior rings.
finishGeometry | Finish the geometry and send it back to the control.
finalizeInteriorRing | Enforces that new ring has some area and doesn’t contain vertices of any other rings.
restoreFeature | Move the feature from the sketch layer to the target layer.
destroyFeature | Destroy temporary geometries
drawFeature | Render geometries on the temporary layer.
getSketch | Return the sketch feature.
getGeometry | Return the sketch geometry.

### Properties

### drawingHole

{Boolean} Currently drawing an interior ring.

### polygon

{OpenLayers.Feature.Vector}

### Functions

### OpenLayers.Handler.Polygon

Create a Polygon Handler.

#### Parameters

control | {OpenLayers.Control} The control that owns this handler
callbacks | {Object} An object with a properties whose values are functions. Various callbacks described below.
options | {Object} An optional object with properties to be set on the handler

#### Named callbacks

create | Called when a sketch is first created. Callback called with the creation point geometry and sketch feature.
modify | Called with each move of a vertex with the vertex (point) geometry and the sketch feature.
point | Called as each point is added. Receives the new point geometry.
done | Called when the point drawing is finished. The callback will recieve a single argument, the polygon geometry.
cancel | Called when the handler is deactivated while drawing. The cancel callback will receive a geometry.

### createFeature

> createFeature: function( | pixel | )

Add temporary geometries

#### Parameters

pixel | {OpenLayers.Pixel} The initial pixel location for the new feature.

### addPoint

> addPoint: function( | pixel | )

Add point to geometry.

#### Parameters

pixel | {OpenLayers.Pixel} The pixel location for the new point.

### getCurrentPointIndex

> getCurrentPointIndex: function()

#### Returns

{Number} The index of the most recently drawn point.

### enforceTopology

> enforceTopology: function( | event | )

Simple topology enforcement for drawing interior rings. Ensures vertices of interior rings are contained by exterior ring. Other topology rules are enforced in finalizeInteriorRing to allow drawing of rings that intersect only during the sketch (e.g. a “C” shaped ring that nearly encloses another ring).

### finishGeometry

> finishGeometry: function()

Finish the geometry and send it back to the control.

### finalizeInteriorRing

> finalizeInteriorRing: function()

Enforces that new ring has some area and doesn’t contain vertices of any other rings.

### restoreFeature

> restoreFeature: function( | cancel | )

Move the feature from the sketch layer to the target layer.

#### Properties

cancel | {Boolean} Cancel drawing. If falsey, the “sketchcomplete” event will be fired.

### destroyFeature

> destroyFeature: function( | force | )

Destroy temporary geometries

#### Parameters

force | {Boolean} Destroy even if persist is true.

### drawFeature

> drawFeature: function()

Render geometries on the temporary layer.

### getSketch

> getSketch: function()

Return the sketch feature.

#### Returns

{OpenLayers.Feature.Vector}

### getGeometry

> getGeometry: function()

Return the sketch geometry. If <multi> is true, this will return a multi-part geometry.

#### Returns

{OpenLayers.Geometry.Polygon}

## OpenLayers.Popup.Anchored

#### Inherits from

- OpenLayers.Popup

Summary

Properties |
relativePosition | {String} Relative position of the popup (“br”, “tr”, “tl” or “bl”).
anchor | {Object} Object to which we’ll anchor the popup.
Functions |
OpenLayers.Popup.Anchored |
moveTo | Since the popup is moving to a new px, it might need also to be moved relative to where the marker is.
calculateRelativePosition |
updateRelativePosition | The popup has been moved to a new relative location, so we may want to make some cosmetic adjustments to it.
calculateNewPx |
Deprecated | The deprecated.js script includes all methods, properties, and constructors that are not supported as part of the long-term API.

### Properties

### relativePosition

{String} Relative position of the popup (“br”, “tr”, “tl” or “bl”).

### anchor

{Object} Object to which we’ll anchor the popup. Must expose a ‘size’ (OpenLayers.Size) and ‘offset’ (OpenLayers.Pixel).

### Functions

### OpenLayers.Popup.Anchored

#### Parameters

id | {String}
lonlat | {OpenLayers.LonLat}
contentSize | {OpenLayers.Size}
contentHTML | {String}
anchor | {Object} Object which must expose a ‘size’ OpenLayers.Size and ‘offset’ OpenLayers.Pixel (generally an OpenLayers.Icon).
closeBox | {Boolean}
closeBoxCallback | {Function} Function to be called on closeBox click.

### moveTo

> moveTo: function( | px | )

Since the popup is moving to a new px, it might need also to be moved relative to where the marker is. We first calculate the new relativePosition, and then we calculate the new px where we will put the popup, based on the new relative position.

If the relativePosition has changed, we must also call updateRelativePosition() to make any visual changes to the popup which are associated with putting it in a new relativePosition.

#### Parameters

px | {OpenLayers.Pixel}

### calculateRelativePosition

> calculateRelativePosition:function( | px | )

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{String} The relative position (“br” “tr” “tl” “bl”) at which the popup should be placed.

### updateRelativePosition

> updateRelativePosition: function()

The popup has been moved to a new relative location, so we may want to make some cosmetic adjustments to it.

Note that in the classic Anchored popup, there is nothing to do here, since the popup looks exactly the same in all four positions. Subclasses such as Framed, however, will want to do something special here.

### calculateNewPx

> calculateNewPx:function( | px | )

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{OpenLayers.Pixel} The the new px position of the popup on the screen relative to the passed-in px.

### 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.

### Properties

### isPrototype

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

## 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.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.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

Functions |
OpenLayers.Ajax.Base |

### Functions

### OpenLayers.Ajax.Base

#### Parameters

options | {Object}

## OpenLayers.Ajax.Request

Deprecated. Use OpenLayers.Request method instead.

#### Inherit

- OpenLayers.Ajax.Base

Summary

Properties |
_complete | {Boolean}
Functions |
OpenLayers.Ajax.Request |
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}

### Functions

### OpenLayers.Ajax.Request

#### Parameters

url | {String}
options | {Object}

### 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}
Functions |
OpenLayers.Ajax.Response |
getStatus |
getStatustext |
getHeader |
getResponseHeader |
getElementsByTagNameNS |
serializeXMLToString | Wrapper function around XMLSerializer, which doesn’t exist/work in IE/Safari.

### Properties

### status

{Integer}

### statusText

{String}

### Functions

### OpenLayers.Ajax.Response

#### Parameters

request | {Object}

### 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

## 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}
Functions |
OpenLayers.Control.MouseDefaults |
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}

### Functions

### OpenLayers.Control.MouseDefaults

### 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 |
buttonClicked | {String}
Functions |
OpenLayers.Control.MouseToolbar |
draw |
_addButton |
buttonDown |
buttonUp |
defaultDblClick |
defaultMouseDown |
switchModeTo |
leaveMode |
defaultMouseMove |
defaultMouseUp |
defaultMouseOut |
defaultClick |

### Properties

### mode

### buttons

### buttonClicked

{String}

### Functions

### OpenLayers.Control.MouseToolbar

#### Parameters

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

### 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

## 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 |
SUPPORTED_TRANSITIONS | {Array} no supported transitions for this type of layer, because it is not possible to modify the initialized tiles (iframes)
usePost | {Boolean}
Functions |
OpenLayers.Layer.WMS.Post | Creates a new WMS layer object.
addTile | addTile creates a tile, initializes it and adds it as iframe to the layer div.

### Properties

### SUPPORTED_TRANSITIONS

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

### usePost

{Boolean}

### Functions

### 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.

### 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

Functions |
OpenLayers.Layer.WMS.Untiled |
clone | Create a clone of this layer

### Functions

### OpenLayers.Layer.WMS.Untiled

#### Parameters

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

### 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

Functions |
OpenLayers.Layer.MapServer.Untiled |
clone | Create a clone of this layer

### Functions

### OpenLayers.Layer.MapServer.Untiled

#### Parameters

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

### 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 |
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

### 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

Functions |
OpenLayers.Feature.WFS | Create a WFS feature.
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.

### Functions

### OpenLayers.Feature.WFS

Create a WFS feature.

#### Parameters

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

### 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 |
tile | {OpenLayers.Tile.WFS}
DEFAULT_PARAMS | {Object} Hashtable of default key/value parameters
formatObject | {OpenLayers.Format} Internally created/managed format object, used by the Tile to parse data.
vectorMode | {Boolean} Should be calculated automatically.
Functions |
OpenLayers.Layer.WFS |
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.
commitSuccess | Called when the Ajax request returns a response
commitFailure | Called when the Ajax request fails

### Properties

### tile

{OpenLayers.Tile.WFS}

### DEFAULT_PARAMS

{Object} Hashtable of default key/value parameters

### formatObject

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

### vectorMode

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

### Functions

### OpenLayers.Layer.WFS

#### Parameters

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

### 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.

### 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

## 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
Functions |
OpenLayers.Layer.VirtualEarth | Creates a new instance of a OpenLayers.Layer.VirtualEarth.
loadMapObject |
onMapResize |

### 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

### Functions

### 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}

### loadMapObject

> loadMapObject:function()

### onMapResize

> onMapResize: function()

## 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 |
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.
Functions |
OpenLayers.Protocol.SQL |
evaluateFilter | If postReadFiltering is true evaluate the filter against the feature and return the result of the evaluation, otherwise return true.

### Properties

### 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.

### Functions

### OpenLayers.Protocol.SQL

### 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}
Functions |
OpenLayers.Protocol.SQL.Gears |
initializeDatabase |
unfreezeFeature |
extractFidFromField |
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.
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.
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}

### Functions

### OpenLayers.Protocol.SQL.Gears

### initializeDatabase

> initializeDatabase: function()

### unfreezeFeature

> unfreezeFeature: function( | row | )

#### Parameters

row | {ResultSet}

#### Returns

{OpenLayers.Feature.Vector}

### extractFidFromField

> extractFidFromField: function( | field | )

#### Parameters

field | {String}

Returns {String} or {Number} The fid.

### 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

### 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}

### 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
Functions |
OpenLayers.Layer.Yahoo |
loadMapObject |
onMapResize |
fixYahooEventPane | The map has been centered, so the mysterious yahoo eventpane has been added.

### 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

### Functions

### OpenLayers.Layer.Yahoo

#### Parameters

name | {String}
options | {Object}

### loadMapObject

> loadMapObject:function()

### onMapResize

> onMapResize: function()

### 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.

## 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.
Functions |
OpenLayers.Layer.GML | Load and parse a single file on the web, according to the format provided via the ‘format’ option, defaulting to GML.
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.

### Functions

### 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.

### 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}
Functions |
OpenLayers.Geometry.Rectangle |
calculateBounds | Recalculate the bounds for the geometry.

### Properties

### x

{Float}

### y

{Float}

### width

{Float}

### height

{Float}

### Functions

### OpenLayers.Geometry.Rectangle

#### Parameters

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

### calculateBounds

> calculateBounds: function()

Recalculate the bounds for the geometry.

## OpenLayers.Renderer.NG

#### Inherits from

- OpenLayers.Renderer.Elements

Summary

Constants |
labelNodeType | {String} The node type for text label containers.
Functions |
OpenLayers.Renderer.NG |
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.

### Functions

### 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.

### 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.
Functions |
OpenLayers.Renderer.SVG2 |
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.

### Functions

### OpenLayers.Renderer.SVG2

#### Parameters

containerID | {String}

### 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.Popup.AnchoredBubble

This class is deprecated. Use {OpenLayers.Popup.Anchored} and round corners using CSS3’s border-radius property.

#### Inherits from

- OpenLayers.Popup.Anchored

Summary

Properties |
rounded | {Boolean} Has the popup been rounded yet?
Functions |
OpenLayers.Popup.AnchoredBubble |
draw |
updateRelativePosition | The popup has been moved to a new relative location, in which case we will want to re-do the rico corners.
setBorder | Always sets border to 0.
setRicoCorners | Update RICO corners according to the popup’s current relative postion.
getCornersToRound | {String} The proper corners string (“tr tl bl br”) for rico to round.
Constants |
CORNER_SIZE | {Integer} 5.

### Properties

### rounded

{Boolean} Has the popup been rounded yet?

### Functions

### OpenLayers.Popup.AnchoredBubble

#### Parameters

id | {String}
lonlat | {OpenLayers.LonLat}
contentSize | {OpenLayers.Size}
contentHTML | {String}
anchor | {Object} Object to which we’ll anchor the popup. Must expose a ‘size’ (OpenLayers.Size) and ‘offset’ (OpenLayers.Pixel) (Note that this is generally an OpenLayers.Icon).
closeBox | {Boolean}
closeBoxCallback | {Function} Function to be called on closeBox click.

### draw

> draw: function( | px | )

#### Parameters

px | {OpenLayers.Pixel}

#### Returns

{DOMElement} Reference to a div that contains the drawn popup.

### updateRelativePosition

> updateRelativePosition: function()

The popup has been moved to a new relative location, in which case we will want to re-do the rico corners.

### setBorder

> setBorder:function( | border | )

Always sets border to 0. Bubble Popups can not have a border.

#### Parameters

border | {Integer}

### setRicoCorners

> setRicoCorners:function()

Update RICO corners according to the popup’s current relative postion.

### getCornersToRound

> getCornersToRound:function()

#### Returns

{String} The proper corners string (“tr tl bl br”) for rico to round.

### Constants

### CORNER_SIZE

{Integer} 5. Border space for the RICO corners.

## OpenLayers.Protocol.WFS.v1_1_0

A WFS v1.1.0 protocol for vector layers. Create a new instance with the OpenLayers.Protocol.WFS.v1_1_0 constructor.

#### Differences from the v1.0.0 protocol

- uses Filter Encoding 1.1.0 instead of 1.0.0
- uses GML 3 instead of 2 if no format is provided

#### Inherits from

- OpenLayers.Protocol.WFS.v1

Summary

Properties |
version | {String} WFS version number.
Functions |
OpenLayers.Protocol.WFS.v1_1_0 | A class for giving layers WFS v1.1.0 protocol.

### Properties

### version

{String} WFS version number.

### Functions

### OpenLayers.Protocol.WFS.v1_1_0

A class for giving layers WFS v1.1.0 protocol.

#### Parameters

options | {Object} Optional object whose properties will be set on the instance.

#### Valid options properties

featureType | {String} Local (without prefix) feature typeName (required).
featureNS | {String} Feature namespace (optional).
featurePrefix | {String} Feature namespace alias (optional - only used if featureNS is provided). Default is ‘feature’.
geometryName | {String} Name of geometry attribute. Default is ‘the_geom’.
outputFormat | {String} Optional output format to use for WFS GetFeature requests. This can be any format advertized by the WFS’s GetCapabilities response. If set, an appropriate readFormat also has to be provided, unless outputFormat is GML3, GML2 or JSON.
readFormat | {OpenLayers.Format} An appropriate format parser if outputFormat is none of GML3, GML2 or JSON.

## OpenLayers.Control.ArgParser

The ArgParser control adds location bar query string parsing functionality to an OpenLayers Map. When added to a Map control, on a page load/refresh, the Map will automatically take the href string and parse it for lon, lat, zoom, and layers information.

#### Inherits from

- OpenLayers.Control

Summary

Properties |
center | {OpenLayers.LonLat}
zoom | {int}
layers | {String} Each character represents the state of the corresponding layer on the map.
Functions |
OpenLayers.Control.ArgParser |
getParameters |
setMap | Set the map property for the control.
setCenter | As soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.
configureLayers | As soon as all the layers are loaded, cycle through them and hide or show them.

### Properties

### center

{OpenLayers.LonLat}

### zoom

{int}

### layers

{String} Each character represents the state of the corresponding layer on the map.

### Functions

### OpenLayers.Control.ArgParser

#### Parameters

options | {Object}

### getParameters

> getParameters: function( | url | )

### setMap

> setMap: function( | map | )

Set the map property for the control.

#### Parameters

map | {OpenLayers.Map}

### setCenter

> setCenter: function()

As soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.

### configureLayers

> configureLayers: function()

As soon as all the layers are loaded, cycle through them and hide or show them.

## OpenLayers.Layer.Bing

Bing layer using direct tile access as provided by Bing Maps REST Services. See http://msdn.microsoft.com/en-us/library/ff701713.aspx for more information. Note: Terms of Service compliant use requires the map to be configured with an <OpenLayers.Control.Attribution> control and the attribution placed on or near the map.

#### Inherits from

- OpenLayers.Layer.XYZ

Summary

Properties |
key | {String} API key for Bing maps, get your own key at http://bingmapsportal.com/ .
serverResolutions | {Array} the resolutions provided by the Bing servers.
attributionTemplate | {String}
metadata | {Object} Metadata for this layer, as returned by the callback script
protocolRegex | {RegExp} Regular expression to match and replace http: in bing urls
Functions |
OpenLayers.Layer.Bing | Create a new Bing layer.
loadMetadata |
initLayer | Sets layer properties according to the metadata provided by the API
getURL |
updateAttribution | Updates the attribution according to the requirements outlined in http://gis.638310.n2.nabble.com/Bing-imagery-td5789168.html
setMap |
destroy |
OpenLayers.Layer.Bing.processMetadata | This function will be bound to an instance, linked to the global scope with an id, and called by the JSONP script returned by the API.

### Properties

### key

{String} API key for Bing maps, get your own key at http://bingmapsportal.com/ .

### serverResolutions

{Array} the resolutions provided by the Bing servers.

### attributionTemplate

{String}

### metadata

{Object} Metadata for this layer, as returned by the callback script

### protocolRegex

{RegExp} Regular expression to match and replace http: in bing urls

### Functions

### OpenLayers.Layer.Bing

Create a new Bing layer.

#### Example

>     var road = new OpenLayers.Layer.Bing({
>         name: "My Bing Aerial Layer",
>         type: "Aerial",
>         key: "my-api-key-here",
>     });

#### Parameters

options | {Object} Configuration properties for the layer.

#### Required configuration properties

key | {String} Bing Maps API key for your application. Get one at http://bingmapsportal.com/.
type | {String} The layer identifier. Any non-birdseye imageryType from http://msdn.microsoft.com/en-us/library/ff701716.aspx can be used.

Any other documented layer properties can be provided in the config object.

### loadMetadata

> loadMetadata: function()

### initLayer

> initLayer: function()

Sets layer properties according to the metadata provided by the API

### getURL

> getURL: function( | bounds | )

#### Paramters

bounds | {OpenLayers.Bounds}

### updateAttribution

> updateAttribution: function()

Updates the attribution according to the requirements outlined in http://gis.638310.n2.nabble.com/Bing-imagery-td5789168.html

### setMap

> setMap: function()

### destroy

> destroy: function()

### OpenLayers.Layer.Bing.processMetadata

> OpenLayers.Layer.Bing.processMetadata = function( | metadata | )

This function will be bound to an instance, linked to the global scope with an id, and called by the JSONP script returned by the API.

#### Parameters

metadata | {Object} metadata as returned by the API

> zeroPad: function( | num,
> | len,
> | radix | )

Create a zero padded string optionally with a radix for casting numbers.

> OpenLayers.Class = function()

Base class used to construct all other classes.

> OpenLayers.inherit = function( | C,
> | P | )

This class represents a longitude and latitude pair

> clone:function()

Create a cloned instance of this bounds.

> equals:function( | bounds | )

Test a two bounds for equivalence.

> OpenLayers.Bounds.oppositeQuadrant = function( | quadrant | )

Get the opposite quadrant for a given quadrant string.

> hasClass: function( | element,
> | name | )

Tests if an element has the given CSS class name.

> addClass: function( | element,
> | name | )

Add a CSS class name to an element.

> removeClass: function( | element,
> | name | )

Remove a CSS class name from an element.

> toggleClass: function( | element,
> | name | )

Remove a CSS class name from an element if it exists.

> toString:function()

Return a readable string version of the lonlat

> OpenLayers.LonLat.fromString = function( | str | )

Alternative constructor that builds a new OpenLayers.LonLat from a parameter string
Create a new map location.

> OpenLayers.LonLat.fromArray = function( | arr | )

Alternative constructor that builds a new OpenLayers.LonLat from an array of two numbers that represent lon- and lat-values.

> toString:function()

Cast this object into a string

> toString:function()

Return the string representation of a size object

> OpenLayers.Util.getElement = function()

This is the old $() from prototype

> OpenLayers.Util.isElement = function( | o | )

A cross-browser implementation of “e instanceof Element”.

> OpenLayers.Util.isArray = function( | a | )

Tests that the provided object is an array.

> OpenLayers.Util.removeItem = function( | array,
> | item | )

Remove an object from an array.

> OpenLayers.Util.indexOf = function( | array,
> | obj | )

Seems to exist already in FF, but not in MOZ.

> OpenLayers.Util.modifyDOMElement = function( | element,
> | id,
> | px,
> | sz,
> | position,
> | border,
> | overflow,
> | opacity | )

Modifies many properties of a DOM element all at once.

> OpenLayers.Util.createDiv = function( | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | overflow,
> | opacity | )

Creates a new div and optionally set some standard attributes.

> OpenLayers.Util.createImage = function( | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | opacity,
> | delayDisplay | )

Creates an img element with specific attribute values.

> OpenLayers.Util.alphaHack = function()

Checks whether it’s necessary (and possible) to use the png alpha hack which allows alpha transparency for png images under Internet Explorer.

> OpenLayers.Util.modifyAlphaImageDiv = function( | div,
> | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | sizing,
> | opacity | )

> OpenLayers.Util.createAlphaImageDiv = function( | id,
> | px,
> | sz,
> | imgURL,
> | position,
> | border,
> | sizing,
> | opacity,
> | delayDisplay | )

> OpenLayers.Util.upperCaseObject = function ( | object | )

Creates a new hashtable and copies over all the keys from the passed-in object, but storing them under an uppercased version of the key at which they were stored.

> OpenLayers.Util.applyDefaults = function ( | to,
> | from | )

Takes an object and copies any properties that don’t exist from another properties, by analogy with OpenLayers.Util.extend() from Prototype.js.

> OpenLayers.Util.getParameterString = function( | params | )

> OpenLayers.Util.urlAppend = function( | url,
> | paramStr | )

Appends a parameter string to a url.

> OpenLayers.Util.getImagesLocation = function()

{String} The fully formatted image location string

> OpenLayers.Util.getImageLocation = function( | image | )

{String} The fully formatted location string for a specified image

> OpenLayers.Util.Try = function()

Execute functions until one of them doesn’t throw an error.

> OpenLayers.Util.getXmlNodeValue = function( | node | )

> OpenLayers.Util.mouseLeft = function ( | evt,
> | div | )

> OpenLayers.Util.toFloat = function ( | number,
> | precision | )

Convenience method to cast an object to a Number, rounded to the desired floating point precision.

> OpenLayers.Util.rad = function( | x | )

> OpenLayers.Util.deg = function( | x | )

> OpenLayers.Util.getParameters = function( | url,
> | options | )

Parse the parameters from a URL or from the current page itself into a JavaScript Object.

> OpenLayers.Util.createUniqueID = function( | prefix | )

Create a unique identifier for this session.

> OpenLayers.Util.normalizeScale = function ( | scale | )

> OpenLayers.Util.getResolutionFromScale = function ( | scale,
> | units | )

> OpenLayers.Util.getScaleFromResolution = function ( | resolution,
> | units | )

> OpenLayers.Util.pagePosition = function( | forElement | )

Calculates the position of an element on the page

> OpenLayers.Util.getViewportElement = function()

Returns die viewport element of the document.

> OpenLayers.Util.isEquivalentUrl = function( | url1,
> | url2,
> | options | )

Test two URLs for equivalence.

> OpenLayers.Util.createUrlObject = function( | url,
> | options | )

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

Takes a url and removes everything after the ?

> OpenLayers.Util.getBrowserName = function()

{String} A string which specifies which is the current browser in which we are running.

> OpenLayers.Util.getRenderedDimensions = function( | contentHTML,
> | size,
> | options | )

Renders the contentHTML offscreen to determine actual dimensions for popup sizing.

> element: function( | event | )

Cross browser event element detection.

> isSingleTouch: function( | event | )

Determine whether event was caused by a single touch

> isMultiTouch: function( | event | )

Determine whether event was caused by a multi touch

> isLeftClick: function( | event | )

Determine whether event was caused by a left click.

> isRightClick: function( | event | )

Determine whether event was caused by a right mouse click.

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

Stops an event from propagating.

> preventDefault: function( | event | )

Cancels the event if it is cancelable, without stopping further propagation of the event.

> findElement: function( | event,
> | tagName | )

> observe: function( | elementParam,
> | name,
> | observer,
> | useCapture | )

> stopObservingElement: function( | elementParam | )

Given the id of an element to stop observing, cycle through the element’s cached observers, calling stopObserving on each one, skipping those entries which can no longer be removed.

> _removeElementObservers: function( | elementObservers | )

> stopObserving: function( | elementParam,
> | name,
> | observer,
> | useCapture | )

> unloadCache: function()

Cycle through all the element entries in the events cache and call stopObservingElement on each.
{Object} Hashtable of Array(Function): events listener functions

> attachToElement: function ( | element | )

> remove: function( | type | )

Remove all listeners for a given event type.

> handleBrowserEvent: function ( | evt | )

Basically just a wrapper to the triggerEvent() function, but takes care to set a property ‘xy’ on the event with the current mouse position.

> getTouchClientXY: function ( | evt | )

WebKit has a few bugs for clientX/clientY.

> getMousePosition: function ( | evt | )

> addMsTouchListener: function ( | element,
> | type,
> | handler | )

> addMsTouchListenerStart: function( | element,
> | type,
> | handler | )

> addMsTouchListenerMove: function ( | element,
> | type,
> | handler | )

> addMsTouchListenerEnd: function ( | element,
> | type,
> | handler | )

> destroy: function()

> getPressedButton: function( | element | )

Get the pressed button, if any.

> ignore: function( | element | )

Check for event target elements that should be ignored by OpenLayers.

> buttonClick: function( | evt | )

Check if a button was clicked, and fire the buttonclick event

> function domToCss( | prefixedDom | )

Converts a upper camel case DOM style property name to a CSS property i.e.

> function start( | callback,
> | duration,
> | element | )

Executes a method with requestFrame in series for some duration.
Schedule a function to be called at the next available animation frame.

> function stop( | id | )

Terminates an animation loop started with start.

> play: function()

Calls the appropriate easing method

> easeIn: function( | t,
> | b,
> | c,
> | d | )

> easeOut: function( | t,
> | b,
> | c,
> | d | )

> easeInOut: function( | t,
> | b,
> | c,
> | d | )

> easeIn: function( | t,
> | b,
> | c,
> | d | )

> easeOut: function( | t,
> | b,
> | c,
> | d | )

> easeInOut: function( | t,
> | b,
> | c,
> | d | )

> easeIn: function( | t,
> | b,
> | c,
> | d | )

> easeOut: function( | t,
> | b,
> | c,
> | d | )

> easeInOut: function( | t,
> | b,
> | c,
> | d | )

> toString: function()

Convert projection to string (getCode wrapper).

> equals: function( | projection | )

Test equality of two projection instances.

> destroy: function()

Destroy projection object.
Instances of this class represent a width/height pair
A popup is a small div that can opened and closed on the map.
Instances of this class represent bounding boxes.

> setLayerZIndex: function ( | layer,
> | zIdx | )

> resetLayersZIndex: function()

Reset each layer’s z-index based on layer’s array index

> addControlToMap: function ( | control,
> | px | )

> getCurrentSize: function()

{OpenLayers.Size} A new OpenLayers.Size object with the dimensions of the map div

> calculateBounds: function( | center,
> | resolution | )

> getCachedCenter: function()

{OpenLayers.LonLat}

> moveByPx: function( | dx,
> | dy | )

Drag the map by pixels.

> adjustZoom: function( | zoom | )

> moveTo: function( | lonlat,
> | zoom,
> | options | )

> centerLayerContainer: function ( | lonlat | )

This function takes care to recenter the layerContainerDiv.

> isValidZoomLevel: function( | zoomLevel | )

> isValidLonLat: function( | lonlat | )

> getLonLatFromViewPortPx: function ( | viewPortPx | )

> getZoomTargetCenter: function ( | xy,
> | resolution | )

> getGeodesicPixelSize: function( | px | )

> getLonLatFromLayerPx: function ( | px | )

> applyTransform: function( | x,
> | y,
> | scale | )

Applies the given transform to the layerContainerDiv.
{HTMLDivElement} The element that contains the layers.

> destroy: function( | setNewBaseLayer | )

Destroy is a destructor: this is to alleviate cyclic references which the Javascript garbage cleaner can not take care of on its own.

> clone: function ( | obj | )

> getOptions: function()

Extracts an object from the layer with the properties that were set as options, but updates them with the values currently set on the instance.

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

> moveByPx: function( | dx,
> | dy | )

Move the layer based on pixel vector.

> setMap: function( | map | )

Set the map property for the layer.

> afterAdd: function()

Called at the end of the map.addLayer sequence.

> initResolutions: function()

This method’s responsibility is to set up the ‘resolutions’ array for the layer -- this array is what the layer will use to interface between the zoom levels of the map and the resolution display of the layer.

> resolutionsFromScales: function( | scales | )

Derive resolutions from scales.

> calculateResolutions: function( | props | )

Calculate resolutions based on the provided properties.

> getDataExtent: function ()

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

> getZIndex: function ()

{Integer} the z-index of this layer

> setZIndex: function ( | zIndex | )

> adjustBounds: function ( | bounds | )

This function will take a bounds, and if wrapDateLine option is set on the layer, it will return a bounds which is wrapped around the world.

> getExtent: function()

Get the map’s extent.

> getLonLatFromViewPortPx: function ( | viewPortPx | )

Get a map location from a pixel location

> getViewPortPxFromLonLat: function ( | lonlat | )

Get a pixel location from a map location

> initMercatorParameters: function()

Set up the mercator parameters on the layer: resolutions, projection, units.

> setMap: function( | map | )

Set the map property for the layer.

> loadWarningMessage:function()

If we can’t load the map lib, then display an error message to the user and tell them where to go for help.

> getWarningHTML:function()

To be implemented by subclasses.

> display: function( | display | )

Set the display on the pane

> setZIndex: function ( | zIndex | )

Set the z-index order for the pane.

> moveByPx: function( | dx,
> | dy | )

Move the layer based on pixel vector.

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

Handle calls to move the layer.

> getLonLatFromViewPortPx: function ( | viewPortPx | )

Get a map location from a pixel location

> getViewPortPxFromLonLat: function ( | lonlat | )

Get a pixel location from a map location

> getOLLonLatFromMapObjectLonLat: function( | moLonLat | )

Get an OL style map location from a 3rd party style map location

> getMapObjectLonLatFromOLLonLat: function( | olLonLat | )

Get a 3rd party map location from an OL map location.

> getOLPixelFromMapObjectPixel: function( | moPixel | )

Get an OL pixel location from a 3rd party pixel location.

> getMapObjectPixelFromOLPixel: function( | olPixel | )

Get a 3rd party pixel location from an OL pixel location

> initResolutions: function()

Populate the resolutions array

> getZoomForResolution: function( | resolution | )

Get the zoom level for a given resolution

> getOLZoomFromMapObjectZoom: function( | moZoom | )

Get the OL zoom index from the map object zoom level

> getMapObjectZoomFromOLZoom: function( | olZoom | )

Get the map object zoom level from the OL zoom level

> clone: function()

Create a clone of this layer

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

> removeGMapElements: function()

Remove all elements added to the dom.

> loadMapObject:function()

Load the GMap and register appropriate event listeners.

> setGMapVisibility: function( | visible | )

Display the GMap container and associated elements.

> getMapContainer: function()

{DOMElement} the GMap container’s div

> read: function( | data | )

Read data from a string, and return an object whose type depends on the subclass.

> write: function( | object | )

Accept an object, and return a string.
Contains public functions, grouped by namespace prefix, that will be applied when a namespaced node is found matching the function name.

> setNamespace: function( | alias,
> | uri | )

Set a namespace alias and URI for the format.

> createElementNSPlus: function( | name,
> | options | )

Shorthand for creating namespaced elements with optional attributes and child text nodes.

> setAttributes: function( | node,
> | obj | )

Set multiple attributes given key value pairs from an object.

> readNode: function( | node,
> | obj | )

Shorthand for applying one of the named readers given the node namespace and local name.

> readChildNodes: function( | node,
> | obj | )

Shorthand for applying the named readers to all children of a node.

> writeNode: function( | name,
> | obj,
> | parent | )

Shorthand for applying one of the named writers and appending the results to a node.

> getThisOrNextEl: function( | node,
> | name,
> | uri | )

Return this node or the next element node.

> getXMLDoc: function()

Get an XML document for nodes that are not supported in HTML (e.g.

> OpenLayers.Format.WFST = function( | options | )

Used to create a versioned WFS protocol.
Instances of OpenLayers.Marker are a combination of a OpenLayers.LonLat and an OpenLayers.Icon.

> destroy: function()

nullify references to prevent circular references and memory leaks

> onScreen:function()

{Boolean} Whether or not the feature is currently visible on screen (based on its ‘lonlat’ property)

> createMarker: function()

Based on the data associated with the Feature, create and return a marker object.

> destroyMarker: function()

Destroys marker.

> createPopup: function( | closeBox | )

Creates a popup object created from the ‘lonlat’, ‘popupSize’, and ‘popupContentHTML’ properties set in this.data.

> destroyPopup: function()

Destroys the popup created via createPopup.
Base class for format reading/writing a variety of formats.

> destroy: function()

nullify references to prevent circular references and memory leaks

> clone: function ()

Create a clone of this vector feature.

> onScreen:function( | boundsOnly | )

Determine whether the feature is within the map viewport.

> getVisibility: function()

Determine whether the feature is displayed or not.

> createMarker: function()

> destroyMarker: function()

> createPopup: function()

> atPoint: function( | lonlat,
> | toleranceLon,
> | toleranceLat | )

Determins whether the feature intersects with the specified location.

> destroyPopup: function()

> move: function( | location | )

Moves the feature and redraws it at its new location

> toState: function( | state | )

Sets the new state
This class represents an SLD Rule, as being used for rule-based SLD styling.
{Object} hash of style properties to use as default for merging rule-based style symbolizers onto.

> createSymbolizer: function( | feature | )

creates a style by applying all feature-dependent rules to the base style.

> applySymbolizer: function( | rule,
> | style,
> | feature | )

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

creates literals for all style properties that have an entry in this.propertyStyles.

> findPropertyStyles: function()

Looks into all rules for this style and the defaultStyle to collect all the style hash property names containing ${...}

> addPropertyStyles: function( | propertyStyles,
> | symbolizer | )

> getSymbolizerPrefix: function( | geometry | )

Returns the correct symbolizer prefix according to the geometry type of the passed geometry

> OpenLayers.Style.createLiteral = function( | value,
> | context,
> | feature,
> | property | )

converts a style value holding a combination of PropertyName and Literal into a Literal, taking the property values from the passed features.

> evaluate: function( | feature | )

Evaluates this filter for a specific feature.

> getSrsName: function( | feature,
> | options | )

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

Given an array of features, write a WFS transaction.

> schemaLocationAttr: function( | options | )

Generate the xsi:schemaLocation attribute value.

> setFilterProperty: function( | filter | )

Set the property of each spatial filter.

> getVersion: function( | root,
> | options | )

Returns the version to use.

> getParser: function( | version | )

Get an instance of the cached parser if available, otherwise create one.

> regex2value: function()

Convert the value of this rule from a regular expression string into an ogc literal string using a wildCard of *, a singleChar of ., and an escape of !.

> read: function( | data | )

> readSpatial: function( | node,
> | obj,
> | type | )

Read a {OpenLayers.Filter.Spatial} filter.
This class represents a spatial filter.

> writeOgcExpression: function( | value,
> | node | )

Limited support for writing OGC expressions.

> write: function( | filter | )

> getFilterType: function( | filter | )

Creates a geometry object.

> destroy: function()

Destroy this geometry.

> setBounds: function( | bounds | )

Set the bounds for this Geometry.

> clearBounds: function()

Nullify this components bounds and that of its parent as well.

> extendBounds: function( | newBounds | )

Extend the existing bounds to include the new bounds.

> atPoint: function( | lonlat,
> | toleranceLon,
> | toleranceLat | )

> getLength: function()

Calculate the length of this geometry.

> getArea: function()

Calculate the area of this geometry.

> toString: function()

Returns a text representation of the geometry.

> OpenLayers.Geometry.fromWKT = function( | wkt | )

Generate a geometry given a Well-Known Text string.

> OpenLayers.Geometry.segmentsIntersect = function( | seg1,
> | seg2,
> | options | )

Determine whether two line segments intersect.

> OpenLayers.Geometry.distanceToSegment = function( | point,
> | segment | )

> OpenLayers.Geometry.distanceSquaredToSegment = function( | point,
> | segment | )

Usually the distanceToSegment function should be used.

> calculateBounds: function ()

Create a new Bounds based on the lon/lat

> toShortString: function()

{String} Shortened String representation of Point object.

> getComponentsString: function()

Get a string representing the components for this collection

> addComponent: function( | component,
> | index | )

Add a new component (geometry) to the collection.

> removeComponent: function( | component | )

Remove a component from this geometry.

> getSortedSegments: function()

{Array} An array of segment objects.

> splitWithSegment: function( | seg,
> | options | )

Split this geometry with the given segment.

> split: function( | target,
> | options | )

Use this geometry (the source) to attempt to split a target geometry.

> splitWith: function( | geometry,
> | options | )

Split this geometry (the target) with the given geometry (the source).
A LineString is a Curve which, once two points have been added to it, can never be less than two points long.

> split: function( | geometry,
> | options | )

Use this geometry (the source) to attempt to split a target geometry.

> splitWith: function( | geometry,
> | options | )

Split this geometry (the target) with the given geometry (the source).

> containsPoint: function( | point | )

Test if a point is inside a linear ring.

> containsPoint: function( | point | )

Test if a point is inside a polygon.
Polygon is a collection of Geometry.LinearRings.

> parseFeature: function( | node | )

This function is the core of the GML parsing code in OpenLayers.

> parseAttributes: function( | node | )

> createFeatureXML: function( | feature | )

Accept an OpenLayers.Feature.Vector, and build a GML node for it.

> buildCoordinatesNode: function( | geometry | )

builds the coordinates XmlNode

> read: function( | data | )

> readNode: function( | node,
> | obj,
> | first | )

Shorthand for applying one of the named readers given the node namespace and local name.

> write: function( | features | )

> setGeometryTypes: function()

Sets the geometryTypes mapping.
{Object} Maps OpenLayers geometry class names to GML element names.

> write: function( | features | )

> setGeometryTypes: function()

Sets the geometryTypes mapping.

> writeSpatial: function( | filter,
> | name | )

Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.

> getVersion: function( | root,
> | options | )

Returns the version to use.

> read: function( | data,
> | options | )

> readNode: function( | node,
> | obj,
> | first | )

Shorthand for applying one of the named readers given the node namespace and local name.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.

> setLayer: function( | layer | )

Called to set the layer property.
{OpenLayers.Layer.Vector} The layer this strategy belongs to.

> activate: function()

Activate the strategy.

> deactivate: function()

Deactivate the strategy.
Vector features use the OpenLayers.Geometry classes as geometry description.

> handleAdd: function( | event | )

> handleRemove: function( | event | )

> triggerSave: function( | event | )

Registered as a listener.

> onCommit: function( | response | )

Called after protocol commit.

> selectUrl: function( | paramString,
> | urls | )

selectUrl() implements the standard floating-point multiplicative hash function described by Knuth, and hashes the contents of the given param string into a float between 0 and 1.

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

Combine url with layer’s params and these newParams.
This class represents a screen coordinate, in x and y coordinates
Constructor for a new OpenLayers.Tile instance.

> unload: function()

Call immediately before destroying if you are listening to tile events, so that counters are properly handled if tile is still loading at destroy-time.

> draw: function( | force | )

Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn.

> shouldDraw: function()

Return whether or not the tile should actually be (re-)drawn.

> setBounds: function( | bounds | )

Sets the bounds on this instance

> moveTo: function ( | bounds,
> | position,
> | redraw | )

Reposition the tile.

> clear: function( | draw | )

Clear the tile of any bounds/position-related data so that it can be reused in a new location.
Constructor for a new OpenLayers.Tile.Image instance.

> draw: function()

Check that a tile should be drawn, and draw it.

> renderTile: function()

Internal function to actually initialize the image tile, position it correctly, and set its url.

> positionTile: function()

Using the properties currenty set on the layer, position the tile correctly.

> clear: function()

Remove the tile from the DOM, clear it of any image related data so that it can be reused in a new location.

> getImage: function()

Returns or creates and returns the tile image.

> initImage: function()

Creates the content for the frame on the tile.

> setImgSrc: function( | url | )

Sets the source for the tile image

> getTile: function()

Get the tile’s markup.

> createBackBuffer: function()

Create a backbuffer for this tile.

> onImageLoad: function()

Handler for the image onload event

> onImageError: function()

Handler for the image onerror event

> stopLoading: function()

Stops a loading sequence so onImageLoad won’t be executed.
This is a class designed to designate a single tile, however it is explicitly designed to do relatively little.

> initProperties: function()

Set any properties that depend on the value of singleTile.

> setMap: function( | map | )

> removeMap: function( | map | )

Called when the layer is removed from the map.

> clearGrid:function()

Go through and remove all tiles from the grid, calling destroy() on each of them to kill circular references

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

This function is called whenever the map is moved.

> getTileData: function( | loc | )

Given a map location, retrieve a tile and the pixel offset within that tile corresponding to the location.

> destroyTile: function( | tile | )

> getServerResolution: function( | resolution | )

Return the closest server-supported resolution.

> getServerZoom: function()

Return the zoom value corresponding to the best matching server resolution, taking into account serverResolutions and zoomOffset.
{Array(Number}} This property is documented in subclasses as an API property.

> applyBackBuffer: function( | resolution | )

Create, insert, scale and position a back buffer for the layer.

> createBackBuffer: function()

Create a back buffer.

> removeBackBuffer: function()

Remove back buffer from DOM.

> moveByPx: function( | dx,
> | dy | )

Move the layer based on pixel vector.

> initSingleTile: function( | bounds | )

> calculateGridLayout: function( | bounds,
> | origin,
> | resolution | )

Generate parameters for the grid layout.

> getTileOrigin: function()

Determine the origin for aligning the grid of tiles.

> getTileBoundsForGridIndex: function( | row,
> | col | )

> initGriddedTiles:function( | bounds | )

> getMaxExtent: function()

Get this layer’s maximum extent.

> 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 tiles.

> removeTileMonitoringHooks: function( | tile | )

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

> moveGriddedTiles: function()

> shiftRow: function( | prepend,
> | tileSize | )

Shifty grid work

> shiftColumn: function( | prepend,
> | tileSize | )

Shift grid work in the other dimension

> removeExcessTiles: function( | rows,
> | columns | )

When the size of the map or the buffer changes, we may need to remove some excess rows and columns.

> onMapResize: function()

For singleTile layers, this will set a new tile size according to the dimensions of the map pane.

> getURL: function ( | bounds | )

> getXYZ: function( | bounds | )

Calculates x, y and z for the given bounds.

> clone: function( | obj | )

Instances of OpenLayers.Map are interactive maps embedded in a web page.

> setExtent: function( | extent,
> | resolutionChanged | )

Set the visible part of the layer.

> setSize: function( | size | )

Sets the size of the drawing surface.

> getResolution: function()

Uses cached copy of resolution if available to minimize computing

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

Draw the feature.

> calculateFeatureDx: function( | bounds,
> | worldBounds | )

{Number} Calculates the feature offset in x direction.

> drawGeometry: function( | geometry,
> | style,
> | featureId | )

Draw a geometry.

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

Function for drawing text labels.

> removeText: function( | featureId | )

Function for removing text labels.

> clear: function()

Clear all vectors from the renderer.

> getFeatureIdFromEvent: function( | evt | )

Returns a feature id from an event on the renderer.

> eraseFeatures: function( | features | )

This is called by the layer to erase features

> eraseGeometry: function( | geometry,
> | featureId | )

Remove a geometry from the renderer (by id).

> moveRoot: function( | renderer | )

moves this renderer’s root to a (different) renderer.

> getRenderLayerId: function()

Gets the layer that this renderer’s output appears on.

> applyDefaultSymbolizer: function( | symbolizer | )

> setExtent: function()

Set the visible part of the layer.

> eraseGeometry: function( | geometry,
> | featureId | )

Erase a geometry from the renderer.

> setSize: function( | size | )

Sets the size of the drawing surface.

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

Draw the feature.

> drawGeometry: function( | geometry,
> | style,
> | featureId | )

Used when looping (in redraw) over the features; draws the canvas.

> drawExternalGraphic: function( | geometry,
> | style,
> | featureId | )

Called to draw External graphics.

> drawNamedSymbol: function( | geometry,
> | style,
> | featureId | )

Called to draw Well Known Graphic Symbol Name.

> setCanvasStyle: function( | type,
> | style | )

Prepare the canvas for drawing by setting various global settings.

> featureIdToHex: function( | featureId | )

Convert a feature ID string into an RGB hex string.

> setHitContextStyle: function( | type,
> | featureId,
> | symbolizer,
> | strokeScaling | )

Prepare the hit canvas for drawing by setting various global settings.

> drawPoint: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

> drawLineString: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

> drawLinearRing: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

> renderPath: function( | context,
> | geometry,
> | style,
> | featureId,
> | type | )

Render a path with stroke and optional fill.

> drawPolygon: function( | geometry,
> | style,
> | featureId | )

This method is only called by the renderer itself.

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

This method is only called by the renderer itself.

> getLocalXY: function( | point | )

transform geographic xy into pixel xy

> clear: function()

Clear all vectors from the renderer.

> getFeatureIdFromEvent: function( | evt | )

Returns a feature id from an event on the renderer.

> eraseFeatures: function( | features | )

This is called by the layer to erase features; removes the feature from the list, then redraws the layer.

> redraw: function()

The real ‘meat’ of the function: any time things have changed, redraw() can be called to loop over all the data and (you guessed it) redraw it.

> setMap: function ( | map | )

> checkModifiers: function ( | evt | )

Check the keyMask on the handler.

> startTouch: function()

Start touch events, this method must be called by subclasses in “touchstart” method.

> callback: function ( | name,
> | args | )

Trigger the control’s named callback with the given arguments

> register: function ( | name,
> | method | )

register an event on the map

> unregister: function ( | name,
> | method | )

unregister an event from the map

> setEvent: function( | evt | )

With each registered browser event, the handler sets its own evt property.

> destroy: function ()

Deconstruct the handler.

> destroy: function()

> onWheelEvent: function( | e | )

Catch the wheel event and handle it xbrowserly

> wheelZoom: function( | e | )

Given the wheel event, we carry out the appropriate zooming in or out, based on the ‘wheelDelta’ or ‘detail’ property of the event.

> activate: function ( | evt | )

> deactivate: function ( | evt | )

> writeIndent: function()

Output an indentation string depending on the indentation level.

> writeNewline: function()

Output a string representing a newline if in pretty printing mode.

> writeSpace: function()

Output a string representing a space if in pretty printing mode.

> write: function( | features | )

> writeSpatial: function( | filter,
> | name | )

Read a {OpenLayers.Filter.Spatial} filter and converts it into XML.

> readNode: function( | node,
> | obj,
> | first | )

Shorthand for applying one of the named readers given the node namespace and local name.

> determineZIndex: function( | node | )

Determine the z-index for the current node if there isn’t one, and set the maximum value if we’ve found a new maximum.

> Z_ORDER: function( | indexer,
> | newNode,
> | nextNode | )

This compare method is used by other comparison methods.

> destroy: function()

> clear: function()

Remove all the elements from the root

> setExtent: function( | extent,
> | resolutionChanged | )

Set the visible part of the layer.

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

This function is in charge of asking the specific renderer which type of node to create for the given geometry and style.

> drawGeometry: function( | geometry,
> | style,
> | featureId | )

Draw the geometry, creating new nodes, setting paths, setting style, setting featureId on the node.

> redrawNode: function( | id,
> | geometry,
> | style,
> | featureId | )

> redrawBackgroundNode: function( | id,
> | geometry,
> | style,
> | featureId | )

Redraws the node using special ‘background’ style properties.

> drawGeometryNode: function( | node,
> | geometry,
> | style | )

Given a node, draw a geometry on the specified layer.

> postDraw: function( | node | )

Things that have do be done after the geometry node is appended to its parent node.

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

Virtual function for drawing Point Geometry.

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

Virtual function for drawing LineString Geometry.

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

Virtual function for drawing LinearRing Geometry.

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

Virtual function for drawing Polygon Geometry.

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

Virtual function for drawing Rectangle Geometry.

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

Virtual function for drawing Circle Geometry.

> removeText: function( | featureId | )

Removes a label

> getFeatureIdFromEvent: function( | evt | )

> eraseGeometry: function( | geometry,
> | featureId | )

Erase a geometry from the renderer.

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

Create new node of the specified type, with the (optional) specified id.

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

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

> moveRoot: function( | renderer | )

moves this renderer’s root to a different renderer.

> getRenderLayerId: function()

Gets the layer that this renderer’s output appears on.

> isComplexSymbol: function( | graphicName | )

Determines if a symbol cannot be rendered using drawCircle

> activate: function()

Activate the strategy: load data or add listener to load when visible

> deactivate: function()

Deactivate the strategy.

> load: function( | options | )

Tells protocol to load data and unhooks the visibilitychanged event

> merge: function( | resp | )

Add all features to the layer.
This class represents an OGC Filter.

> mergeWithDefaultFilter: function( | filter | )

Merge filter passed to the read method with the default one

> abort: function( | response | )

Abort an ongoing request.

> createCallback: function( | method,
> | response,
> | options | )

Returns a function that applies the given public method with resp and options arguments.

> success: function()

> OpenLayers.Protocol.WFS.fromWMSLayer = function( | layer,
> | options | )

Convenience function to create a WFS protocol from a WMS layer.

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

> clearMarkers: function()

This method removes all markers from a layer.

> drawMarker: function( | marker | )

Calculate the pixel location for the marker, create it, and add it to the layer’s div

> handleRead: function( | response,
> | options | )

Deal with response from the read request.

> parseResponse: function( | request,
> | options | )

Read HTTP response body and return features

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

Given a list of feature, assemble a batch request for update, create, and delete transactions.

> handleCommit: function( | response,
> | options | )

Called when the commit request returns.

> filterDelete: function( | filter,
> | options | )

Send a request that deletes all features by their filter.

> abort: function( | response | )

Abort an ongoing request, the response object passed to this method must come from this protocol (as a result of a read, or commit operation).

> createFeature: function( | pixel | )

Add temporary features

> destroyFeature: function( | force | )

Destroy the temporary geometries

> destroyPersistedFeature: function()

Destroy the persisted feature.

> finalize: function( | cancel | )

Finish the geometry and call the “done” callback.

> click: function( | evt | )

Handle clicks.

> dblclick: function( | evt | )

Handle double-clicks.

> modifyFeature: function( | pixel | )

Modify the existing geometry given a pixel location.

> drawFeature: function()

Render features on the temporary layer.

> getGeometry: function()

Return the sketch geometry.

> geometryClone: function()

Return a clone of the relevant geometry.

> mousedown: function( | evt | )

Handle mousedown.

> touchstart: function( | evt | )

Handle touchstart.

> mousemove: function( | evt | )

Handle mousemove.

> touchmove: function( | evt | )

Handle touchmove.

> mouseup: function( | evt | )

Handle mouseup.

> touchend: function( | evt | )

Handle touchend.

> down: function( | evt | )

Handle mousedown and touchstart.

> move: function ( | evt | )

Handle mousemove and touchmove.

> up: function ( | evt | )

Handle mouseup and touchend.

> mouseout: function( | evt | )

Handle mouse out.

> passesTolerance: function( | pixel1,
> | pixel2,
> | tolerance | )

Determine whether the event is within the optional pixel tolerance.

> undo: function()

Remove the most recently added point in the sketch geometry.

> createFeature: function( | pixel | )

Add temporary geometries

> destroyFeature: function( | force | )

Destroy temporary geometries

> destroyPersistedFeature: function()

Destroy the persisted feature.

> removePoint: function()

Destroy the temporary point.

> addPoint: function( | pixel | )

Add point to geometry.

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

Insert a point in the current sketch given x & y coordinates.

> insertDeltaXY: function( | dx,
> | dy | )

Insert a point given offsets from the previously inserted point.

> insertDirectionLength: function( | direction,
> | length | )

Insert a point in the current sketch given a direction and a length.

> insertDeflectionLength: function( | deflection,
> | length | )

Insert a point in the current sketch given a deflection and a length.

> getCurrentPointIndex: function()

{Number} The index of the most recently drawn point.

> redo: function()

Reinsert the most recently removed point resulting from an undo call.

> freehandMode: function( | evt | )

Determine whether to behave in freehand mode or not.

> modifyFeature: function( | pixel,
> | drawing | )

Modify the existing geometry given the new point

> drawFeature: function()

Render geometries on the temporary layer.

> getSketch: function()

Return the sketch feature.

> getGeometry: function()

Return the sketch geometry.

> touchstart: function( | evt | )

handle touchstart.

> down: function( | evt | )

Handle mousedown and touchstart.

> move: function ( | evt | )

Handle mousemove and touchmove.

> up: function ( | evt | )

Handle mouseup and touchend.

> dblclick: function( | evt | )

Handle double-clicks.
Base class to construct a higher-level handler for event sequences.

> destroy: function ()

The destroy method is used to perform any clean up before the control is dereferenced.

> setMap: function( | map | )

Set the map property for the control.

> draw: function ( | px | )

The draw method is called when the control is ready to be displayed on the page.

> moveTo: function ( | px | )

Sets the left and top style attributes to the passed in pixel coordinates.

> dragstart: function ( | evt | )

This private method is factorized from mousedown and touchstart methods

> dragmove: function ( | evt | )

This private method is factorized from mousemove and touchmove methods

> dragend: function ( | evt | )

This private method is factorized from mouseup and touchend methods

> down: function( | evt | )

This method is called during the handling of the mouse down event.

> move: function( | evt | )

This method is called during the handling of the mouse move event.

> up: function( | evt | )

This method is called during the handling of the mouse up event.

> out: function( | evt | )

This method is called during the handling of the mouse out event.

> mousedown: function( | evt | )

Handle mousedown events

> touchstart: function( | evt | )

Handle touchstart events

> mousemove: function( | evt | )

Handle mousemove events

> touchmove: function( | evt | )

Handle touchmove events

> removeTimeout: function()

Private.

> mouseup: function( | evt | )

Handle mouseup events

> touchend: function( | evt | )

Handle touchend events

> mouseout: function ( | evt | )

Handle mouseout events

> click: function ( | evt | )

The drag handler captures the click event.

> activate: function()

Activate the handler.

> deactivate: function()

Deactivate the handler.

> adjustXY: function( | evt | )

Converts event coordinates that are relative to the document body to ones that are relative to the map viewport.

> addDocumentEvents: function()

Start observing document events when documentDrag is true and the mouse cursor leaves the map viewport while dragging.

> removeDocumentEvents: function()

Stops observing document events when documentDrag is true and the mouse cursor re-enters the map viewport while dragging.
The drag handler is used to deal with sequences of browser events related to dragging.

> destroy: function()

> setMap: function ( | map | )

> startBox: function ( | xy | )

> moveBox: function ( | xy | )

> endBox: function( | end | )

> removeBox: function()

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

> activate: function ()

> deactivate: function ()

> getBoxOffsets: function()

Determines border offsets for a box, according to the box model.

> draw: function()

> zoomBox: function ( | position | )

> draw: function()

Creates a Drag handler, using panMap and panMapDone as callbacks.

> panMap: function( | xy | )

> panMapDone: function( | xy | )

Finish the panning operation.

> panMapStart: function()

> delayedCall: function( | evt | )

Sets timerId to null.

> touchstart: function( | evt | )

Handle touchstart.

> touchmove: function( | evt | )

Store position of last move, because touchend event can have an empty “touches” property.

> touchend: function( | evt | )

Correctly set event xy property, and add lastTouches to have touches property from last touchstart or touchmove

> mousedown: function( | evt | )

Handle mousedown.

> mouseup: function ( | evt | )

Handle mouseup.

> rightclick: function( | evt | )

Handle rightclick.

> delayedRightCall: function( | evt | )

Sets rightclickTimerId to null.
{Number} The id of the right mouse timeout waiting to clear the delayedEvent.

> click: function( | evt | )

Handle click events from the browser.

> dblclick: function( | evt | )

Handle dblclick.

> handleDouble: function( | evt | )

Handle double-click sequence.

> handleSingle: function( | evt | )

Handle single click sequence.

> queuePotentialClick: function( | evt | )

This method is separated out largely to make testing easier (so we don’t have to override window.setTimeout)

> passesTolerance: function( | evt | )

Determine whether the event is within the optional pixel tolerance.

> getTouchDistance: function( | from,
> | to | )

{Boolean} The pixel displacement between two touches.

> passesDblclickTolerance: function( | evt | )

Determine whether the event is within the optional double-cick pixel tolerance.

> clearTimer: function()

Clear the timer and set timerId to null.
{Number} The id of the timeout waiting to clear the delayedCall.

> getEventInfo: function( | evt | )

This method allows us to store event information without storing the actual event.
The DragPan control pans the map with a drag of the mouse.
The ZoomBox control enables zooming directly to a given extent, by drawing a box on the map.

> destroy: function()

The destroy method is used to perform any clean up before the control is dereferenced.

> activate: function()

> deactivate: function()

> draw: function()

> defaultClick: function ( | evt | )

> defaultDblClick: function ( | evt | )

> defaultDblRightClick: function ( | evt | )

> wheelChange: function( | evt,
> | deltaZ | )

> wheelUp: function( | evt,
> | delta | )

User spun scroll wheel up

> wheelDown: function( | evt,
> | delta | )

User spun scroll wheel down

> disableZoomBox : function()

> enableZoomBox : function()

> disableZoomWheel : function()

> enableZoomWheel : function()

> clone: function ( | obj | )

Create a clone of this layer

> getURL: function ( | bounds | )

Return a GetMap query string for this layer
This class represents a UserStyle obtained from a SLD, containing styling rules.

> destroy: function()

> createSymbolizer: function( | feature,
> | intent | )

Creates the symbolizer for a feature for a render intent.

> addUniqueValueRules: function( | renderIntent,
> | property,
> | symbolizers,
> | context | )

Convenience method to create comparison rules for unique values of a property.
Abstract vector layer strategy class.
Abstract vector layer protocol class.
This is the base class for all renderers.

> clone: function ( | obj | )

Create a clone of this layer.

> refresh: function( | obj | )

Ask the layer to request features again and redraw them.

> assignRenderer: function()

Iterates through the available renderer implementations and selects and assigns the first one whose “supported()” function returns true.

> displayError: function()

Let the user know their browser isn’t supported.

> setMap: function( | map | )

The layer has been added to the map.

> afterAdd: function()

Called at the end of the map.addLayer sequence.

> removeMap: function( | map | )

The layer has been removed from the map.

> onMapResize: function()

Notify the renderer of the change in size.

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

Reset the vector layer’s div so that it once again is lined up with the map.

> eraseFeatures: function( | features | )

Erase features from the layer.

> getFeatureFromEvent: function( | evt | )

Given an event, return a feature if the event occurred over one.

> inValidRange: function( | x,
> | y,
> | xyOnly | )

See #669 for more information

> setExtent: function( | extent,
> | resolutionChanged | )

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

Transforms the SVG coordinate system

> setSize: function( | size | )

Sets the size of the drawing surface.

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

This method is only called by the renderer itself.

> clipLine: function( | badComponent,
> | goodComponent | )

Given two points (one inside the valid range, and one outside), clips the line betweeen the two points so that the new points are both inside the valid range.

> getShortString: function( | point | )

> getPosition: function( | node | )

Finds the position of an svg node.

> importSymbol: function ( | graphicName | )

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

> getFeatureIdFromEvent: function( | evt | )

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

Deprecated.

> draw: function()

{DOMElement}

> getBarLen: function( | maxLen | )

Given a number, round it down to the nearest 1,2,5 times a power of 10.

> update: function()

Update the size of the bars, and the labels they contain.

> setMap: function( | map | )

> draw: function( | px | )

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

> _removeButton: function( | btn | )

> removeButtons: function()

> onButtonClick: function( | evt | )

> getSlideFactor: function( | dim | )

> destroy: function()

Nullify references and remove event listeners to prevent circular references and memory leaks

> clone: function()

{OpenLayers.Icon} A fresh copy of the icon.
Creates an icon, which is an image tag in a div.

> setSize: function( | size | )

> setUrl: function( | url | )

> draw: function( | px | )

Move the div to the given pixel.

> erase: function()

Erase the underlying image element.

> setOpacity: function( | opacity | )

Change the icon’s opacity

> moveTo: function ( | px | )

move icon to passed in px.

> display: function( | display | )

Hide or show the icon
The icon represents a graphical icon on the screen.

> draw: function( | px | )

Calls draw on the icon, and returns that output.

> erase: function()

Erases any drawn elements for this marker.

> moveTo: function ( | px | )

Move the marker to the new location.

> onScreen:function()

{Boolean} Whether or not the marker is currently visible on screen.

> inflate: function( | inflate | )

Englarges the markers icon by the specified ratio.

> setOpacity: function( | opacity | )

Change the opacity of the marker by changin the opacity of its icon

> setUrl: function( | url | )

Change URL of the Icon Image.

> display: function( | display | )

Hide or show the icon

> OpenLayers.Marker.defaultIcon = function()

Creates a default OpenLayers.Icon.

> cacheFeatures: function( | event | )

Cache features before they are added to the layer.

> clearCache: function()

Clear out the cached features.

> page: function( | start,
> | event | )

Display the page starting at the given index from the cache.

> extractGeometry: function( | geometry | )

Entry point to construct the WKT for a single Geometry object.

> fixPadding: function()

To be removed in 3.0, this function merely helps us to deal with the case where the user may have set an integer value for padding, instead of an OpenLayers.Bounds object.

> destroy: function()

nullify references to prevent circular references and memory leaks

> draw: function( | px | )

Constructs the elements that make up the popup.

> updatePosition: function()

if the popup has a lonlat and its map members set, then have it move itself to its proper position

> moveTo: function( | px | )

> visible: function()

{Boolean} Boolean indicating whether or not the popup is visible

> toggle: function()

Toggles visibility of the popup.

> show: function()

Makes the popup visible.

> hide: function()

Makes the popup invisible.

> setSize:function( | contentSize | )

Used to adjust the size of the popup.

> setBackgroundColor:function( | color | )

Sets the background color of the popup.

> setOpacity:function( | opacity | )

Sets the opacity of the popup.

> setBorder:function( | border | )

Sets the border style of the popup.

> setContentHTML:function( | contentHTML | )

Allows the user to set the HTML content of the popup.

> registerImageListeners: function()

Called when an image contained by the popup loaded.

> getContentDivPadding: function()

Glorious, oh glorious hack in order to determine the css ‘padding’ of the contentDiv.

> addCloseBox: function( | callback | )

> panIntoView: function()

Pans the map such that the popup is totaly viewable (if necessary)

> registerEvents:function()

Registers events on the popup.

> onmousedown: function ( | evt | )

When mouse goes down within the popup, make a note of it locally, and then do not propagate the mousedown (but do so safely so that user can select text inside)

> onmousemove: function ( | evt | )

If the drag was started within the popup, then do not propagate the mousemove (but do so safely so that user can select text inside)

> onmouseup: function ( | evt | )

When mouse comes up within the popup, after going down in it, reset the flag, and then (once again) do not propagate the event, but do so safely so that user can select text inside

> onclick: function ( | evt | )

Ignore clicks, but allowing default browser handling

> onmouseout: function ( | evt | )

When mouse goes out of the popup set the flag to false so that if they let go and then drag back in, we won’t be confused.

> ondblclick: function ( | evt | )

Ignore double-clicks, but allowing default browser handling
Protocols return Response objects to their users.

> activate: function()

Set up strategy with regard to reading new batches of remote data.

> deactivate: function()

Tear down strategy with regard to reading new batches of remote data.

> update: function( | options | )

Callback function called on “moveend” or “refresh” layer events.

> getMapBounds: function()

Get the map bounds expressed in the same projection as this layer.

> invalidBounds: function( | mapBounds | )

Determine whether the previously requested set of features is invalid.

> calculateBounds: function( | mapBounds | )

> triggerRead: function( | options | )

> createFilter: function()

Creates a spatial BBOX filter.

> merge: function( | resp | )

Given a list of features, determine which ones to add to the layer.

> loadMapObject: function()

Load the GMap and register appropriate event listeners.

> setGMapVisibility: function( | visible | )

Display the GMap container and associated elements.

> getMapContainer: function()

{DOMElement} the GMap container’s div

> makeSameOrigin: function( | url,
> | proxy | )

Using the specified proxy, returns a same origin url of the provided url.

> runCallbacks: function( | options | )

Calls the complete, success and failure callbacks.

> destroy: function()

> setBorder: function ( | color,
> | width | )

Allow the user to change the box’s color and border width

> draw: function( | px,
> | sz | )

> onScreen:function()

{Boolean} Whether or not the marker is currently visible on screen.

> display: function( | display | )

Hide or show the icon

> clone: function ( | obj | )

Create a clone of this layer

> getURL: function ( | bounds | )

Return a query string for this layer

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

getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.

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

special handler to request mapguide tiles from an http exposed tilecache

> updateHandler: function( | handler,
> | options | )

> measureComplete: function( | geometry | )

Called when the measurement sketch is done.

> measurePartial: function( | point,
> | geometry | )

Called each time a new point is added to the measurement sketch.

> measureImmediate : function( | point,
> | feature,
> | drawing | )

Called each time the measurement sketch is modified.

> cancelDelay: function()

Cancels the delay measurement that measurePartial began.

> measure: function( | geometry,
> | eventType | )

> getBestArea: function( | geometry | )

Based on the displaySystem returns the area of a geometry.

> getArea: function( | geometry,
> | units | )

> getBestLength: function( | geometry | )

Based on the displaySystem returns the length of a geometry.

> getLength: function( | geometry,
> | units | )

> drawFeature: function( | geometry | )

> getContext: function( | feature | )

Gets the context for evaluating this rule

> touchstart: function( | evt | )

Handle touchstart events

> touchmove: function( | evt | )

Handle touchmove events

> touchend: function( | evt | )

Handle touchend events

> activate: function()

Activate the handler.

> deactivate: function()

Deactivate the handler.

> getDistance: function( | touches | )

Get the distance in pixels between two touches.

> getPinchData: function( | evt | )

Get informations about the pinch event.

> mousemove: function( | evt | )

Called when the mouse moves on the map.

> mouseout: function( | evt | )

Called when the mouse goes out of the map.

> passesTolerance: function( | px | )

Determine whether the mouse move is within the optional pixel tolerance.

> clearTimer: function()

Clear the timer and set timerId to null.

> delayedCall: function( | evt | )

Triggers pause callback.

> readRestriction: function( | node,
> | obj | )

Reads restriction defined in the child nodes of a restriction element

> read: function( | data | )

> reset: function()

Start or cancel the refresh interval depending on the visibility of the layer.

> start: function()

Start the refresh interval.

> stop: function()

Cancels the refresh interval.

> destroy: function()

> draw: function()

{DOMElement}

> redraw: function( | evt | )

> reset: function( | evt | )

> formatOutput: function( | lonLat | )

Override to provide custom display output

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

Individual callbacks are created for read, create and update, should a subclass need to override each one separately.

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

Called the the request issued by create is complete.

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

Called the the request issued by update is complete.

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

Called the the request issued by delete is complete.

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

Called by CRUD specific handlers.

> parseFeatures: function( | request | )

Read HTTP response body and return features.

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

This method is used from within the commit method each time an an HTTP response is received from the server, it is responsible for calling the user-supplied callbacks.

> cacheFeatures: function( | event | )

Cache features before they are added to the layer.

> clearCache: function()

Clear out the cached features.

> cluster: function( | event | )

Cluster features based on some threshold distance.

> clustersExist: function()

Determine whether calculated clusters are already on the layer.

> shouldCluster: function( | cluster,
> | feature | )

Determine whether to include a feature in a given cluster.

> addToCluster: function( | cluster,
> | feature | )

Add a feature to a cluster.

> createCluster: function( | feature | )

Given a feature, create a cluster.

> draw: function()

Render the control in the browser.

> baseLayerDraw: function()

> rectDrag: function( | px | )

Handle extent rectangle drag

> mapDivClick: function( | evt | )

Handle browser events

> onButtonClick: function( | evt | )

> maximizeControl: function( | e | )

Unhide the control.

> minimizeControl: function( | e | )

Hide all the contents of the control, shrink the size, add the maximize icon

> showToggle: function( | minimize | )

Hide/Show the toggle depending on whether the control is minimized

> update: function()

Update the overview map after layers move.

> isSuitableOverview: function()

Determines if the overview map is suitable given the extent and resolution of the main map.

> createMap: function()

Construct the map that this control contains

> updateRectToMap: function()

Updates the extent rectangle position and size to match the map extent

> updateMapToRect: function()

Updates the map extent to match the extent rectangle position and size

> setRectPxBounds: function( | pxBounds | )

Set extent rectangle pixel bounds.

> getRectBoundsFromMapBounds: function( | lonLatBounds | )

Get the rect bounds from the map bounds.

> getMapBoundsFromRectBounds: function( | pxBounds | )

Get the map bounds from the rect bounds.

> getLonLatFromOverviewPx: function( | overviewMapPx | )

Get a map location from a pixel location

> getOverviewPxFromLonLat: function( | lonlat | )

Get a pixel location from a map location

> pinchStart: function( | evt,
> | pinchData | )

> pinchMove: function( | evt,
> | pinchData | )

> pinchDone: function( | evt,
> | start,
> | last | )

> destroy: function()

The destroy method is used to perform any clean up before the control is dereferenced.

> activate: function()

> deactivate: function()

> draw: function()

> defaultClick: function ( | evt | )

> defaultDblClick: function ( | evt | )

> clone: function ( | obj | )

Create a clone of this layer

> getURL: function ( | bounds | )

Return a query string for this layer

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

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

> setExtent: function( | extent,
> | resolutionChanged | )

Set the renderer’s extent

> setSize: function( | size | )

Set the size of the drawing surface

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

Get the node type for a geometry and style

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

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

> graphicRotate: function( | node,
> | xOffset,
> | yOffset,
> | style | )

If a point is to be styled with externalGraphic and rotation, VML fills cannot be used to display the graphic, because rotation of graphic fills is not supported by the VML implementation of Internet Explorer.

> postDraw: function( | node | )

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

Get the geometry’s bounds, convert it to our vml coordinate system, then set the node’s position, size, and local coordinate system.

> dashStyle: function( | style | )

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

Create a new node

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

Determine whether a node is of a given type

> createRenderRoot: function()

Create the renderer root

> createRoot: function( | suffix | )

Create the main root element

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

Render a point

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

Render a circle.

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

Render a linestring.

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

Render a linearring

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

Render a polygon

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

Render a rectangle

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

This method is only called by the renderer itself.

> moveRoot: function( | renderer | )

moves this renderer’s root to a different renderer.

> importSymbol: function ( | graphicName | )

add a new symbol definition from the rendererer’s symbol hash
Point geometry class.

> down: function( | evt | )

Start drawing a new feature

> move: function( | evt | )

Respond to drag move events

> up: function( | evt | )

Finish drawing the feature

> out: function( | evt | )

Finish drawing the feature.

> createGeometry: function()

Create the new polygon geometry.

> modifyGeometry: function()

Modify the polygon geometry in place.

> calculateAngle: function( | point,
> | evt | )

Calculate the angle based on settings.

> finalize: function()

Finish the geometry and call the “done” callback.

> callback: function ( | name,
> | args | )

Trigger the control’s named callback with the given arguments

> touchstart: function( | evt | )

Handle touchstart events

> touchmove: function( | evt | )

Handle touchmove events.

> mousedown: function( | evt | )

Handle mouse down.

> mouseup: function( | evt | )

Handle mouse up.

> click: function( | evt | )

Handle click.

> mousemove: function( | evt | )

Handle mouse moves.

> dblclick: function( | evt | )

Handle dblclick.

> geometryTypeMatches: function( | feature | )

Return true if the geometry type of the passed feature matches one of the geometry types in the geometryTypes array.

> handle: function( | evt | )

> triggerCallback: function( | type,
> | mode,
> | args | )

Call the callback keyed in the event map with the supplied arguments.

> activate: function()

Turn on the handler.

> deactivate: function()

Turn off the handler.

> handleMapEvents: function( | evt | )

> moveLayerToTop: function()

Moves the layer for this handler to the top, so mouse events can reach it.

> moveLayerBack: function()

Moves the layer back to the position determined by the map’s layers array.

> clickFeature: function( | feature | )

Called when the feature handler detects a click-in on a feature.

> clickoutFeature: function( | feature | )

Called when the feature handler detects a click-out on a feature.

> overFeature: function( | feature | )

Called when the feature handler detects a mouse-over on a feature.

> downFeature: function( | pixel | )

Called when the drag handler detects a mouse-down.

> moveFeature: function( | pixel | )

Called when the drag handler detects a mouse-move.

> upFeature: function( | pixel | )

Called when the drag handler detects a mouse-up.

> doneDragging: function( | pixel | )

Called when the drag handler is done dragging.

> outFeature: function( | feature | )

Called when the feature handler detects a mouse-out on a feature.

> cancel: function()

Called when the drag handler detects a mouse-out (from the map viewport).

> setMap: function( | map | )

Set the map property for the control and all handlers.

> createFeature: function( | pixel | )

Add temporary geometries

> addPoint: function( | pixel | )

Add point to geometry.

> getCurrentPointIndex: function()

{Number} The index of the most recently drawn point.

> enforceTopology: function( | event | )

Simple topology enforcement for drawing interior rings.

> finishGeometry: function()

Finish the geometry and send it back to the control.

> finalizeInteriorRing: function()

Enforces that new ring has some area and doesn’t contain vertices of any other rings.

> restoreFeature: function( | cancel | )

Move the feature from the sketch layer to the target layer.

> destroyFeature: function( | force | )

Destroy temporary geometries

> drawFeature: function()

Render geometries on the temporary layer.

> getSketch: function()

Return the sketch feature.

> getGeometry: function()

Return the sketch geometry.

> moveTo: function( | px | )

Since the popup is moving to a new px, it might need also to be moved relative to where the marker is.

> calculateRelativePosition:function( | px | )

> updateRelativePosition: function()

The popup has been moved to a new relative location, so we may want to make some cosmetic adjustments to it.

> calculateNewPx:function( | px | )

> 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.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.

> 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.

> 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

> 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.

> 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.

> 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.

> 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.

> commitSuccess: function( | request | )

Called when the Ajax request returns a response

> commitFailure: function( | request | )

Called when the Ajax request fails

> loadMapObject:function()

> onMapResize: function()

> 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()

> unfreezeFeature: function( | row | )

> extractFidFromField: function( | field | )

> 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.

> 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.

> 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()

> fixYahooEventPane: function()

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

> 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.

> updateDimensions: function( | zoomChanged | )

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

Draw the feature.

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

Function for drawing text labels.

> 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

> draw: function( | px | )

> updateRelativePosition: function()

The popup has been moved to a new relative location, in which case we will want to re-do the rico corners.

> setBorder:function( | border | )

Always sets border to 0.

> setRicoCorners:function()

Update RICO corners according to the popup’s current relative postion.

> getCornersToRound:function()

{String} The proper corners string (“tr tl bl br”) for rico to round.

> getParameters: function( | url | )

> setMap: function( | map | )

Set the map property for the control.

> setCenter: function()

As soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.

> configureLayers: function()

As soon as all the layers are loaded, cycle through them and hide or show them.

> loadMetadata: function()

> initLayer: function()

Sets layer properties according to the metadata provided by the API

> getURL: function( | bounds | )

> updateAttribution: function()

Updates the attribution according to the requirements outlined in http://gis.638310.n2.nabble.com/Bing-imagery-td5789168.html

> setMap: function()

> destroy: function()

> OpenLayers.Layer.Bing.processMetadata = function( | metadata | )

This function will be bound to an instance, linked to the global scope with an id, and called by the JSONP script returned by the API.
Construct a new bounds object.
{OpenLayers.Events} The events instance that the buttonclick event will be triggered on.
{DOMElement} the DOM element receiving browser events
This class offers several methods for interacting with a wrapped pro4js projection object.
Constructor for a new OpenLayers.Map instance.
Controls affect the display or behavior of the map.
{OpenLayers.LonLat} The current center of the map
{Integer} The current zoom level of the map
{Object} Cached object representing the layer container origin (in pixels).
{Object} An optional object whose properties will be set on the layer.
Create a new event pane layer
A mixin for layers that wraps up the pieces neccesary to have a coordinate conversion for working with commercial APIs which use a spherical mercator projection.
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).
Mixin providing functionality specific to the Google Maps API v3.
Construct an XML parser.
As a compliment to the readers property, this structure contains public writing functions grouped by namespace alias and named like the node names they produce.
{XMLDom} If this browser uses ActiveX, this will be set to a XMLDOM object.
Constructor for features.
OpenLayers features can have a number of style attributes.
A Geometry is a description of a geographic object.
Create a vector feature.
{Boolean} If set to true, the defaultStyle will extend the symbolizer of every rule.
Creates a UserStyle.
This class represents a generic filter.
Creates a spatial filter.
Creates an ogc:FeatureId rule.
Read and write XML.
A format for creating WFS v1.0.0 transactions.
A format for creating WFS v1.1.0 transactions.
Creates a logical filter (And, Or, Not).
Creates a comparison rule.
Read/Write ogc:Filter.
Base class for versioned formats, i.e.
Creates a filter function.
This class represents a filter function.
Creates a Geometry Collection -- a list of geoms.
Create a new MultiPoint Geometry
A Collection is exactly what it sounds like: A collection of different Geometries.
MultiPoint is a collection of Points.
A Curve is a MultiPoint, whose points are assumed to be connected.
A Linear Ring is a special LineString which is closed.
Create a new MultiPolygon geometry
Create a new parser for GML.
A MultiLineString is a geometry with multiple OpenLayers.Geometry.LineString components.
MultiPolygon is a geometry with multiple OpenLayers.Geometry.Polygon components.
Parses GML version 2.
Parses GML version 3.
Superclass for GML parsers.
Superclass for Filter version 1 parsers.
Create a new parser for OWSCommon.
Common readers and writers for OWSCommon v1.X formats
A class for parsing and generating WFS v1.1.0 transactions.
Write ogc:Filter version 1.1.0.
Superclass for WFST parsers.
Contains convenience functions for string manipulation.
Create a new grid layer
{String} If the tileOrigin property is not provided, the tile origin will be derived from the layer’s maxExtent.
Base class for layers that use a lattice of tiles.
The XYZ class is designed to make it easier for people who have tiles arranged by a standard XYZ grid.
Utility functions for event handling.
{Boolean} Indicates the support of touch events.
Create a new parser for JSON.
A class for parsing and generating WFS v1.0.0 transactions.
Write ogc:Filter version 1.0.0.
This class takes care of figuring out which order elements should be placed in the DOM based on given indexing methods.
Read WFS Capabilities.
Instances of OpenLayers.Layer.WMS are used to display data from OGC Web Mapping Services.
Used to create a versioned WFS protocol.
{String} WFS version number.
Create a new point handler.
Handler to draw a point on the map.
Returns OpenLayers.Handler.Drag
Create a new click handler.
Create a new navigation control
Create a new WMS layer object
Create a new vector layer
This is another virtual class in that it should never be instantiated by itself as a Renderer.
Create a new parser for WKT
{Float} Optional factor used to determine when previously requested features are invalid.
Create a new Mapguide layer, either tiled or untiled.
Creates a Rule.
Returns OpenLayers.Handler.Pinch
{Number} Auto-refresh.
A class for giving layers generic HTTP protocol.
Create a new overview map
Create a new navigation control
The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel).
Abstract class not to be instantiated directly.
Create a new MapServer layer object
Create a new VML renderer.
A class for giving layers WFS v1.0.0 protocol.
Abstract class for for v1.0.0 and v1.1.0 protocol.
Create a new regular polygon handler.
{Number} The number of pixels the mouse can move between mousedown and mouseup for the event to still be considered a click.
Create a new control to drag features.
Handler to draw a path on the map.
The OpenLayers.Request namespace contains convenience methods for working with XMLHttpRequests.
{Object}
Creates a new WMS layer object.
Instances of OpenLayers.Layer.MapServer are used to display data from a MapServer CGI instance.
Bing layer using direct tile access as provided by Bing Maps REST Services.
Creates a new instance of a OpenLayers.Layer.VirtualEarth.
Abstract SQL protocol class.
A class for giving layers WFS v1.1.0 protocol.
Close