Package org.mapfish.print.map.image
Class ImageLayer
java.lang.Object
org.mapfish.print.map.geotools.AbstractGeotoolsLayer
org.mapfish.print.map.image.AbstractSingleImageLayer
org.mapfish.print.map.image.ImageLayer
- All Implemented Interfaces:
MapLayer
Reads an image file from a URL.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Renders an image as layer.static final class
The parameters for reading an image file, either from the server or from a URL.Nested classes/interfaces inherited from interface org.mapfish.print.attribute.map.MapLayer
MapLayer.LayerContext, MapLayer.RenderType
-
Field Summary
Fields inherited from class org.mapfish.print.map.image.AbstractSingleImageLayer
configuration, registry
Fields inherited from interface org.mapfish.print.attribute.map.MapLayer
DEFAULT_SCALING
-
Method Summary
Modifier and TypeMethodDescriptionSpecify whether layer should be rendered as PNG, JPEG or SVG.protected BufferedImage
loadImage
(MfClientHttpRequestFactory requestFactory, MapfishMapContext transformer) Load the image at the requested size for the provided map bounds.prepareRender
(MapfishMapContext transformer, MfClientHttpRequestFactory clientHttpRequestFactory) Render the layer to the graphics2D object.Methods inherited from class org.mapfish.print.map.image.AbstractSingleImageLayer
createErrorImage, fetchImage, getLayers, getStyleSupplier
Methods inherited from class org.mapfish.print.map.geotools.AbstractGeotoolsLayer
getFailOnError, getLayerTransformer, getName, getOpacity, prefetchResources, prepareLayerRendering, render, supportsNativeRotation, tryAddLayer
-
Method Details
-
loadImage
protected BufferedImage loadImage(MfClientHttpRequestFactory requestFactory, MapfishMapContext transformer) Description copied from class:AbstractSingleImageLayer
Load the image at the requested size for the provided map bounds.- Specified by:
loadImage
in classAbstractSingleImageLayer
- Parameters:
requestFactory
- the factory to use for making http requeststransformer
- object containing map rendering information
-
getRenderType
Description copied from interface:MapLayer
Specify whether layer should be rendered as PNG, JPEG or SVG.- Returns:
- render type
-
prepareRender
public MapLayer.LayerContext prepareRender(MapfishMapContext transformer, MfClientHttpRequestFactory clientHttpRequestFactory) Description copied from interface:MapLayer
Render the layer to the graphics2D object.- Parameters:
transformer
- the map transformer containing the map bounds and size.clientHttpRequestFactory
- the factory to use for making http requests.- Returns:
- the LayerContext for this requested rendering.
-