Package org.geotools.map
Class DirectLayer
-
- Direct Known Subclasses:
MessageDirectLayer
,TileLayer
public abstract class DirectLayer extends Layer
A Layer directly responsible for its own rendering.Direct layers are responsible for their own rendering and are useful for:
- Map Decorations such as legends or scalebars that depend only on the map and viewport and do not actually make use of external data.
- Data services that are visual in nature, such as a Web Map Service (which you can think of as an external renderer)
- You may also consider data formats, such as CAD files, where the style information is "baked into" the data format as suitable for a DirectLayer. In these cases you are only going for a visual display and are not making the raw features available to the geotools library for use.
- Since:
- 2.7
- Author:
- Jody
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DirectLayer()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
draw(Graphics2D graphics, MapContent map, MapViewport viewport)
Draw layer contents onto screen-
Methods inherited from class Layer
addMapLayerListener, connectDataListener, dispose, finalize, fireMapLayerListenerLayerChanged, fireMapLayerListenerLayerDeselected, fireMapLayerListenerLayerHidden, fireMapLayerListenerLayerPreDispose, fireMapLayerListenerLayerSelected, fireMapLayerListenerLayerShown, getBounds, getFeatureSource, getQuery, getStyle, getTitle, getUserData, isSelected, isVisible, preDispose, removeMapLayerListener, setSelected, setTitle, setVisible, toString
-
-
-
-
Method Detail
-
draw
public abstract void draw(Graphics2D graphics, MapContent map, MapViewport viewport)
Draw layer contents onto screen- Parameters:
map
- Map being drawn; check map bounds and crsgraphics
- Graphics to draw intoviewport
- Area to draw the map into; including screen area
-
-