code: function() {
          var inRange = false;
  
          if (this.alwaysInRange) {
              inRange = true;
          } else {
              if (this.map) {
                  var resolution = this.map.getResolution();
                  inRange = ( (resolution >= this.minResolution) &&
                              (resolution <= this.maxResolution) );
              }
          }
          return inRange;
      }
docs: APIMethod: calculateInRange
  
  Returns:
  {Boolean} The layer is displayable at the current map's current
  resolution. Note that if 'alwaysInRange' is true for the layer,
  this function will always return true.