}
ClientRasterLayerInfo rasterInfo = (ClientRasterLayerInfo) clientLayerInfo;
RasterLayerRasterizingInfo extraInfo = (RasterLayerRasterizingInfo) rasterInfo
.getWidgetInfo(RasterLayerRasterizingInfo.WIDGET_KEY);
ReferencedEnvelope areaOfInterest = mapContext.getAreaOfInterest();
RasterLayer layer = configurationService.getRasterLayer(clientLayerInfo.getServerLayerId());
MapViewport port = mapContext.getViewport();
double rasterScale = port.getScreenArea().getWidth() / port.getBounds().getWidth();
List<RasterTile> tiles = rasterLayerService.getTiles(clientLayerInfo.getServerLayerId(),
areaOfInterest.getCoordinateReferenceSystem(), areaOfInterest, rasterScale);
RasterDirectLayer rasterLayer = new RasterDirectLayer(tiles, layer.getLayerInfo().getTileWidth(), layer
.getLayerInfo().getTileHeight(), extraInfo.getCssStyle());
rasterLayer.setTitle(clientLayerInfo.getLabel());
rasterLayer.getUserData().put(USERDATA_KEY_SHOWING, extraInfo.isShowing());
return rasterLayer;
}