updates so WFS *should* work with new tiling algorithm

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1154 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-09 06:24:28 +00:00
parent bc6b2e690d
commit 5d64ebdf94
2 changed files with 20 additions and 9 deletions

View File

@@ -134,14 +134,12 @@ OpenLayers.Layer.WFS.prototype =
var urls = new Array();
//add standard URL
urls.push( this.getFullRequestString( { BBOX:bounds.toBBOX() }) );
urls.push( this.getFullRequestString() );
if (this.urls != null) {
// if there are more urls, add them.
for(var i=0; i < this.urls.length; i++) {
var newUrl = this.getFullRequestString( { BBOX:bounds.toBBOX() },
this.urls[i] );
urls.push(newUrl);
urls.push( this.getFullRequestString(null, this.urls[i]) );
}
}

View File

@@ -39,11 +39,18 @@ OpenLayers.Tile.WFS.prototype =
*
*/
destroy: function() {
this.clear();
this.urls = null;
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
},
/** Clear the tile of any bounds/position-related data so that it can
* be reused in a new location.
*/
clear: function() {
for(var i=0; i < this.features.length; i++) {
this.features[i].destroy();
}
this.urls = null;
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
},
/**
@@ -57,6 +64,9 @@ OpenLayers.Tile.WFS.prototype =
* @param {OpenLayers.pixel} position
*/
moveTo: function (bounds, position) {
this.loaded = false;
OpenLayers.Tile.prototype.moveTo.apply(this, arguments);
},
@@ -80,7 +90,10 @@ OpenLayers.Tile.WFS.prototype =
this.loaded = true;
for(var i=0; i < this.urls.length; i++) {
OpenLayers.loadURL(this.urls[i], null, this,
var params ={ BBOX:bounds.toBBOX() };
var url = this.urls[i] +
OpenLayers.Util.getParameterString(params);
OpenLayers.loadURL(url, null, this,
success, failure);
}
}