|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.yaina.trackrenderer.TileCollection
de.yaina.trackrenderer.TileCanvas
de.yaina.trackrenderer.DrawCanvas
de.yaina.trackrenderer.MapCanvas
public class MapCanvas
A mercator-projected tiled map to draw positions on
Constructor Summary | |
---|---|
MapCanvas(int tileDimX,
int tileDimY,
int zoom)
Create a tiled map for a certain zoom level |
Method Summary | |
---|---|
void |
drawLine(double lat1,
double lon1,
double lat2,
double lon2,
byte colour,
int pixmap)
Draw a line on the map. |
int |
getZoom()
Get the zoom level of this map |
double |
lat_to_merkator_y(double lat)
Calculate the mercator projected latitude |
int |
lat_to_tile_y(double lat)
Calculate the vertical tile number from the latitude |
int |
lat_to_y(double lat)
Calculate the vertical position on the tile |
double |
lon_to_merkator_x(double lon)
Calculate the mercator projected longitude |
int |
lon_to_tile_x(double lon)
Calculate the horizontal tile number from the longitude |
int |
lon_to_x(double lon)
Calculate the horizontal position on the tile |
TileCoordinates |
positionToPoint(double lat,
double lon)
Convert a WGT84 position to a points on the map |
void |
setPoint(double lat,
double lon,
byte colour,
int pixmap)
Set a point on the map |
double |
tile_x_to_lon(int x)
Calculate the longitude of the upper-left corner of a tile |
double |
tile_y_to_lat(int y)
Calculate the latitude of the upper-left corner of a tile |
Methods inherited from class de.yaina.trackrenderer.DrawCanvas |
---|
drawLine, setPoint |
Methods inherited from class de.yaina.trackrenderer.TileCanvas |
---|
getPoint, setPoint |
Methods inherited from class de.yaina.trackrenderer.TileCollection |
---|
getCollection, getDimensionX, getDimensionY, getImage, getTile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapCanvas(int tileDimX, int tileDimY, int zoom)
tileDimX
- horizontal size of a tiletileDimY
- vertical size of a tilezoom
- zoom levelMethod Detail |
---|
public int getZoom()
public double tile_x_to_lon(int x)
x
- tile number
public double tile_y_to_lat(int y)
y
-
public double lon_to_merkator_x(double lon)
lon
- longitude
public double lat_to_merkator_y(double lat)
lat
- latitude
public int lat_to_tile_y(double lat)
lat
- latitude
public int lon_to_tile_x(double lon)
lon
- longitude
public int lon_to_x(double lon)
lon
- longitude
public int lat_to_y(double lat)
lat
- latitude
public TileCoordinates positionToPoint(double lat, double lon)
lat
- latitudelon
- longitude
public void setPoint(double lat, double lon, byte colour, int pixmap)
lat
- latitudelon
- longitudecolour
- colour indexpixmap
- point stylepublic void drawLine(double lat1, double lon1, double lat2, double lon2, byte colour, int pixmap)
lat1
- latitude of start coordinatelon1
- longitude of start coordinatelat2
- latitude of end coordinatelon2
- latitude of end coordinatecolour
- colour indexpixmap
- line style
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |