vectorInfo.setLabelsVisible(false);
vectorInfo.setLayerId(info.getServerLayerId());
vectorInfo.setStyleInfo(((ClientVectorLayerInfo) info).getNamedStyleInfo());
vectorInfo.setVisible(true);
try {
VectorLayerComponentImpl comp = (VectorLayerComponentImpl) printDtoConverterService
.toInternal(vectorInfo);
layers.add(comp);
} catch (PrintingException e) {
// should never fail
log.error("unexpected exception while adding layers to map" , e);
}
} else if (info instanceof ClientRasterLayerInfo) {
RasterLayerComponentInfo rasterInfo = new RasterLayerComponentInfo();
rasterInfo.setLayerId(info.getServerLayerId());
rasterInfo.setVisible(true);
rasterInfo.setStyle(((ClientRasterLayerInfo) info).getStyle());
try {
RasterLayerComponentImpl comp = (RasterLayerComponentImpl) printDtoConverterService
.toInternal(rasterInfo);
comp.setLayerId(info.getServerLayerId());
comp.setVisible(true);
layers.add(comp);
} catch (PrintingException e) {
// should never fail
log.error("unexpected exception while adding layers to map" , e);
}