Package org.mapfish.print.map.geotools
Class FeatureLayer
java.lang.Object
org.mapfish.print.map.geotools.AbstractGeotoolsLayer
org.mapfish.print.map.geotools.AbstractFeatureSourceLayer
org.mapfish.print.map.geotools.FeatureLayer
- All Implemented Interfaces:
MapLayer
A layer to render GeoTools features.
This layer type is only intended for internal use, for example to render the bbox rectangle in the overview map.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The parameters for creating a vector layer.static final class
Parser for creatingFeatureLayer
layers from request data.Nested classes/interfaces inherited from interface org.mapfish.print.attribute.map.MapLayer
MapLayer.LayerContext, MapLayer.RenderType
-
Field Summary
Fields inherited from interface org.mapfish.print.attribute.map.MapLayer
DEFAULT_SCALING
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureLayer
(ExecutorService executorService, FeatureSourceSupplier featureSourceSupplier, StyleSupplier<org.geotools.api.data.FeatureSource<?, ?>> styleSupplier, boolean renderAsSvg, AbstractLayerParams params) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
prepareRender
(MapfishMapContext transformer, MfClientHttpRequestFactory clientHttpRequestFactory) Render the layer to the graphics2D object.Methods inherited from class org.mapfish.print.map.geotools.AbstractFeatureSourceLayer
getFeatureSource, getLayers, getRenderType, setFeatureCollection, setStyle
Methods inherited from class org.mapfish.print.map.geotools.AbstractGeotoolsLayer
getFailOnError, getLayerTransformer, getName, getOpacity, prefetchResources, prepareLayerRendering, render, supportsNativeRotation, tryAddLayer
-
Constructor Details
-
FeatureLayer
public FeatureLayer(ExecutorService executorService, FeatureSourceSupplier featureSourceSupplier, StyleSupplier<org.geotools.api.data.FeatureSource<?, ?>> styleSupplier, boolean renderAsSvg, AbstractLayerParams params) Constructor.- Parameters:
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 layer
-
-
Method Details
-
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.
-
getImageBufferScaling
public double getImageBufferScaling()
-