Package org.geotools.tile.util
Class TileLayer
- Object
-
- Layer
-
- DirectLayer
-
- TileLayer
-
- Direct Known Subclasses:
AsyncTileLayer
public class TileLayer extends DirectLayer
TileLayer is a direct map layer that does the mosaicking work for tiles of a given tile service.- Since:
- 12
- Author:
- Ugo Taddei
-
-
Constructor Summary
Constructors Constructor Description TileLayer(TileService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(Graphics2D graphics, MapContent map, MapViewport theViewport)
Draw layer contents onto screenReferencedEnvelope
getBounds()
The bounds of the Layer content (if known).GridCoverage2D
getCoverage()
protected BufferedImage
getTileImage(Tile tile)
protected void
renderTile(Tile tile, Graphics2D g2d, double[] points)
protected void
renderTiles(Collection<Tile> tiles, Graphics2D g2d, ReferencedEnvelope viewportExtent, AffineTransform worldToImageTransform)
-
Methods inherited from class Layer
addMapLayerListener, connectDataListener, dispose, finalize, fireMapLayerListenerLayerChanged, fireMapLayerListenerLayerDeselected, fireMapLayerListenerLayerHidden, fireMapLayerListenerLayerPreDispose, fireMapLayerListenerLayerSelected, fireMapLayerListenerLayerShown, getFeatureSource, getQuery, getStyle, getTitle, getUserData, isSelected, isVisible, preDispose, removeMapLayerListener, setSelected, setTitle, setVisible, toString
-
-
-
-
Constructor Detail
-
TileLayer
public TileLayer(TileService service)
-
-
Method Detail
-
getCoverage
public GridCoverage2D getCoverage()
-
getBounds
public ReferencedEnvelope getBounds()
Description copied from class:Layer
The bounds of the Layer content (if known). The bounds can be used to determine if any of the layers content is "on screen" when rendering the map; however often it is expensive to calculate a layers bounds up front so we are allowing this value to be optional.The returned bounds are a ReferencedEnvelope using the same CoordinateReferenceSystem as the layers contents.
-
draw
public void draw(Graphics2D graphics, MapContent map, MapViewport theViewport)
Description copied from class:DirectLayer
Draw layer contents onto screen- Specified by:
draw
in classDirectLayer
- Parameters:
graphics
- Graphics to draw intomap
- Map being drawn; check map bounds and crstheViewport
- Area to draw the map into; including screen area
-
renderTiles
protected void renderTiles(Collection<Tile> tiles, Graphics2D g2d, ReferencedEnvelope viewportExtent, AffineTransform worldToImageTransform)
-
renderTile
protected void renderTile(Tile tile, Graphics2D g2d, double[] points)
-
getTileImage
protected BufferedImage getTileImage(Tile tile)
-
-