Decorator class responsible to trigger events when requests are sent and received.
mapfish. | Decorator class responsible to trigger events when requests are sent and received. |
Properties | |
protocol | {OpenLayers.Protocol} The decorated protocol. |
Constants | |
EVENT_TYPES | {Array(String)} Supported event types. |
Constructor | |
mapfish. | |
Functions | |
read | Construct a request for reading new features. |
create | Construct a request for writing newly created features. |
update | Construct a request updating modified features. |
delete | Construct a request deleting a removed feature. |
commit | Go over the features and for each take action based on the feature state. |
clear | Clear all the previous results. |
{OpenLayers.Protocol} The decorated protocol.
{Array(String)} Supported event types. Register a listener for a particular event with the following syntax:
protocol.events.register(type, obj, listener);
Listeners will be called with a reference to an event object.
read: function( options )
Construct a request for reading new features.
options | {Object} Optional object for configuring the request. |
{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: function( features, options )
Construct a request for writing newly created features.
features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} |
options | {Object} Optional object for configuring the request. |
{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: function( features, options )
Construct a request updating modified features.
features | {Array({OpenLayers.Feature.Vector})} or {OpenLayers.Feature.Vector} |
options | {Object} Optional object for configuring the request. |
{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": function( feature, options )
Construct a request deleting a removed feature.
feature | {OpenLayers.Feature.Vector} |
options | {Object} Optional object for configuring the request. |
{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: function( features, options )
Go over the features and for each take action based on the feature state. Possible actions are create, update and delete.
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. |
{Array({OpenLayers.Protocol.Response})} An array of OpenLayers.Protocol.Response objects.
Construct a request for reading new features.
read: function( options )
Construct a request for writing newly created features.
create: function( features, options )
Construct a request updating modified features.
update: function( features, options )
Construct a request deleting a removed feature.
"delete": function( feature, options )
Go over the features and for each take action based on the feature state.
commit: function( features, options )
Clear all the previous results.
clear: function()