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:
@@ -134,14 +134,12 @@ OpenLayers.Layer.WFS.prototype =
|
|||||||
var urls = new Array();
|
var urls = new Array();
|
||||||
|
|
||||||
//add standard URL
|
//add standard URL
|
||||||
urls.push( this.getFullRequestString( { BBOX:bounds.toBBOX() }) );
|
urls.push( this.getFullRequestString() );
|
||||||
|
|
||||||
if (this.urls != null) {
|
if (this.urls != null) {
|
||||||
// if there are more urls, add them.
|
// if there are more urls, add them.
|
||||||
for(var i=0; i < this.urls.length; i++) {
|
for(var i=0; i < this.urls.length; i++) {
|
||||||
var newUrl = this.getFullRequestString( { BBOX:bounds.toBBOX() },
|
urls.push( this.getFullRequestString(null, this.urls[i]) );
|
||||||
this.urls[i] );
|
|
||||||
urls.push(newUrl);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,11 +39,18 @@ OpenLayers.Tile.WFS.prototype =
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
destroy: function() {
|
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++) {
|
for(var i=0; i < this.features.length; i++) {
|
||||||
this.features[i].destroy();
|
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
|
* @param {OpenLayers.pixel} position
|
||||||
*/
|
*/
|
||||||
moveTo: function (bounds, position) {
|
moveTo: function (bounds, position) {
|
||||||
|
|
||||||
|
this.loaded = false;
|
||||||
|
|
||||||
OpenLayers.Tile.prototype.moveTo.apply(this, arguments);
|
OpenLayers.Tile.prototype.moveTo.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -80,7 +90,10 @@ OpenLayers.Tile.WFS.prototype =
|
|||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
|
|
||||||
for(var i=0; i < this.urls.length; i++) {
|
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);
|
success, failure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user