code: public void setScalebarEnabled(boolean enabled) {
  		scaleBarEnabled = enabled;
  		final String scaleBarId = "scalebar";
  
  		if (scaleBarEnabled) {
  			if (!getMapAddons().containsKey(scaleBarId)) {
  				ScaleBar scalebar = new ScaleBar(scaleBarId, this);
  				scalebar.setVerticalAlignment(VerticalAlignment.BOTTOM);
  				scalebar.setHorizontalMargin(2);
  				scalebar.setVerticalMargin(2);
  				scalebar.initialize(getMapModel().getMapInfo().getDisplayUnitType(), unitLength, new Coordinate(20,
  						graphics.getHeight() - 25));
  				registerMapAddon(scalebar);
  			}
  		} else {
  			unregisterMapAddon(addons.get(scaleBarId));
  		}
  	}
docs: Enables or disables the scale bar. This setting has immediate effect on the map.
  
  @param enabled
  set status