Changeset 7123
- Timestamp:
- 05/09/08 01:50:25 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/vector-behavior/lib/OpenLayers/Protocol/SQL/GoogleGears.js
r7082 r7123 196 196 /** 197 197 * Method: commit 198 * Go over the features in the layerand for each take action198 * Go over the features and for each take action 199 199 * based on the feature state. Possible actions are create, 200 200 * update and delete. 201 201 * 202 202 * Parameters: 203 * layer - {<OpenLayers.Layer.Vector>}203 * features - {Array({<OpenLayers.Feature.Vector>})} 204 204 * options - {Object} Map of options, the keys of the map are 205 205 * 'create', 'update', and 'delete' 206 206 */ 207 commit: function( layer, options) {207 commit: function(features, options) { 208 208 OpenLayers.Console.debug("GoogleGears::commit()"); 209 209 var toCreate = [], toUpdate = []; 210 210 211 for (var i = layer.features.length - 1; i >= 0; i--) {212 var feature = layer.features[i];211 for (var i = features.length - 1; i >= 0; i--) { 212 var feature = features[i]; 213 213 switch (feature.state) { 214 214 case OpenLayers.State.INSERT: … … 227 227 } 228 228 if (toUpdate.length > 0) { 229 this. create(toUpdate, options.update);229 this.update(toUpdate, options.update); 230 230 } 231 231 },
