mapContext.getViewport().setCoordinateReferenceSystem(mapCrs);
mapContext.getViewport().setScreenArea(paintArea);
// add the configured layers
for (ClientLayerInfo clientLayerInfo : clientMapInfo.getLayers()) {
clientLayerInfo.getWidgetInfo(RasterizingConstants.WIDGET_KEY);
Layer layer = layerFactoryService.createLayer(mapContext, clientLayerInfo);
boolean showing = (Boolean) layer.getUserData().get(LayerFactory.USERDATA_KEY_SHOWING);
if (showing) {
mapContext.addLayer(layer);
}
}
// add the extra layers
for (ClientLayerInfo clientLayerInfo : mapRasterizingInfo.getExtraLayers()) {
Layer layer = layerFactoryService.createLayer(mapContext, clientLayerInfo);
boolean showing = (Boolean) layer.getUserData().get(LayerFactory.USERDATA_KEY_SHOWING);
if (showing) {
mapContext.addLayer(layer);
}
}
}