OpenLayers. Layer.WFS

Inherits from

Summary
{Boolean} WFS layer is not a base layer by default.
{Float} the ratio of image/tile size to map size (this is the untiled buffer)
{Object} Hashtable of default key/value parameters
{OpenLayers.Feature} If featureClass is defined, an old-style markers based WFS layer is created instead of a new-style vector layer.
{Boolean} Should be calculated automatically.
{Boolean} Should the BBOX commas be encoded? 
{Boolean} Should the WFS layer parse attributes from the retrieved GML? 
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).
This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()
Call the onMapResize method of the appropriate parent class.
Modify parameters for the layer and redraw.
combine the layer’s url with its params and these newParams.
Write out the data to a WFS server.
Called when the Ajax request returns a response
Called when the Ajax request fails
Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.
Refreshes all the features of the layer

Properties

isBaseLayer

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

ratio

{Float} the ratio of image/tile size to map size (this is the untiled buffer)

DEFAULT_PARAMS

{Object} Hashtable of default key/value parameters

featureClass

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

vectorMode

{Boolean} Should be calculated automatically.

encodeBBOX

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

extractAttributes

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

Constructor

OpenLayers. Layer.WFS

Parameters

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

Functions

destroy

destroy: function()

setMap

setMap: function(map)

Parameters

map{OpenLayers.Map}

moveTo

moveTo:function(bounds,
zoomChanged,
dragging)

Parameters

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

addTileMonitoringHooks

addTileMonitoringHooks: function(tile)

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

Parameters

tile{OpenLayers.Tile}

removeTileMonitoringHooks

removeTileMonitoringHooks: function(tile)

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

Parameters

tile{OpenLayers.Tile}

onMapResize

onMapResize: function()

Call the onMapResize method of the appropriate parent class.

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)

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}

commit

commit: function()

Write out the data to a WFS server.

commitSuccess

commitSuccess: function(request)

Called when the Ajax request returns a response

Parameters

response{XmlNode} from server

commitFailure

commitFailure: function(request)

Called when the Ajax request fails

Parameters

response{XmlNode} from server

commitReport

commitReport: function(string,
response)

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

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

refresh

refresh: function()

Refreshes all the features of the layer

Instances of OpenLayers.Tile.WFS are used to manage the image tiles used by various layers.
Features are combinations of geography and attributes.
destroy: function()
setMap: function(map)
moveTo:function(bounds,
zoomChanged,
dragging)
addTileMonitoringHooks: function(tile)
This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tile (making sure to check that the tile is always the layer’s current tile before taking any action).
removeTileMonitoringHooks: function(tile)
This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks()
onMapResize: function()
Call the onMapResize method of the appropriate parent class.
mergeNewParams:function(newParams)
Modify parameters for the layer and redraw.
clone: function (obj)
getFullRequestString:function(newParams)
combine the layer’s url with its params and these newParams.
commit: function()
Write out the data to a WFS server.
commitSuccess: function(request)
Called when the Ajax request returns a response
commitFailure: function(request)
Called when the Ajax request fails
commitReport: function(string,
response)
Called with a ‘success’ message if the commit succeeded, otherwise a failure message, and the full request text as a second parameter.
refresh: function()
Refreshes all the features of the layer
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Instances of this class represent bounding boxes.
This is a class designed to designate a single tile, however it is explicitly designed to do relatively little.