|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
gov.nasa.worldwind.layers.WorldMapLayer
public class WorldMapLayer
Displays a world map overlay with a current position crosshair in a screen corner. Supports picking at a position on the map.
Field Summary |
---|
Fields inherited from class gov.nasa.worldwind.layers.AbstractLayer |
---|
screenCredit |
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
---|
changeSupport |
Constructor Summary | |
---|---|
WorldMapLayer()
Displays a world map overlay with a current position crosshair in a screen corner |
|
WorldMapLayer(String iconFilePath)
Displays a world map overlay with a current position crosshair in a screen corner |
Method Summary | |
---|---|
void |
dispose()
|
void |
doPick(DrawContext dc,
Point pickPoint)
|
void |
doRender(DrawContext dc)
|
Color |
getBackgrounColor()
|
int |
getBorderWidth()
|
ArrayList<? extends LatLon> |
getFootPrintPositions()
Get the current view footprint position list. |
String |
getIconFilePath()
Returns the layer's current icon file path. |
double |
getIconScale()
Returns the icon scale factor. |
Vec4 |
getLocationCenter()
Returns the current worldmap image location. |
Vec4 |
getLocationOffset()
Returns the current location offset. |
String |
getPosition()
Returns the current relative world map icon position. |
String |
getResizeBehavior()
Returns the world map icon's resize behavior. |
boolean |
getShowFootprint()
|
double |
getToViewportScale()
Returns the layer's world map-to-viewport scale factor. |
void |
setBackgroundColor(Color color)
|
void |
setBorderWidth(int borderWidth)
Sets the world map icon offset from the viewport border. |
void |
setIconFilePath(String iconFilePath)
Sets the world map icon's image location. |
void |
setIconScale(double iconScale)
Sets the scale factor defining the displayed size of the world map icon relative to the icon's width and height in its image file. |
void |
setLocationCenter(Vec4 locationCenter)
Specifies the screen location of the worldmap image, relative to the image's center. |
void |
setLocationOffset(Vec4 locationOffset)
Specifies a placement offset from the worldmap's position on the screen. |
void |
setPosition(String position)
Sets the relative viewport location to display the world map icon. |
void |
setResizeBehavior(String resizeBehavior)
Sets the behavior the layer uses to size the world map icon when the viewport size changes, typically when the World Wind window is resized. |
void |
setShowFootprint(boolean state)
|
void |
setToViewportScale(double toViewportScale)
Sets the scale factor applied to the viewport size to determine the displayed size of the world map icon. |
String |
toString()
|
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
---|
doPreRender, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit |
Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
---|
propertyChange |
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 class java.lang.Object |
---|
clone, equals, finalize, 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 java.beans.PropertyChangeListener |
---|
propertyChange |
Constructor Detail |
---|
public WorldMapLayer()
public WorldMapLayer(String iconFilePath)
iconFilePath
- the world map image path and filenameMethod Detail |
---|
public void dispose()
dispose
in interface Disposable
dispose
in class AbstractLayer
public void doPick(DrawContext dc, Point pickPoint)
doPick
in class AbstractLayer
public void doRender(DrawContext dc)
doRender
in class AbstractLayer
public Color getBackgrounColor()
public int getBorderWidth()
public ArrayList<? extends LatLon> getFootPrintPositions()
public String getIconFilePath()
public double getIconScale()
setIconScale(double)
for a description of the scale factor.
public Vec4 getLocationCenter()
public Vec4 getLocationOffset()
public String getPosition()
public String getResizeBehavior()
public boolean getShowFootprint()
public double getToViewportScale()
public void setBackgroundColor(Color color)
public void setBorderWidth(int borderWidth)
borderWidth
- the number of pixels to offset the world map icon from the borders indicated by setPosition(String)
.public void setIconFilePath(String iconFilePath)
iconFilePath
- the path to the icon's image filepublic void setIconScale(double iconScale)
setToViewportScale(double)
and the current viewport size.
iconScale
- the icon scale factorpublic void setLocationCenter(Vec4 locationCenter)
locationCenter
- the location center. May be null.#setPosition, #setLocationOffset
public void setLocationOffset(Vec4 locationOffset)
locationOffset
- the number of pixels to shift the worldmap image from its specified screen position. A
positive X value shifts the image to the right. A positive Y value shifts the image up. If
null, no offset is applied. The default offset is null.#setLocationCenter, #setPosition
public void setPosition(String position)
position
- the desired world map positionpublic void setResizeBehavior(String resizeBehavior)
resizeBehavior
- the desired resize behaviorpublic void setShowFootprint(boolean state)
public void setToViewportScale(double toViewportScale)
toViewportScale
- the world map to viewport scale factorpublic String toString()
toString
in class AbstractLayer
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |