code: function(map) {
          if (this.map == null) {
          
              this.map = map;
              
              // grab some essential layer data from the map if it hasn't already
              //  been set
              this.maxExtent = this.maxExtent || this.map.maxExtent;
              this.minExtent = this.minExtent || this.map.minExtent;
  
              this.projection = this.projection || this.map.projection;
              if (typeof this.projection == "string") {
                  this.projection = new OpenLayers.Projection(this.projection);
              }
  
              // Check the projection to see if we can get units -- if not, refer
              // to properties.
              this.units = this.projection.getUnits() ||
                           this.units || this.map.units;
              
              this.initResolutions();
              
              if (!this.isBaseLayer) {
                  this.inRange = this.calculateInRange();
                  var show = ((this.visibility) && (this.inRange));
                  this.div.style.display = show ? "" : "none";
              }
              
              // deal with gutters
              this.setTileSize();
          }
      }
docs: Method: setMap
  Set the map property for the layer. This is done through an accessor
  so that subclasses can override this and take special action once
  they have their map variable set.
  
  Here we take care to bring over any of the necessary default
  properties from the map.
  
  Parameters:
  map - {<OpenLayers.Map>}