Package 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,MessageListener,Layer,Restorable,WWObject,java.beans.PropertyChangeListener,java.util.EventListener
public class LatLonGraticuleLayer extends AbstractGraticuleLayer
Displays the geographic latitude/longitude graticule.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classLatLonGraticuleLayer.GraticuleTile-
Nested classes/interfaces inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer
AbstractGraticuleLayer.GridElement
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGRATICULE_LATLON_LEVEL_0static java.lang.StringGRATICULE_LATLON_LEVEL_1static java.lang.StringGRATICULE_LATLON_LEVEL_2static java.lang.StringGRATICULE_LATLON_LEVEL_3static java.lang.StringGRATICULE_LATLON_LEVEL_4static java.lang.StringGRATICULE_LATLON_LEVEL_5protected LatLonGraticuleLayer.GraticuleTile[][]gridTilesprotected java.util.ArrayList<java.lang.Double>latitudeLabelsprotected java.util.ArrayList<java.lang.Double>longitudeLabelsprotected static intMIN_CELL_SIZE_PIXELS-
Fields inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer
frameTimeStamp, globe, graticuleSupport, gridElements, lastEyePoint, lastProjection, lastVerticalExaggeration, lastViewFOV, lastViewHeading, lastViewPitch, LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_SOLID, terrainConformance
-
-
Constructor Summary
Constructors Constructor Description LatLonGraticuleLayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddLabel(double value, java.lang.String labelType, java.lang.String graticuleType, double resolution, LatLon labelOffset)protected voidclear(DrawContext dc)protected voidclearTiles()java.lang.StringgetAngleFormat()Get the graticule division and angular display format.protected java.lang.String[]getOrderedTypes()protected java.lang.StringgetTypeFor(double resolution)protected java.util.ArrayList<LatLonGraticuleLayer.GraticuleTile>getVisibleTiles(DrawContext dc)protected voidinitRenderingParams()protected java.lang.StringmakeAngleLabel(Angle angle, double resolution)protected voidselectRenderables(DrawContext dc)Select the visible grid elementsvoidsetAngleFormat(java.lang.String format)Sets the graticule division and angular display format.-
Methods inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer
addRenderable, computeAltitudeAboveGround, computeLabelOffset, computeTerrainConformance, computeTruncatedSegment, createLineRenderable, doPreRender, doRender, getDeltaLongitude, getGraticuleLineColor, getGraticuleLineStyle, getGraticuleLineWidth, getLabelColor, getLabelFont, getRenderingParams, getRestorableState, getSurfacePoint, greatCircleIntersectionAtLatitude, greatCircleIntersectionAtLongitude, greatCircleMidPoint, isDrawGraticule, isDrawLabels, needsToUpdate, removeAllRenderables, renderGraticule, restoreState, setDrawGraticule, setDrawLabels, setGraticuleLineColor, setGraticuleLineStyle, setGraticuleLineWidth, setLabelColor, setLabelFont, setRenderingParams
-
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer
createLayerConfigElements, dispose, doPick, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMaxEffectiveAltitude, getMinActiveAltitude, getMinEffectiveAltitude, getName, getOpacity, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerConfigDocument, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Field Detail
-
GRATICULE_LATLON_LEVEL_0
public static final java.lang.String GRATICULE_LATLON_LEVEL_0
- See Also:
- Constant Field Values
-
GRATICULE_LATLON_LEVEL_1
public static final java.lang.String GRATICULE_LATLON_LEVEL_1
- See Also:
- Constant Field Values
-
GRATICULE_LATLON_LEVEL_2
public static final java.lang.String GRATICULE_LATLON_LEVEL_2
- See Also:
- Constant Field Values
-
GRATICULE_LATLON_LEVEL_3
public static final java.lang.String GRATICULE_LATLON_LEVEL_3
- See Also:
- Constant Field Values
-
GRATICULE_LATLON_LEVEL_4
public static final java.lang.String GRATICULE_LATLON_LEVEL_4
- See Also:
- Constant Field Values
-
GRATICULE_LATLON_LEVEL_5
public static final java.lang.String GRATICULE_LATLON_LEVEL_5
- See Also:
- Constant Field Values
-
MIN_CELL_SIZE_PIXELS
protected static final int MIN_CELL_SIZE_PIXELS
- See Also:
- Constant Field Values
-
gridTiles
protected LatLonGraticuleLayer.GraticuleTile[][] gridTiles
-
latitudeLabels
protected java.util.ArrayList<java.lang.Double> latitudeLabels
-
longitudeLabels
protected java.util.ArrayList<java.lang.Double> longitudeLabels
-
-
Method Detail
-
getAngleFormat
public java.lang.String getAngleFormat()
Get the graticule division and angular display format. Can be one ofAngle.ANGLE_FORMAT_DDorAngle.ANGLE_FORMAT_DMS.- Returns:
- the graticule division and angular display format.
-
setAngleFormat
public void setAngleFormat(java.lang.String format)
Sets the graticule division and angular display format. Can be one ofAngle.ANGLE_FORMAT_DD,Angle.ANGLE_FORMAT_DMSofAngle.ANGLE_FORMAT_DM.- Parameters:
format- the graticule division and angular display format.- Throws:
java.lang.IllegalArgumentException- isformatis null.
-
initRenderingParams
protected void initRenderingParams()
-
getOrderedTypes
protected java.lang.String[] getOrderedTypes()
-
getTypeFor
protected java.lang.String getTypeFor(double resolution)
-
clear
protected void clear(DrawContext dc)
- Overrides:
clearin classAbstractGraticuleLayer
-
selectRenderables
protected void selectRenderables(DrawContext dc)
Select the visible grid elements- Overrides:
selectRenderablesin classAbstractGraticuleLayer- Parameters:
dc- the currentDrawContext.
-
getVisibleTiles
protected java.util.ArrayList<LatLonGraticuleLayer.GraticuleTile> getVisibleTiles(DrawContext dc)
-
clearTiles
protected void clearTiles()
-
makeAngleLabel
protected java.lang.String makeAngleLabel(Angle angle, double resolution)
-
addLabel
protected void addLabel(double value, java.lang.String labelType, java.lang.String graticuleType, double resolution, LatLon labelOffset)
-
-