diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index b2ab86349f..6918a5e1a7 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -10,8 +10,6 @@ OpenLayers.Layer.prototype = { // OpenLayers.Map map: null, - status: null, - /** * @param {str} name */ @@ -20,7 +18,6 @@ OpenLayers.Layer.prototype = { this.div = OpenLayers.Util.createDiv(); this.div.style.width="100%"; this.div.style.height="100%"; - this.status = true; }, /** @@ -39,16 +36,13 @@ OpenLayers.Layer.prototype = { // not implemented here return; }, + getVisibility: function() { - return this.status; + return (this.div.style.display != "none"); }, - setVisibility: function(on) { - if (on) { - this.div.style.display="block"; - } else { - this.div.style.display="none"; - } - this.status = on; + + setVisibility: function(visible) { + this.div.style.display = (visible) ? "block" : "none"; } };