A strategy that commits newly created or modified features. By default the strategy waits for a call to save before persisting changes. By configuring the strategy with the auto option, changes can be saved automatically.
OpenLayers. | A strategy that commits newly created or modified features. |
Properties | |
auto | {Boolean | Number} Auto-save. |
timer | {Number} The id of the timer. |
Constructor | |
OpenLayers. | Create a new Save strategy. |
Functions | |
activate | Activate the strategy. |
deactivate | Deactivate the strategy. |
triggerSave | Registered as a listener. |
save | Tell the layer protocol to commit unsaved features. |
onCommit | Called after protocol commit. |
save: function( features )
Tell the layer protocol to commit unsaved features. If the layer projection differs from the map projection, features will be transformed into the layer projection before being committed.
features | {Array} Features to be saved. If null, then default is all features in the layer. Features are assumed to be in the map projection. |
onCommit: function( response )
Called after protocol commit.
response | {OpenLayers.Protocol.Response} A response object. |
Activate the strategy.
activate: function()
Deactivate the strategy.
deactivate: function()
Registered as a listener.
triggerSave: function( event )
Tell the layer protocol to commit unsaved features.
save: function( features )
Called after protocol commit.
onCommit: function( response )