code: public TileConfiguration createTileConfig(WmsLayerInfo layerInfo, ViewPort viewPort, int tileWidth, int tileHeight)
  			throws IllegalArgumentException {
  		Bbox bbox = layerInfo.getBoundingBox(viewPort.getCrs());
  		if (bbox == null) {
  			throw new IllegalArgumentException("Layer does not support map CRS (" + viewPort.getCrs() + ").");
  		}
  		Coordinate origin = new Coordinate(bbox.getX(), bbox.getY());
  		return new TileConfiguration(tileWidth, tileHeight, origin, viewPort);
  	}
docs: Create a new tile configuration object from a WmsLayerInfo object.
  
  @param layerInfo  The layer info object. Acquired from a WMS GetCapabilities.
  @param viewPort   The ViewPort to get the CRS and fixed resolutions from.
  @param tileWidth  The tile width in pixels.
  @param tileHeight The tile height in pixels.
  @return Returns a tile configuration object.
  @throws IllegalArgumentException Throw when the CRS is not supported for this layerInfo object.