MapLayer.RenderType| Constructor and Description |
|---|
GridLayer(java.util.concurrent.ExecutorService executorService,
FeatureSourceSupplier featureSourceSupplier,
StyleSupplier<org.geotools.data.FeatureSource> styleSupplier,
boolean renderAsSvg,
GridParam params,
org.mapfish.print.map.geotools.grid.LabelPositionCollector labels)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getImageBufferScaling()
Get the scale ratio between the tiles resolution and the target resolution.
|
java.lang.String |
getName()
The layer name.
|
double |
getOpacity()
Gets the opacity.
|
MapLayer.RenderType |
getRenderType()
Specify whether layer should be rendered as PNG, JPEG or SVG.
|
void |
prefetchResources(HttpRequestFetcher httpRequestFetcher,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer,
Processor.ExecutionContext context)
Cache any needed resources on disk.
|
void |
prepareRender(MapfishMapContext transformer)
Render the layer to the graphics2D object.
|
void |
render(java.awt.Graphics2D graphics,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer,
Processor.ExecutionContext context)
Render the layer to the graphics2D object.
|
boolean |
supportsNativeRotation()
Indicate if the layer supports native rotation (e.g.
|
java.util.Optional<MapLayer> |
tryAddLayer(MapLayer newLayer)
Attempt to add the layer this layer so that both can be rendered as a single layer.
|
public GridLayer(java.util.concurrent.ExecutorService executorService,
FeatureSourceSupplier featureSourceSupplier,
StyleSupplier<org.geotools.data.FeatureSource> styleSupplier,
boolean renderAsSvg,
GridParam params,
org.mapfish.print.map.geotools.grid.LabelPositionCollector labels)
executorService - the thread pool for doing the rendering.featureSourceSupplier - a function that creates the feature source. This will only be
called once.styleSupplier - a function that creates the style for styling the features. This will only
be called once.renderAsSvg - is the layer rendered as SVG?params - the parameters for this layerlabels - the grid labels to renderpublic java.util.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 double getImageBufferScaling()
MapLayergetImageBufferScaling in interface MapLayerpublic void prepareRender(MapfishMapContext transformer)
MapLayerprepareRender in interface MapLayertransformer - the map transformer containing the map bounds and size.public void render(java.awt.Graphics2D graphics,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer,
Processor.ExecutionContext context)
MapLayerpublic boolean supportsNativeRotation()
MapLayersupportsNativeRotation in interface MapLayerpublic java.lang.String getName()
MapLayerpublic MapLayer.RenderType getRenderType()
MapLayergetRenderType in interface MapLayerpublic void prefetchResources(HttpRequestFetcher httpRequestFetcher, MfClientHttpRequestFactory clientHttpRequestFactory, MapfishMapContext transformer, Processor.ExecutionContext context)
MapLayerprefetchResources in interface MapLayerhttpRequestFetcher - TODOclientHttpRequestFactory - client http request factorytransformer - transformercontext - the job IDpublic double getOpacity()
MapLayergetOpacity in interface MapLayer