public abstract class AbstractGeotoolsLayer extends java.lang.Object implements MapLayer
MapLayer.RenderType| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGeotoolsLayer(java.util.concurrent.ExecutorService executorService,
AbstractLayerParams params)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cacheResources(HttpRequestCache httpRequestCache,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer)
Cache any needed resources on disk.
|
boolean |
getFailOnError() |
protected abstract java.util.List<? extends org.geotools.map.Layer> |
getLayers(MfClientHttpRequestFactory httpRequestFactory,
MapfishMapContext transformer)
Get the
DataStore object that contains the data for this layer. |
protected MapfishMapContext |
getLayerTransformer(MapfishMapContext transformer)
If the layer transformer has not been prepared yet, do it.
|
java.lang.String |
getName()
The layer name.
|
void |
prepareRender(MapfishMapContext transformer)
Render the layer to the graphics2D object.
|
void |
render(java.awt.Graphics2D graphics2D,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer)
Render the layer to the graphics2D object.
|
boolean |
supportsNativeRotation()
Indicate if the layer supports native rotation (e.g.
|
com.google.common.base.Optional<MapLayer> |
tryAddLayer(MapLayer newLayer)
Attempt to add the layer this layer so that both can be rendered as a single layer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetImageBufferScaling, getRenderTypeprotected AbstractGeotoolsLayer(java.util.concurrent.ExecutorService executorService,
AbstractLayerParams params)
executorService - the thread pool for doing the rendering.params - the parameters for this layerpublic final com.google.common.base.Optional<MapLayer> tryAddLayer(MapLayer newLayer)
MapLayertryAddLayer in interface MapLayernewLayer - the layer to combine with this layer. The new layer will be rendered below the current layer.public void prepareRender(MapfishMapContext transformer)
MapLayerprepareRender in interface MapLayertransformer - the map transformer containing the map bounds and size.public final void render(java.awt.Graphics2D graphics2D,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer)
MapLayerprotected abstract java.util.List<? extends org.geotools.map.Layer> getLayers(MfClientHttpRequestFactory httpRequestFactory, MapfishMapContext transformer) throws java.lang.Exception
DataStore object that contains the data for this layer.httpRequestFactory - the factory for making http requeststransformer - the map transformerjava.lang.Exceptionpublic boolean supportsNativeRotation()
MapLayersupportsNativeRotation in interface MapLayerpublic final java.lang.String getName()
MapLayerpublic final boolean getFailOnError()
protected final MapfishMapContext getLayerTransformer(MapfishMapContext transformer)
transformer - the transformerpublic void cacheResources(HttpRequestCache httpRequestCache, MfClientHttpRequestFactory clientHttpRequestFactory, MapfishMapContext transformer)
MapLayercacheResources in interface MapLayerhttpRequestCache - TODOclientHttpRequestFactory - client http request factorytransformer - transformer