legendRasterizingInfo.setFont(font);
mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);
mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
for (Layer<?> layer : map.getMapModel().getLayers()) {
if (layer instanceof VectorLayer) {
VectorLayer vectorLayer = (VectorLayer) layer;
VectorLayerRasterizingInfo vectorRasterizingInfo = new VectorLayerRasterizingInfo();
vectorRasterizingInfo.setPaintGeometries(true);
vectorRasterizingInfo.setPaintLabels(layer.isLabeled());
vectorRasterizingInfo.setShowing(layer.isShowing());
ClientVectorLayerInfo layerInfo = vectorLayer.getLayerInfo();
vectorRasterizingInfo.setStyle(layerInfo.getNamedStyleInfo());
if (vectorLayer.getSelectedFeatures().size() > 0) {
Set<String> selectedFeatures = vectorLayer.getSelectedFeatures();
vectorRasterizingInfo.setSelectedFeatureIds(selectedFeatures.toArray(new String[selectedFeatures
.size()]));
FeatureStyleInfo selectStyle = null;
switch (layerInfo.getLayerType()) {
case GEOMETRY: