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 |
|---|---|
void |
cacheResources(HttpRequestCache httpRequestCache,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer)
Cache any needed resources on disk.
|
double |
getImageBufferScaling()
Get the scale ratio between the tiles resolution and the target resolution.
|
java.lang.String |
getName()
The layer name.
|
MapLayer.RenderType |
getRenderType()
Specify whether layer should be rendered as PNG, JPEG or SVG.
|
void |
prepareRender(MapfishMapContext transformer)
Render the layer to the graphics2D object.
|
void |
render(java.awt.Graphics2D graphics,
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.
|
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 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 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)
MapLayerpublic boolean supportsNativeRotation()
MapLayersupportsNativeRotation in interface MapLayerpublic java.lang.String getName()
MapLayerpublic MapLayer.RenderType getRenderType()
MapLayergetRenderType in interface MapLayerpublic void cacheResources(HttpRequestCache httpRequestCache, MfClientHttpRequestFactory clientHttpRequestFactory, MapfishMapContext transformer)
MapLayercacheResources in interface MapLayerhttpRequestCache - TODOclientHttpRequestFactory - client http request factorytransformer - transformer