code: public void setMapSize(int mapWidth, int mapHeight) {
  		super.setMapSize(mapWidth, mapHeight);
  		if (null == unitType) {
  			throw new IllegalStateException("Please initialize scale bar before using");
  		}
  		backGround.getBounds().setX(getUpperLeftCorner().getX());
  		backGround.getBounds().setY(getUpperLeftCorner().getY());
  		bottomLine.getBounds().setX(getUpperLeftCorner().getX() + HORIZONTAL_PADDING);
  		bottomLine.getBounds().setY(getUpperLeftCorner().getY() + VERTICAL_PADDING + MARKER_HEIGHT);
  		leftMarker.getBounds().setX(getUpperLeftCorner().getX() + HORIZONTAL_PADDING);
  		leftMarker.getBounds().setY(getUpperLeftCorner().getY() + VERTICAL_PADDING);
  		rightMarker.getBounds().setY(getUpperLeftCorner().getY() + VERTICAL_PADDING);
  		distance.setPosition(new Coordinate(getUpperLeftCorner().getX() + HORIZONTAL_PADDING + 6,
  				getUpperLeftCorner().getY() + VERTICAL_PADDING));
  	}
docs: Set map size.
  
  @param mapWidth map width
  @param mapHeight map height