code: private void redrawScale() {
  		calculateBestFit(1 / mapPresenter.getViewPort().getResolution());
  		scaleBarElement.setInnerText(formatUnits(widthInUnits));
  		scaleBarElement.getStyle().setWidth(widthInPixels, Style.Unit.PX);
  		getElement().getStyle().setWidth(widthInPixels + 10, Style.Unit.PX);
  	}
docs: ------------------------------------------------------------------------