code: function () {
          var resolution = null;
          if (this.baseLayer != null) {
              resolution = this.baseLayer.getResolution();
          } else if(this.allOverlays === true && this.layers.length > 0) {
              // while adding the 1st layer to the map in allOverlays mode,
              // this.baseLayer is not set yet when we need the resolution
              // for calculateInRange.
              resolution = this.layers[0].getResolution();
          }
          return resolution;
      }
docs: APIMethod: getResolution
  
  Returns:
  {Float} The current resolution of the map.
  If no baselayer is set, returns null.