Examples of VectorLayerRasterizingInfo


Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    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:
              break;
            case LINESTRING:
            case MULTILINESTRING:
              selectStyle = mapInfo.getLineSelectStyle();
              break;
            case MULTIPOINT:
            case POINT:
              selectStyle = mapInfo.getPointSelectStyle();
              break;
            case MULTIPOLYGON:
            case POLYGON:
              selectStyle = mapInfo.getPolygonSelectStyle();
              break;
          }
          selectStyle.applyDefaults();
          vectorRasterizingInfo.setSelectionStyle(selectStyle);
        }
        layerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorRasterizingInfo);
      } else if (layer instanceof RasterLayer) {
        RasterLayerRasterizingInfo rasterInfo = new RasterLayerRasterizingInfo();
        ClientRasterLayerInfo layerInfo = (ClientRasterLayerInfo) layer.getLayerInfo();
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    if (!(clientLayerInfo instanceof ClientVectorLayerInfo)) {
      throw new IllegalStateException(
          "VectorLayerFactory.createLayer() should only be called using ClientVectorLayerInfo");
    }
    ClientVectorLayerInfo vectorInfo = (ClientVectorLayerInfo) clientLayerInfo;
    VectorLayerRasterizingInfo extraInfo = (VectorLayerRasterizingInfo) vectorInfo
        .getWidgetInfo(VectorLayerRasterizingInfo.WIDGET_KEY);
    ReferencedEnvelope areaOfInterest = mapContext.getAreaOfInterest();
    VectorLayer layer = configurationService.getVectorLayer(vectorInfo.getServerLayerId());
    // need to clone the extra info object before changing it !
    VectorLayerRasterizingInfo copy = cloneInfo(extraInfo);
    // we now replace the style filters by simple filters on an artificial extra style attribute
    for (FeatureStyleInfo style : copy.getStyle().getFeatureStyles()) {
      style.setFormula(STYLE_INDEX_ATTRIBUTE_NAME + " = " + style.getIndex());
    }
    // create the style
    Style style = styleFactoryService.createStyle(layer, copy);
    // estimate the buffer
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

  public void onClick(ClickEvent clickEvent) {
    imageUrlService.makeRasterizable(mapWidget);
    if (showAllLayers) {
      for (Layer<?> layer : mapWidget.getMapModel().getLayers()) {
        if (layer instanceof VectorLayer) {
          VectorLayerRasterizingInfo vectorInfo = (VectorLayerRasterizingInfo) layer.getLayerInfo()
              .getWidgetInfo().get(VectorLayerRasterizingInfo.WIDGET_KEY);
          vectorInfo.setShowing(true);
        } else if (layer instanceof RasterLayer) {
          RasterLayerRasterizingInfo rasterInfo = (RasterLayerRasterizingInfo) layer.getLayerInfo()
              .getWidgetInfo().get(RasterLayerRasterizingInfo.WIDGET_KEY);
          rasterInfo.setShowing(true);
        }
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
    ClientVectorLayerInfo clientVectorLayerInfo = new ClientVectorLayerInfo();
    clientVectorLayerInfo.setVisible(true);
    clientVectorLayerInfo.setServerLayerId(layer.getId());
    clientVectorLayerInfo.setNamedStyleInfo(styleInfo);
    VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
    vectorLayerRasterizingInfo.setPaintGeometries(true);
    vectorLayerRasterizingInfo.setPaintLabels(true);
    vectorLayerRasterizingInfo.setStyle(styleInfo);
    clientVectorLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorLayerRasterizingInfo);
    mapInfo.getLayers().add(clientVectorLayerInfo);
    new MapAssert(mapInfo).assertEqualImage(fileName, writeImages, DELTA);
  }
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    mapRasterizingInfo.setScale(1);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
    ClientVectorLayerInfo clientBeansPointLayerInfo = new ClientVectorLayerInfo();
    clientBeansPointLayerInfo.setServerLayerId(layerBeansPoint.getId());
    VectorLayerRasterizingInfo layerRasterizingInfo = new VectorLayerRasterizingInfo();
    layerRasterizingInfo.setStyle(layerBeansPointStyleInfo);
    clientBeansPointLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, layerRasterizingInfo);
    mapInfo.getLayers().add(clientBeansPointLayerInfo);
    new MapAssert(mapInfo).assertEqualImage("onevector.png", writeImages, DELTA);
  }
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

    ClientVectorLayerInfo cl1 = new ClientVectorLayerInfo();
    cl1.setServerLayerId(layerBeansPoint.getId());
    VectorLayerRasterizingInfo lr1 = new VectorLayerRasterizingInfo();
    lr1.setStyle(layerBeansPointStyleInfo);
    cl1.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr1);
    mapInfo.getLayers().add(cl1);

    ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
    cl2.setServerLayerId(layerBeansMultiLine.getId());
    VectorLayerRasterizingInfo lr2 = new VectorLayerRasterizingInfo();
    lr2.setStyle(layerBeansMultiLineStyleInfo);
    cl2.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr2);
    mapInfo.getLayers().add(cl2);
    new MapAssert(mapInfo).assertEqualImage("twovector.png", writeImages, DELTA);
  }
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    mapRasterizingInfo.setScale(tileMetadata.getScale());
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
    ClientVectorLayerInfo clientVectorLayerInfo = new ClientVectorLayerInfo();
    clientVectorLayerInfo.setServerLayerId(tileMetadata.getLayerId());
    clientVectorLayerInfo.setNamedStyleInfo(style);
    VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
    vectorLayerRasterizingInfo.setFilter(tileMetadata.getFilter());
    vectorLayerRasterizingInfo.setPaintGeometries(tileMetadata.isPaintGeometries());
    vectorLayerRasterizingInfo.setPaintLabels(tileMetadata.isPaintLabels());
    vectorLayerRasterizingInfo.setFilter(tileMetadata.getFilter());
    vectorLayerRasterizingInfo.setStyle(style);
    clientVectorLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorLayerRasterizingInfo);
    mapInfo.getLayers().add(clientVectorLayerInfo);

    ByteArrayOutputStream imageStream = new ByteArrayOutputStream(1024 * 10);
    try {
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
    cl2.setServerLayerId(layerBeansPoint.getId());
    cl2.setLayerInfo(layerBeansPoint.getLayerInfo());
    cl2.setLabel(layerBeansPoint.getId());
    VectorLayerRasterizingInfo lr2 = new VectorLayerRasterizingInfo();
    lr2.setStyle(layerBeansPointStyleInfo);
    cl2.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr2);
    mapInfo.getLayers().add(cl2);

    ClientVectorLayerInfo cl3 = new ClientVectorLayerInfo();
    cl3.setServerLayerId(layerBeansMultiLine.getId());
    cl3.setLayerInfo(layerBeansMultiLine.getLayerInfo());
    cl3.setLabel(layerBeansMultiLine.getId());
    VectorLayerRasterizingInfo lr3 = new VectorLayerRasterizingInfo();
    lr3.setStyle(layerBeansMultiLineStyleInfo);
    cl3.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr3);
    mapInfo.getLayers().add(cl3);

    LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
    legendRasterizingInfo.setFont(new FontStyleInfo());
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
    cl2.setServerLayerId(layerBeansPoint.getId());
    cl2.setLayerInfo(layerBeansPoint.getLayerInfo());
    cl2.setLabel(layerBeansPoint.getId());
    VectorLayerRasterizingInfo lr2 = new VectorLayerRasterizingInfo();
    lr2.setStyle(layerBeansPointStyleInfo);
    cl2.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr2);
    mapInfo.getLayers().add(cl2);

    ClientVectorLayerInfo cl3 = new ClientVectorLayerInfo();
    cl3.setServerLayerId(layerBeansMultiLine.getId());
    cl3.setLayerInfo(layerBeansMultiLine.getLayerInfo());
    cl3.setLabel(layerBeansMultiLine.getId());
    VectorLayerRasterizingInfo lr3 = new VectorLayerRasterizingInfo();
    lr3.setStyle(layerBeansMultiLineStyleInfo);
    cl3.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr3);
    mapInfo.getLayers().add(cl3);

    LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
    legendRasterizingInfo.setFont(new FontStyleInfo());
View Full Code Here

Examples of org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo

    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
    ClientVectorLayerInfo clientVectorLayerInfo = new ClientVectorLayerInfo();
    clientVectorLayerInfo.setVisible(true);
    clientVectorLayerInfo.setServerLayerId(layer.getId());
    clientVectorLayerInfo.setNamedStyleInfo(styleInfo);
    VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
    vectorLayerRasterizingInfo.setPaintGeometries(true);
    vectorLayerRasterizingInfo.setPaintLabels(true);
    vectorLayerRasterizingInfo.setStyle(styleInfo);
    clientVectorLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorLayerRasterizingInfo);
    mapInfo.getLayers().add(clientVectorLayerInfo);
    new MapAssert(mapInfo).assertEqualImage(fileName, writeImages, DELTA);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.