code: function() {
          /**
           * We have to override this method because the event pane destroy
           * deletes the mapObject reference before removing this layer from
           * the map.
           */
          if (this.map) {
              this.setGMapVisibility(false);
              var cache = OpenLayers.Layer.Google.cache[this.map.id];
              if (cache && cache.count <= 1) {
                  this.removeGMapElements();
              }            
          }
          OpenLayers.Layer.EventPane.prototype.destroy.apply(this, arguments);
      }
docs: APIMethod: destroy
  Clean up this layer.