Package org.mapfish.print.map.geotools
Class GeoJsonLayer
java.lang.Object
org.mapfish.print.map.geotools.AbstractGeotoolsLayer
org.mapfish.print.map.geotools.AbstractFeatureSourceLayer
org.mapfish.print.map.geotools.GeoJsonLayer
- All Implemented Interfaces:
MapLayer
Parses GeoJSON from the request data.
Type: geojson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe parameters for creating a layer that renders GeoJSON formatted data.static final classRenders GeoJSON layers.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
ConstructorsConstructorDescriptionGeoJsonLayer(ExecutorService executorService, FeatureSourceSupplier featureSourceSupplier, StyleSupplier<org.geotools.api.data.FeatureSource<?, ?>> styleSupplier, boolean renderAsSvg, AbstractLayerParams params) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprepareRender(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, setStyleMethods inherited from class org.mapfish.print.map.geotools.AbstractGeotoolsLayer
getFailOnError, getLayerTransformer, getName, getOpacity, prefetchResources, prepareLayerRendering, render, supportsNativeRotation, tryAddLayer
-
Constructor Details
-
GeoJsonLayer
public GeoJsonLayer(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:MapLayerRender 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.
-