docs: function() {
          var res = this.map.getResolution();
          if (!res) {
              return;
          }
  
          var curMapUnits = this.map.getUnits();
          var inches = OpenLayers.INCHES_PER_UNIT;
  
          // convert maxWidth to map units
          var maxSizeData = this.maxWidth * res * inches[curMapUnits];
          var geodesicRatio = 1;
          if(this.geodesic === true) {
              var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w ||
                  0.000001) * this.maxWidth;
              var maxSizeKilometers = maxSizeData / inches["km"];
              geodesicRatio = maxSizeGeodesic / maxSizeKilometers;
              maxSizeData *= geodesicRatio;
          }
  
          // decide whether to use large or small scale units     
          var topUnits;
          var bottomUnits;
          if(maxSizeData > 100000) {
              topUnits = this.topOutUnits;
              bottomUnits = this.bottomOutUnits;
          } else {
              topUnits = this.topInUnits;
              bottomUnits = this.bottomInUnits;
          }
  
          // and to map units units
          var topMax = maxSizeData / inches[topUnits];
          var bottomMax = maxSizeData / inches[bottomUnits];
  
          // now trim this down to useful block length
          var topRounded = this.getBarLen(topMax);
          var bottomRounded = this.getBarLen(bottomMax);
  
          // and back to display units
          topMax = topRounded / inches[curMapUnits] * inches[topUnits];
          bottomMax = bottomRounded / inches[curMapUnits] * inches[bottomUnits];
  
          // and to pixel units
          var topPx = topMax / res / geodesicRatio;
          var bottomPx = bottomMax / res / geodesicRatio;
          
          // now set the pixel widths
          // and the values inside them
          
          if (this.eBottom.style.visibility == "visible"){
              this.eBottom.style.width = Math.round(bottomPx) + "px"; 
              this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ;
          }
              
          if (this.eTop.style.visibility == "visible"){
              this.eTop.style.width = Math.round(topPx) + "px";
              this.eTop.innerHTML = topRounded + " " + topUnits;
          }
          
      }