Improved clone method for Layer.XYZ; gave Layer.OSM its own clone method. Thanks aratcliffe for bringing this up. r=tschaub (closes #2738)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10507 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -173,6 +173,19 @@
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_clone(t) {
|
||||
t.plan(2);
|
||||
|
||||
var clone;
|
||||
|
||||
layer = new OpenLayers.Layer.XYZ(name, url, options);
|
||||
clone = layer.clone();
|
||||
t.ok(clone instanceof OpenLayers.Layer.XYZ, "clone is a Layer.XYZ instance");
|
||||
|
||||
layer = new OpenLayers.Layer.OSM();
|
||||
clone = layer.clone();
|
||||
t.ok(clone instanceof OpenLayers.Layer.OSM, "clone is a Layer.OSM instance");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user