hide Terms Of Use for invisible Google Layers using a negative offset,
because during GMap2 initialization, we don't have control over style.display. r=fredj (closes #2328) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10069 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -209,6 +209,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
function test_Layer_Google_setGMapVisibility(t) {
|
||||
if(validkey) {
|
||||
t.plan(3);
|
||||
var map = new OpenLayers.Map('map');
|
||||
var gmap = new OpenLayers.Layer.Google("Google Streets");
|
||||
var dummy = new OpenLayers.Layer("Dummy", {isBaseLayer: true});
|
||||
map.addLayers([dummy, gmap]);
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
t.delay_call(2, function() {
|
||||
t.eq(map.baseLayer.name, "Dummy", "Dummy layer is the base layer");
|
||||
t.ok(gmap.termsOfUse.style.display == "none" || gmap.termsOfUse.style.left == "-9999px", "termsOfUse is not visible");
|
||||
t.eq(gmap.poweredBy.style.display, "none", "poweredBy is not visible");
|
||||
});
|
||||
} else {
|
||||
t.plan(0);
|
||||
t.debug_print("Google tests can't be run from " +
|
||||
window.location.host);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user