OpenLayers OpenLayers

Changeset 7140

Show
Ignore:
Timestamp:
05/12/08 14:45:17 (8 months ago)
Author:
sbenthall
Message:

- 'delete' on WFS protocol now creates the filter node through a Format.
- refactored some of the namespace stuff on the envelope

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/vector-behavior/lib/OpenLayers/Protocol/WFS/v1_0_0.js

    r7139 r7140  
    224224            } 
    225225        } 
    226          
    227         envelope.setAttribute("xmlns:" + this.format.featurePrefix, this.format.featureNS); 
    228226        
    229227        if(this.outputFormats[this.format.CLASS_NAME] && !params.outputFormat){ 
     
    232230        } 
    233231         
    234         envelope.setAttribute("xmlns:" + this.format.featurePrefix, this.format.featureNS); 
    235          
    236         envelope.setAttribute("xmlns:ogc","http://www.opengis.net/ogc"); 
     232        envelope.setAttribute("xmlns:" + this.format.featurePrefix, this.format.featureNS);         
     233        envelope.setAttribute("xmlns:ogc", this.namespaces.ogc); 
    237234         
    238235        return envelope; 
     
    400397            attributes: {typeName: this.params.typename} 
    401398        }); 
    402         var filter = this.format.createElementNSPlus("ogc:Filter"); 
    403         var fid = this.format.createElementNSPlus("ogc:FeatureId", { 
    404             attributes: {fid: feature.fid} 
    405         }); 
    406         filter.appendChild(fid); 
    407         node.appendChild(filter); 
     399         
     400        var fidFilter = new OpenLayers.Filter.FeatureId({ 
     401            fids: [feature.fid] 
     402        }); 
     403             
     404        var filterNode = this.filterFormat.write(fidFilter); 
     405            
     406        node.appendChild(filterNode); 
    408407        return node; 
    409408    },