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