JSAN
git-svn-id: http://svn.openlayers.org/trunk/openlayers@38 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
OpenLayers.Layer = Class.create();
|
||||
|
||||
OpenLayers.Layer.prototype = {
|
||||
// str: name
|
||||
|
||||
// str
|
||||
name: null,
|
||||
|
||||
// DOMElement: div
|
||||
// DOMElement
|
||||
div: null,
|
||||
|
||||
// OpenLayers.Map
|
||||
@@ -16,8 +17,8 @@ OpenLayers.Layer.prototype = {
|
||||
initialize: function(name) {
|
||||
this.name = name;
|
||||
this.div = OpenLayers.Util.createDiv();
|
||||
this.div.style.width="100%";
|
||||
this.div.style.height="100%";
|
||||
this.div.style.width = "100%";
|
||||
this.div.style.height = "100%";
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -37,10 +38,16 @@ OpenLayers.Layer.prototype = {
|
||||
return;
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {bool}
|
||||
*/
|
||||
getVisibility: function() {
|
||||
return (this.div.style.display != "none");
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {bool} visible
|
||||
*/
|
||||
setVisibility: function(visible) {
|
||||
this.div.style.display = (visible) ? "block" : "none";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user