docs: function() {
          // if unloadDestroy is null, we've already been destroyed
          if (!this.unloadDestroy) {
              return false;
          }
          
          // make sure panning doesn't continue after destruction
          if(this.panTween) {
              this.panTween.stop();
              this.panTween = null;
          }
          // make sure zooming doesn't continue after destruction
          if(this.zoomTween) {
              this.zoomTween.stop();
              this.zoomTween = null;
          }
  
          // map has been destroyed. dont do it again!
          OpenLayers.Event.stopObserving(window, 'unload', this.unloadDestroy);
          this.unloadDestroy = null;
  
          if (this.updateSizeDestroy) {
              OpenLayers.Event.stopObserving(window, 'resize', 
                                             this.updateSizeDestroy);
          }
          
          this.paddingForPopups = null;    
  
          if (this.controls != null) {
              for (var i = this.controls.length - 1; i>=0; --i) {
                  this.controls[i].destroy();
              } 
              this.controls = null;
          }
          if (this.layers != null) {
              for (var i = this.layers.length - 1; i>=0; --i) {
                  //pass 'false' to destroy so that map wont try to set a new 
                  // baselayer after each baselayer is removed
                  this.layers[i].destroy(false);
              } 
              this.layers = null;
          }
          if (this.viewPortDiv && this.viewPortDiv.parentNode) {
              this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
          }
          this.viewPortDiv = null;
          
          if (this.tileManager) {
              this.tileManager.removeMap(this);
              this.tileManager = null;
          }
  
          if(this.eventListeners) {
              this.events.un(this.eventListeners);
              this.eventListeners = null;
          }
          this.events.destroy();
          this.events = null;
  
          this.options = null;
      }