mapRasterizingInfo.setScale(mapView.getCurrentScale());
mapRasterizingInfo.setTransparent(true);
LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
legendRasterizingInfo.setTitle("Legend");
FontStyleInfo font = new FontStyleInfo();
font.applyDefaults();
legendRasterizingInfo.setFont(font);
mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);
mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
for (Layer<?> layer : map.getMapModel().getLayers()) {
if (layer instanceof VectorLayer) {