| 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 |
|---|---|
java.lang.String |
getName()
The layer name.
|
void |
render(java.awt.Graphics2D graphics,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer,
boolean isFirstLayer)
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 void render(java.awt.Graphics2D graphics,
MfClientHttpRequestFactory clientHttpRequestFactory,
MapfishMapContext transformer,
boolean isFirstLayer)
MapLayerrender in interface MapLayergraphics - the graphics object.clientHttpRequestFactory - The factory to use for making http requests.transformer - the map transformer containing the map bounds and sizeisFirstLayer - true indicates this layer is the first layer in the map (the first layer drawn, ie the base layer)public boolean supportsNativeRotation()
MapLayersupportsNativeRotation in interface MapLayer