updates to allow a wfs layer to query multiple wfs servers with the same parameters. untested, but all tests pass.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@941 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-13 12:33:22 +00:00
parent 1e5e8d1490
commit bd9ee403f2
4 changed files with 38 additions and 13 deletions
+11 -5
View File
@@ -19,12 +19,14 @@ OpenLayers.Tile.WFS.prototype =
* @param {OpenLayers.Layer} layer
* @param {OpenLayers.Pixel} position
* @param {OpenLayers.Bounds} bounds
* @param {String} url
* @param {Array} urls
* @param {OpenLayers.Size} size
*/
initialize: function(layer, position, bounds, url, size) {
initialize: function(layer, position, bounds, urls, size) {
var newArguments = [layer, position, bounds, null, size];
OpenLayers.Tile.prototype.initialize.apply(this, arguments);
this.urls = urls;
this.features = new Array();
},
@@ -57,13 +59,17 @@ OpenLayers.Tile.WFS.prototype =
if (!this.loaded) {
if (this.url != "") {
if (this.urls != null) {
// TODO: Hmmm, this stops multiple loads of the data when a
// result isn't immediately retrieved, but it's hacky.
// Do it better.
this.loaded = true;
OpenLayers.loadURL(this.url, null, this, success, failure);
for(var i=0; i < this.urls.length; i++) {
OpenLayers.loadURL(this.urls[i], null, this,
success, failure);
}
}
}
},