|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--flatscapex.openmap.MapLayer
Draws a background map in Flatscape from CADRG files listed in a Table of Contents File.
The following is an example of the MAPLAYER tag needed to initialize this class:
| Field Summary | |
float |
baseScale
|
| Constructor Summary | |
MapLayer()
|
|
| Method Summary | |
java.lang.Object |
config(java.lang.Object parent,
org.w3c.dom.Element config)
Creates a cache to access the store the SubFrames needed to cover the current window. |
void |
drawMap(java.awt.Graphics2D g)
This is called from the Flatscape paint method. |
java.awt.geom.Point2D |
inverse(double screenY,
double screenX)
Use the current flatscape information and the current projection to find the Lat/Lon of a point that was picked on the screen. |
void |
resetCenter(flatscape.FCanvas.Info info)
Calculates the lat lon of the center of the screen after the user moves the map using the difference between the previous info and the current one. |
void |
setProj(flatscape.FCanvas.Info info)
Calculates the offset for rotation creates as stores new CADRG projection to draw the map and compute the inverse function. |
static java.lang.String |
truncate(java.lang.String numString,
int places)
Truncate a floating point number to have a given number of places after the decimal point. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final float baseScale
| Constructor Detail |
public MapLayer()
| Method Detail |
public java.lang.Object config(java.lang.Object parent,
org.w3c.dom.Element config)
throws java.lang.Exception
config in interface Configurableparent - the AbstractViewer object that uses this MapLayer to drawconfig - The DOM element representing the XML element that
loaded this class.
java.lang.Exception - Thrown if there is any problem configuring this class.public void drawMap(java.awt.Graphics2D g)
drawMap in interface FMapLayerg - Graphics to draw on the Flatscape window.public void resetCenter(flatscape.FCanvas.Info info)
resetCenter in interface FMapLayerinfo - the new Info structure from FCanvas.public void setProj(flatscape.FCanvas.Info info)
FMapLayer
setProj in interface FMapLayerinfo - the new Info structure from FCanvas.
public java.awt.geom.Point2D inverse(double screenY,
double screenX)
inverse in interface FMapLayerscreenY - the vertical distance from the 0,0 pointscreenX - the horizontal distance from the 0,0 point
public static java.lang.String truncate(java.lang.String numString,
int places)
numString - the original Stringplaces - the number of places after the decimal point
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||