Package org.geomajas.plugin.printing.component.dto

Examples of org.geomajas.plugin.printing.component.dto.RasterLayerComponentInfo


        info.setSelected(vectorLayer.isSelected());
        Set<String> features = vectorLayer.getSelectedFeatures();
        info.setSelectedFeatureIds(features.toArray(new String[features.size()]));
        layerChildren.add(info);
      } else if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayerComponentInfo info = new RasterLayerComponentInfo();
        RasterLayer rasterLayer = (RasterLayer) layer;
        info.setLayerId(rasterLayer.getServerLayerId());
        info.setStyle(rasterLayer.getLayerInfo().getStyle());
        layerChildren.add(info);
      }
    }
    map.getChildren().addAll(0, layerChildren);
    return map;
View Full Code Here


        } 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);
View Full Code Here

    map.setRasterResolution(rasterDpi);
    List<PrintComponentInfo> layers = new ArrayList<PrintComponentInfo>();
    // use the normal way for raster layers (TODO: add support for dpi to rasterized part)
    for (Layer layer : mapModel.getLayers()) {
      if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayerComponentInfo info = new RasterLayerComponentInfo();
        RasterLayer rasterLayer = (RasterLayer) layer;
        info.setLayerId(rasterLayer.getServerLayerId());
        info.setStyle(rasterLayer.getLayerInfo().getStyle());
        layers.add(info);
      }
    }
    // use the rasterized layers way for vector layers
    for (ClientLayerInfo layerInfo : mapModel.getMapInfo().getLayers()) {
View Full Code Here

TOP

Related Classes of org.geomajas.plugin.printing.component.dto.RasterLayerComponentInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.