OpenLayers.Protocol.WFS.v1

Abstract class for for v1.0.0 and v1.1.0 protocol.

Inherits from

Summary
OpenLayers.Protocol.WFS.v1Abstract 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.
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.
Constructor
OpenLayers.Protocol.WFSA class for giving layers WFS protocol.
Functions
destroyClean up the protocol.
createCallbackReturns a function that applies the given public method with resp and options arguments.
readConstruct a request for reading new features.
handleReadDeal with response from the read request.
parseFeaturesRead HTTP response body and return features
commitGiven a list of feature, assemble a batch request for update, create, and delete transactions.
handleCommitCalled when the commit request returns.
filterDeleteSend a request that deletes all features by their filter.
abortAbort 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”.

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.

Constructor

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 for reading if featurePrefix is provided and identical to the prefix in the server response).
featurePrefix{String} Feature namespace alias (optional - only used for writing if featureNS is provided).  Default is ‘feature’.
geometryName{String} Name of geometry attribute.  Default is ‘the_geom’.

Functions

destroy

destroy: function()

Clean up the protocol.

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 (read, create, update, or delete).

read

read: function(options)

Construct a request for reading new features.  Since WFS splits the basic CRUD operations into GetFeature requests (for read) and Transactions (for all others), this method does not make use of the format’s read method (that is only about reading transaction responses).

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.

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.

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}

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}
destroy: function()
Clean up the protocol.
createCallback: function(method,
response,
options)
Returns a function that applies the given public method with resp and options arguments.
read: function(options)
Construct a request for reading new features.
handleRead: function(response,
options)
Deal with response from the read request.
parseFeatures: function(request)
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).
Abstract vector layer protocol class.
Protocols return Response objects to their users.
Vector features use the OpenLayers.Geometry classes as geometry description.
Close