code: function(map) {
          // hide layer before removing
          if (this.visibility && this.mapObject) {
              this.setGMapVisibility(false);
          }
          // check to see if last Google layer in this map
          var cache = OpenLayers.Layer.Google.cache[map.id];
          if (cache) {
              if (cache.count <= 1) {
                  this.removeGMapElements();
                  delete OpenLayers.Layer.Google.cache[map.id];
              } else {
                  // decrement the layer count
                  --cache.count;
              }
          }
          // remove references to gmap elements
          delete this.termsOfUse;
          delete this.poweredBy;
          delete this.mapObject;
          delete this.dragObject;
          OpenLayers.Layer.EventPane.prototype.removeMap.apply(this, arguments);
      }
docs: APIMethod: removeMap
  On being removed from the map, also remove termsOfUse and poweredBy divs
  
  Parameters:
  map - {<OpenLayers.Map>}