Package org.geomajas.plugin.rasterizing.api

Examples of org.geomajas.plugin.rasterizing.api.RasterException


    pipelineService.execute(RasterizingPipelineCode.PIPELINE_RASTERIZING_GET_MAP_IMAGE, null, context, response);
    mapContext.dispose();
    try {
      stream.write(response.getImage());
    } catch (IOException e) {
      throw new RasterException(RasterException.IMAGE_WRITING_FAILED, e);
    }
  }
View Full Code Here


    pipelineService.execute(RasterizingPipelineCode.PIPELINE_RASTERIZING_GET_LEGEND_IMAGE, null, context, response);
    mapContext.dispose();
    try {
      stream.write(response.getImage());
    } catch (IOException e) {
      throw new RasterException(RasterException.IMAGE_WRITING_FAILED, e);
    }

  }
View Full Code Here

    for (LayerFactory factory : factories) {
      if (factory.canCreateLayer(mapContext, clientLayerInfo)) {
        return factory.createLayer(mapContext, clientLayerInfo);
      }
    }
    throw new RasterException(RasterException.MISSING_LAYER_FACTORY, clientLayerInfo.getLabel());
  }
View Full Code Here

    RenderedImage image = context.get(RasterizingPipelineCode.RENDERED_IMAGE, RenderedImage.class);
    ByteArrayOutputStream imageStream = new ByteArrayOutputStream(10 * 1024);
    try {
      ImageIO.write(image, "PNG", imageStream);
    } catch (IOException e) {
      throw new RasterException(RasterException.IMAGE_WRITING_FAILED, e);
    }
    byte[] imageData = imageStream.toByteArray();
    response.setImage(imageData);

  }
View Full Code Here

TOP

Related Classes of org.geomajas.plugin.rasterizing.api.RasterException

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.