code: function() {
          var scale;
          if(this.geodesic === true) {
              var units = this.map.getUnits();
              if(!units) {
                  return;
              }
              var inches = OpenLayers.INCHES_PER_UNIT;
              scale = (this.map.getGeodesicPixelSize().w || 0.000001) *
                      inches["km"] * OpenLayers.DOTS_PER_INCH;
          } else {
              scale = this.map.getScale();
          }
              
          if (!scale) {
              return;
          }
  
          if (scale >= 9500 && scale <= 950000) {
              scale = Math.round(scale / 1000) + "K";
          } else if (scale >= 950000) {
              scale = Math.round(scale / 1000000) + "M";
          } else {
              scale = Math.round(scale);
          }    
          
          this.element.innerHTML = OpenLayers.i18n("Scale = 1 : ${scaleDenom}", {'scaleDenom':scale});
      }
docs: Method: updateScale