gov.nasa.worldwind.layers
Class LatLonGraticuleLayer
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
gov.nasa.worldwind.layers.AbstractGraticuleLayer
gov.nasa.worldwind.layers.LatLonGraticuleLayer
- All Implemented Interfaces:
- AVList, Disposable, Layer, Restorable, WWObject, PropertyChangeListener, EventListener
public class LatLonGraticuleLayer
- extends AbstractGraticuleLayer
Displays the geographic latitude/longitude graticule.
Methods inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer |
addRenderable, computeAltitudeAboveGround, getGraticuleLineColor, getGraticuleLineStyle, getGraticuleLineWidth, getLabelColor, getLabelFont, getRenderingParams, getRestorableState, getSurfacePoint, isDrawGraticule, isDrawLabels, removeAllRenderables, renderGraticule, restoreState, setDrawGraticule, setDrawLabels, setGraticuleLineColor, setGraticuleLineStyle, setGraticuleLineWidth, setLabelColor, setLabelFont, setRenderingParams |
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
dispose, doPick, doPreRender, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString |
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
GRATICULE_LATLON_LEVEL_0
public static final String GRATICULE_LATLON_LEVEL_0
- See Also:
- Constant Field Values
GRATICULE_LATLON_LEVEL_1
public static final String GRATICULE_LATLON_LEVEL_1
- See Also:
- Constant Field Values
GRATICULE_LATLON_LEVEL_2
public static final String GRATICULE_LATLON_LEVEL_2
- See Also:
- Constant Field Values
GRATICULE_LATLON_LEVEL_3
public static final String GRATICULE_LATLON_LEVEL_3
- See Also:
- Constant Field Values
GRATICULE_LATLON_LEVEL_4
public static final String GRATICULE_LATLON_LEVEL_4
- See Also:
- Constant Field Values
GRATICULE_LATLON_LEVEL_5
public static final String GRATICULE_LATLON_LEVEL_5
- See Also:
- Constant Field Values
LatLonGraticuleLayer
public LatLonGraticuleLayer()
addLabel
protected void addLabel(double value,
String labelType,
String graticuleType,
double resolution,
LatLon labelOffset)
clear
protected void clear(DrawContext dc)
computeLabelOffset
protected LatLon computeLabelOffset(DrawContext dc)
computeTerrainConformance
protected double computeTerrainConformance(DrawContext dc)
doRender
public void doRender(DrawContext dc)
- Overrides:
doRender
in class AbstractGraticuleLayer
getAngleFormat
public String getAngleFormat()
makeAngleLabel
protected String makeAngleLabel(Angle angle,
double resolution)
needsToUpdate
protected boolean needsToUpdate(DrawContext dc)
- Determines whether the grid should be updated. It returns true if:
- the eye has moved more than 1% of its altitude above ground
- the view FOV, heading or pitch have changed more than 1 degree
- vertical exaggeration has changed
- Parameters:
dc
- the current DrawContext
.
- Returns:
- true if the graticule should be updated.
selectRenderables
protected void selectRenderables(DrawContext dc)
- Select the visible grid elements
- Overrides:
selectRenderables
in class AbstractGraticuleLayer
- Parameters:
dc
- the current DrawContext
.
setAngleFormat
public void setAngleFormat(String format)
- Sets the graticule division and angular display format. Can be one of
or .
- Parameters:
format
- the graticule division and angular display format.
- Throws:
IllegalArgumentException
- is format
is null.