code: function(setNewBaseLayer) {
          if (setNewBaseLayer == null) {
              setNewBaseLayer = true;
          }
          if (this.map != null) {
              this.map.removeLayer(this, setNewBaseLayer);
          }
          this.projection = null;
          this.map = null;
          this.name = null;
          this.div = null;
          this.options = null;
  
          if (this.events) {
              if(this.eventListeners) {
                  this.events.un(this.eventListeners);
              }
              this.events.destroy();
          }
          this.eventListeners = null;
          this.events = null;
      }
docs: Method: destroy
  Destroy is a destructor: this is to alleviate cyclic references which
  the Javascript garbage cleaner can not take care of on its own.
  
  Parameters:
  setNewBaseLayer - {Boolean} Set a new base layer when this layer has
  been destroyed.  Default is true.