docs: function() {
  
          // ok we want resolutions, here's our strategy:
          //
          // 1. if resolutions are defined in the layer config, use them
          // 2. else, if scales are defined in the layer config then derive
          //    resolutions from these scales
          // 3. else, attempt to calculate resolutions from maxResolution,
          //    minResolution, numZoomLevels, maxZoomLevel set in the
          //    layer config
          // 4. if we still don't have resolutions, and if resolutions
          //    are defined in the same, use them
          // 5. else, if scales are defined in the map then derive
          //    resolutions from these scales
          // 6. else, attempt to calculate resolutions from maxResolution,
          //    minResolution, numZoomLevels, maxZoomLevel set in the
          //    map
          // 7. hope for the best!
  
          var i, len, p;
          var props = {}, alwaysInRange = true;
  
          // get resolution data from layer config
          // (we also set alwaysInRange in the layer as appropriate)
          for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {
              p = this.RESOLUTION_PROPERTIES[i];
              props[p] = this.options[p];
              if(alwaysInRange && this.options[p]) {
                  alwaysInRange = false;
              }
          }
          if(this.options.alwaysInRange == null) {
              this.alwaysInRange = alwaysInRange;
          }
  
          // if we don't have resolutions then attempt to derive them from scales
          if(props.resolutions == null) {
              props.resolutions = this.resolutionsFromScales(props.scales);
          }
  
          // if we still don't have resolutions then attempt to calculate them
          if(props.resolutions == null) {
              props.resolutions = this.calculateResolutions(props);
          }
  
          // if we couldn't calculate resolutions then we look at we have
          // in the map
          if(props.resolutions == null) {
              for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {
                  p = this.RESOLUTION_PROPERTIES[i];
                  props[p] = this.options[p] != null ?
                      this.options[p] : this.map[p];
              }
              if(props.resolutions == null) {
                  props.resolutions = this.resolutionsFromScales(props.scales);
              }
              if(props.resolutions == null) {
                  props.resolutions = this.calculateResolutions(props);
              }
          }
  
          // ok, we new need to set properties in the instance
  
          // get maxResolution from the config if it's defined there
          var maxResolution;
          if(this.options.maxResolution &&
             this.options.maxResolution !== "auto") {
              maxResolution = this.options.maxResolution;
          }
          if(this.options.minScale) {
              maxResolution = OpenLayers.Util.getResolutionFromScale(
                  this.options.minScale, this.units);
          }
  
          // get minResolution from the config if it's defined there
          var minResolution;
          if(this.options.minResolution &&
             this.options.minResolution !== "auto") {
              minResolution = this.options.minResolution;
          }
          if(this.options.maxScale) {
              minResolution = OpenLayers.Util.getResolutionFromScale(
                  this.options.maxScale, this.units);
          }
  
          if(props.resolutions) {
  
              //sort resolutions array descendingly
              props.resolutions.sort(function(a, b) {
                  return (b - a);
              });
  
              // if we still don't have a maxResolution get it from the
              // resolutions array
              if(!maxResolution) {
                  maxResolution = props.resolutions[0];
              }
  
              // if we still don't have a minResolution get it from the
              // resolutions array
              if(!minResolution) {
                  var lastIdx = props.resolutions.length - 1;
                  minResolution = props.resolutions[lastIdx];
              }
          }
  
          this.resolutions = props.resolutions;
          if(this.resolutions) {
              len = this.resolutions.length;
              this.scales = new Array(len);
              for(i=0; i<len; i++) {
                  this.scales[i] = OpenLayers.Util.getScaleFromResolution(
                      this.resolutions[i], this.units);
              }
              this.numZoomLevels = len;
          }
          this.minResolution = minResolution;
          if(minResolution) {
              this.maxScale = OpenLayers.Util.getScaleFromResolution(
                  minResolution, this.units);
          }
          this.maxResolution = maxResolution;
          if(maxResolution) {
              this.minScale = OpenLayers.Util.getScaleFromResolution(
                  maxResolution, this.units);
          }
      }