}
}
layersOnlyRasters.removeAll(toRemove2);
//set bounds to match the other map
SetViewportBBoxCommand cmdBbox = new SetViewportBBoxCommand(mapNoRasterLayers.getViewportModel().getBounds());
mapOnlyRasterLayers.sendCommandSync(cmdBbox);
if (layersNoRasters.size() > 0) {
writeRasterLayersOnlyToDocument(mapOnlyRasterLayers, template.getMapBounds(), doc, page.getSize(), /*currentViewportScaleDenom*/mapNoRasterLayers.getViewportModel().getScaleDenominator());
}