/**
* @class
*/
OpenLayers.Tile.WFS = Class.create();
OpenLayers.Tile.WFS.prototype = 
  Object.extend( new OpenLayers.Tile(), {

    /** 
    * @constructor
    *
    * @param {OpenLayers.Bounds} bounds
    * @param {String} url
    * @param {OpenLayers.Size} size
    */
    initialize: function(bounds, url, size) {
        OpenLayers.Tile.prototype.initialize.apply(this, arguments);
    },

    /**
    */
    draw:function() {
        OpenLayers.Tile.prototype.draw.apply(this, arguments);
    },

    /**
     * @param OpenLayers.Pixel
     */
    setPosition:function(pixel) {
        this.position = pixel;
    },
    
    /** @final @type String */
    CLASS_NAME: "OpenLayers.Tile.WFS"
  }
);

@@ -123,16 +123,125 @@
 e(), %7B%0A%0A
+    /** @type Array of Function */%0A    handlers: null,%0A    %0A    /** @type Array of */ %0A    features: null,%0A%0A%0A
     /** 
@@ -482,32 +482,180 @@
 is, arguments);%0A
+        %0A        this.features = new Array();%0A%0A        this.handlers = new Array();%0A        this.handlers%5B%22requestSuccess%22%5D = this._requestSuccess;%0A
     %7D,%0A%0A    /**%0A
@@ -742,24 +742,86 @@
 arguments);%0A
+        this.loadFeaturesForRegion(%22requestSuccess%22);        %0A
     %7D,%0A%0A    
@@ -936,24 +936,2172 @@
     %7D,%0A    %0A
+    /** get the full request string from the ds and the tile params %0A    *     and call the AJAX loadURL(). %0A    *%0A    *     input are function pointers for what to do on success and failure.%0A    * %0A    * @param %7Bfunction%7D success%0A    * @param %7Bfunction%7D failure%0A    */%0A    loadFeaturesForRegion:function(success, failure) %7B%0A%0A        if (!this.loaded) %7B%0A        %0A            var server = this.ds.serverPath;%0A            %0A            if (server != %22%22) %7B%0A        %0A                var queryString = this.getFullRequestString();%0A                // TODO: Hmmm, this stops multiple loads of the data when a %0A                //       result isn't immediately retrieved, but it's hacky. %0A                //       Do it better.%0A                this.loaded = true; %0A                ol.Log.info(%22request string: %22 + queryString);%0A                ol.Application.loadURL(queryString, null, this, %0A                                       success, failure);%0A            %7D%0A        %7D%0A    %7D,%0A    %0A    /** Return from AJAX request%0A    *%0A    * @param %7B%7D request%0A    */%0A    requestSuccess:function(request) %7B%0A    %0A        var doc = request.responseXML;%0A        %0A        if (!doc %7C%7C request.fileType!=%22XML%22) %7B%0A            doc = ol.Application.parseXMLString(request.responseText);%0A        %7D%0A        %0A        var resultFeatures = ol.Application.getNodes(doc, %22gml:featureMember%22);%0A        ol.Log.info(this.CLASS_NAME + %22 found %22 +%0A                     resultFeatures.length + %22 features%22);%0A            %0A        //clear old featureList%0A        this.features = new Array();%0A%0A        for (var i=0; i %3C resultFeatures.length; i++) %7B%0A        %0A            //create new Feature and add it %0A            var newFeature = new ol.Feature(resultFeatures%5Bi%5D);%0A%0A            //add new marker%0A            var newMarker = this._createMarker(newFeature);%0A            this._addMarker(newMarker);%0A%0A            //save reference to the feature and marker%0A            this.featureList%5Bi%5D = new ol.Tile.WFS.FeatureItem(%0A                                        newFeature, newMarker);%0A    %09%7D%0A        %0A        if (this.ds.markers != null) %7B%0A            this.ds.markers.redraw();%0A        %7D%0A    %7D,%0A%0A%0A
     /** @fin

add ajax code to WFS