Adding clone method to the Google layer. r=ahocevar (closes #2473)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10081 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2010-02-20 20:14:53 +00:00
parent 2eb866658a
commit 09a858559b
2 changed files with 48 additions and 4 deletions
+23
View File
@@ -39,6 +39,29 @@
window.location.host);
}
}
function test_clone(t) {
if (validkey) {
t.plan(2);
var layer, clone;
// test default layer
layer = new OpenLayers.Layer.Google();
clone = layer.clone();
t.ok(clone instanceof OpenLayers.Layer.Google, "[default] good instance");
layer.destroy();
clone.destroy();
// test with alt type
layer = new OpenLayers.Layer.Google(null, {type: G_SATELLITE_MAP});
clone = layer.clone();
t.ok(clone.type === G_SATELLITE_MAP, "[sat] correct type");
layer.destroy();
clone.destroy();
}
}
function test_Layer_Google_isBaseLayer (t) {
if(validkey) {