update WFS to new clone()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@957 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+21
-15
@@ -83,22 +83,28 @@ OpenLayers.Layer.WFS.prototype =
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} name
|
* @param {Object} obj
|
||||||
* @param {hash} params
|
*
|
||||||
*
|
* @returns An exact clone of this OpenLayers.Layer.WMS
|
||||||
* @returns A clone of this OpenLayers.Layer.WMS, with the passed-in
|
* @type OpenLayers.Layer.WMS
|
||||||
* parameters merged in.
|
*/
|
||||||
* @type OpenLayers.Layer.WMS
|
clone: function (obj) {
|
||||||
*/
|
|
||||||
clone: function (name, params) {
|
if (obj == null) {
|
||||||
var mergedParams = {}
|
obj = new OpenLayers.Layer.WFS(this.name,
|
||||||
Object.extend(mergedParams, this.params);
|
this.url,
|
||||||
Object.extend(mergedParams, params);
|
this.params,
|
||||||
var obj = new OpenLayers.Layer.WFS(name, this.url, mergedParams);
|
this.options);
|
||||||
if (this.tileSize)
|
}
|
||||||
obj.setTileSize(this.tileSize);
|
|
||||||
|
//get all additions from superclasses
|
||||||
|
obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
|
||||||
|
|
||||||
|
// copy/set any non-init, non-simple values here
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addTile creates a tile, initializes it (via 'draw' in this case), and
|
* addTile creates a tile, initializes it (via 'draw' in this case), and
|
||||||
|
|||||||
Reference in New Issue
Block a user