OpenLayers.Layer.WFS

Inherits from

Summary
OpenLayers.Layer.WFS
Properties
isBaseLayer{Boolean} WFS layer is not a base layer by default.
ratio{Float} The ratio property determines the size of the serverside query relative to the map viewport size.
featureClass{OpenLayers.Feature} If featureClass is defined, an old-style markers based WFS layer is created instead of a new-style vector layer.
format{OpenLayers.Format} The format you want the data to be parsed with.
formatOptions{Object} Hash of options which should be passed to the format when it is created.
encodeBBOX{Boolean} Should the BBOX commas be encoded? 
extractAttributes{Boolean} Should the WFS layer parse attributes from the retrieved GML? 
Constructor
OpenLayers.Layer.WFS
Functions
destroy
mergeNewParamsModify parameters for the layer and redraw.
clone
getFullRequestStringcombine the layer’s url with its params and these newParams.
commitWrite out the data to a WFS server.
commitReportCalled with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.
refreshRefreshes all the features of the layer
getDataExtentCalculates the max extent which includes all of the layer data.
setOpacityCall the setOpacity method of the appropriate parent class to set the opacity.

Properties

isBaseLayer

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

ratio

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

featureClass

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

format

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

formatOptions

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

encodeBBOX

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

extractAttributes

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

Constructor

OpenLayers.Layer.WFS

Parameters

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

Functions

destroy

destroy: function()

mergeNewParams

mergeNewParams:function(newParams)

Modify parameters for the layer and redraw.

Parameters

newParams{Object}

clone

clone: function (obj)

Parameters

obj{Object}

Returns

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

getFullRequestString

getFullRequestString:function(newParams,
altUrl)

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

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

Parameters

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

commit

commit: function()

Write out the data to a WFS server.

commitReport

commitReport: function(string,
response)

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

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

refresh

refresh: function()

Refreshes all the features of the layer

getDataExtent

getDataExtent: function ()

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

Returns

{OpenLayers.Bounds}

setOpacity

setOpacity: function (opacity)

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

Parameter

opacity{Float}
Features are combinations of geography and attributes.
Base class for format reading/writing a variety of formats.
destroy: function()
mergeNewParams:function(newParams)
Modify parameters for the layer and redraw.
clone: function (obj)
getFullRequestString:function(newParams,
altUrl)
combine the layer’s url with its params and these newParams.
commit: function()
Write out the data to a WFS server.
commitReport: function(string,
response)
Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.
refresh: function()
Refreshes all the features of the layer
getDataExtent: function ()
Calculates the max extent which includes all of the layer data.
setOpacity: function (opacity)
Call the setOpacity method of the appropriate parent class to set the opacity.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Instances of this class represent bounding boxes.
Close