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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user