code: function(visible) {
          var cache = OpenLayers.Layer.Google.cache[this.map.id];
          if (cache) {
              var container = this.mapObject.getContainer();
              if (visible === true) {
                  this.mapObject.setMapType(this.type);
                  container.style.display = "";
                  this.termsOfUse.style.left = "";
                  this.termsOfUse.style.display = "";
                  this.poweredBy.style.display = "";            
                  cache.displayed = this.id;
              } else {
                  if (cache.displayed === this.id) {
                      delete cache.displayed;
                  }
                  if (!cache.displayed) {
                      container.style.display = "none";
                      this.termsOfUse.style.display = "none";
                      // move ToU far to the left in addition to setting display
                      // to "none", because at the end of the GMap2 load
                      // sequence, display: none will be unset and ToU would be
                      // visible after loading a map with a google layer that is
                      // initially hidden. 
                      this.termsOfUse.style.left = "-9999px";
                      this.poweredBy.style.display = "none";
                  }
              }
          }
      }
docs: Method: setGMapVisibility
  Display the GMap container and associated elements.
  
  Parameters:
  visible - {Boolean} Display the GMap elements.