OpenLayers.Protocol

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

Summary
OpenLayers.ProtocolAbstract vector layer protocol class.
Constructor
OpenLayers.ProtocolAbstract class for vector protocols.
Functions
destroyClean up the protocol.
readConstruct a request for reading new features.
createConstruct a request for writing newly created features.
updateConstruct a request updating modified features.
deleteConstruct a request deleting a removed feature.
commitGo over the features and for each take action based on the feature state.
OpenLayers.Protocol.ResponseProtocols return Response objects to their users.
Constructor
OpenLayers.Protocol.Response

Constructor

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.

Functions

destroy

destroy: function()

Clean up the protocol.

read

read: function()

Construct a request for reading new features.

Parameters

options{Object} Optional object for configuring the request.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, the same object will be passed to the callback function passed if one exists in the options object.

create

create: function()

Construct a request for writing newly created features.

Parameters

features{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector}
options{Object} Optional object for configuring the request.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, the same object will be passed to the callback function passed if one exists in the options object.

update

update: function()

Construct a request updating modified features.

Parameters

features{Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector}
options{Object} Optional object for configuring the request.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, the same object will be passed to the callback function passed if one exists in the options object.

delete

"delete": function()

Construct a request deleting a removed feature.

Parameters

feature{OpenLayers.Feature.Vector}
options{Object} Optional object for configuring the request.

Returns

{OpenLayers.Protocol.Response} An OpenLayers.Protocol.Response object, the same object will be passed to the callback function passed if one exists in the options object.

commit

commit: function()

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

Parameters

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

Returns

{Array({OpenLayers.Protocol.Response})} An array of OpenLayers.Protocol.Response objects.

OpenLayers.Protocol.Response

Protocols return Response objects to their users.

Constructor

OpenLayers.Protocol.Response

Parameters

options{Object} Optional object whose properties will be set on the instance.
destroy: function()
Clean up the protocol.
read: function()
Construct a request for reading new features.
create: function()
Construct a request for writing newly created features.
update: function()
Construct a request updating modified features.
"delete": function()
Construct a request deleting a removed feature.
commit: function()
Go over the features and for each take action based on the feature state.
Protocols return Response objects to their users.
Vector features use the OpenLayers.Geometry classes as geometry description.
Close