Even though we're deprecating them, we can't go back. WMS.Untiled and MapServer.Untiled both need to be able to clone correctly. Patch with tests. (See #1013)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4761 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-10-03 01:39:08 +00:00
parent d000ca7b6b
commit 5957d25583
4 changed files with 70 additions and 0 deletions

View File

@@ -40,5 +40,29 @@ OpenLayers.Layer.WMS.Untiled = OpenLayers.Class(OpenLayers.Layer.WMS, {
OpenLayers.Console.warn(msg);
},
/**
* Method: clone
* Create a clone of this layer
*
* Returns:
* {<OpenLayers.Layer.WMS.Untiled>} An exact clone of this layer
*/
clone: function (obj) {
if (obj == null) {
obj = new OpenLayers.Layer.WMS.Untiled(this.name,
this.url,
this.params,
this.options);
}
//get all additions from superclasses
obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]);
// copy/set any non-init, non-simple values here
return obj;
},
CLASS_NAME: "OpenLayers.Layer.WMS.Untiled"
});