Accès à la stratégie Save à partir de l’objet instancié :
for (var index in this.map.getLayersByName( 'layerName' )[0].strategies ) { // get all strategies from the selected layer var obj = this.map.getLayersByName( 'layerName' )[0].strategies[index]; if ( obj instanceof OpenLayers.Strategy.Save ) { // we want the Save strategy obj.save( [oFeature] ); // an array of features to save } }
Accès à la feature en instance de modification :
// get feature which is currently in modification var modify = this.map.getControlsBy( 'id', /^button_modify/ )[0]; // first, we have fixed an element ID as "button_modify_XXX" for the modification control var oFeature = modify.feature;