only jolt layer if we are setting it to visible (and if it has its 'map' property set.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@462 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -58,7 +58,9 @@ OpenLayers.Layer.prototype = {
|
||||
*/
|
||||
setVisibility: function(visible) {
|
||||
this.div.style.display = (visible) ? "block" : "none";
|
||||
this.moveTo(this.map.getExtent());
|
||||
if ((visible) && (this.map != null)) {
|
||||
this.moveTo(this.map.getExtent());
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
|
||||
Reference in New Issue
Block a user