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 | |
| events | {OpenLayers.Events} An events object that handles all events on the strategy object. |
| auto | {Boolean | Number} Auto-save. |
| Constructor | |
| OpenLayers. | Create a new Save strategy. |
| Functions | |
| activate | Activate the strategy. |
| deactivate | Deactivate the strategy. |
| save | Tell the layer protocol to commit unsaved features. |
{OpenLayers.Events} An events object that handles all events on the strategy object.
strategy.events.register(type, obj, listener);
| start | Triggered before saving |
| success | Triggered after a successful transaction |
| fail | Triggered after a failed transaction |
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. |
Activate the strategy.
activate: function()
Deactivate the strategy.
deactivate: function()
Tell the layer protocol to commit unsaved features.
save: function( features )