public abstract class AbstractSingleImageLayer extends AbstractGeotoolsLayer
MapLayer.RenderType| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
configuration
The configuration.
|
protected com.codahale.metrics.MetricRegistry |
registry
The metrics object.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSingleImageLayer(java.util.concurrent.ExecutorService executorService,
StyleSupplier<org.geotools.coverage.grid.GridCoverage2D> styleSupplier,
AbstractLayerParams params,
com.codahale.metrics.MetricRegistry registry,
Configuration configuration)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.image.BufferedImage |
createErrorImage(java.awt.Rectangle area)
Create an error image.
|
protected java.awt.image.BufferedImage |
fetchImage(org.springframework.http.client.ClientHttpRequest request,
MapfishMapContext transformer)
Fetch the given image from the web.
|
double |
getImageBufferScaling()
Get the scale ratio between the tiles resolution and the target resolution.
|
protected java.util.List<? extends org.geotools.map.Layer> |
getLayers(MfClientHttpRequestFactory httpRequestFactory,
MapfishMapContext mapContext,
Processor.ExecutionContext context)
Get the
DataStore object that contains the data for this layer. |
StyleSupplier<org.geotools.coverage.grid.GridCoverage2D> |
getStyleSupplier() |
protected abstract java.awt.image.BufferedImage |
loadImage(MfClientHttpRequestFactory requestFactory,
MapfishMapContext transformer)
Load the image at the requested size for the provided map bounds.
|
getFailOnError, getLayerTransformer, getName, getOpacity, prefetchResources, prepareRender, render, supportsNativeRotation, tryAddLayerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRenderType@Nonnull protected final com.codahale.metrics.MetricRegistry registry
protected final Configuration configuration
protected AbstractSingleImageLayer(java.util.concurrent.ExecutorService executorService,
StyleSupplier<org.geotools.coverage.grid.GridCoverage2D> styleSupplier,
AbstractLayerParams params,
com.codahale.metrics.MetricRegistry registry,
Configuration configuration)
executorService - the thread pool for doing the rendering.styleSupplier - the style to use when drawing the constructed grid coverage on the map.params - the parameters for this layerregistry - the metrics object.configuration - the configurationprotected final java.util.List<? extends org.geotools.map.Layer> getLayers(MfClientHttpRequestFactory httpRequestFactory, MapfishMapContext mapContext, Processor.ExecutionContext context)
AbstractGeotoolsLayerDataStore object that contains the data for this layer.getLayers in class AbstractGeotoolsLayerhttpRequestFactory - the factory for making http requestsmapContext - the map transformercontext - the job IDprotected abstract java.awt.image.BufferedImage loadImage(MfClientHttpRequestFactory requestFactory, MapfishMapContext transformer) throws java.lang.Throwable
requestFactory - the factory to use for making http requeststransformer - object containing map rendering informationjava.lang.Throwablepublic final double getImageBufferScaling()
MapLayerpublic StyleSupplier<org.geotools.coverage.grid.GridCoverage2D> getStyleSupplier()
protected java.awt.image.BufferedImage createErrorImage(java.awt.Rectangle area)
area - The size of the imageprotected java.awt.image.BufferedImage fetchImage(@Nonnull
org.springframework.http.client.ClientHttpRequest request,
@Nonnull
MapfishMapContext transformer)
throws java.io.IOException
request - The requesttransformer - The transformerjava.io.IOException