Abstract vector layer protocol class. Not to be instantiated directly. Use one of the protocol subclasses instead.
OpenLayers.
|
Abstract vector layer protocol class. |
Constructor | |
OpenLayers.
|
Abstract class for vector protocols. |
Functions | |
destroy | Clean up the protocol. |
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. |
OpenLayers.
|
Protocols return Response objects to their users. |
Constructor | |
OpenLayers.
|
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()
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()
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()
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()
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.
Clean up the protocol.
destroy: function()
Construct a request for reading new features.
read: function( options )
Construct a request for writing newly created features.
create: function()
Construct a request updating modified features.
update: function()
Construct a request deleting a removed feature.
"delete": function()
Go over the features and for each take action based on the feature state.
commit: function()