|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.yaina.trackrenderer.TrackRender
public class TrackRender
The actual renderer. It reads a GPX file and writes the track on a collection of tiles.
Field Summary | |
---|---|
int |
DEFAULT_COLOUR
|
int |
DEFAULT_STYLE
|
int |
DEFAULT_TILE_SIZE
|
Constructor Summary | |
---|---|
TrackRender(java.lang.String tiledir,
int zoom)
Create a new renderer |
Method Summary | |
---|---|
MapCanvas |
createCanvas()
Create the canvas to draw on |
byte |
getColour()
Return the colour |
int |
getStyle()
Return the point/line style for this map |
int |
getTileXSize()
Return the horizontal tile size in pixel |
int |
getTileYSize()
Return the vertical tile size in pixel |
void |
renderMap(java.lang.String gpxfile)
Render a track from a GPX file |
void |
setColour(byte colour)
Set the colour index for the track |
void |
setStyle(int style)
Set the point/line style or marker type for this map |
void |
setTileSize(int size)
Set the horizontal and vertical tile size to the same value |
void |
setTileXSize(int dimx)
Set the horizontal tile size in pixel |
void |
setTileYSize(int dimy)
Set the vertical tile size in pixel |
void |
writeTiles(MapCanvas canvas)
Write the map to disk, as one PNG file per tile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int DEFAULT_TILE_SIZE
public final int DEFAULT_COLOUR
public final int DEFAULT_STYLE
Constructor Detail |
---|
public TrackRender(java.lang.String tiledir, int zoom)
tiledir
- where to store the generated tileszoom
- zoom level of the mapMethod Detail |
---|
public void writeTiles(MapCanvas canvas)
canvas
- the mappublic void setColour(byte colour)
colour
- colour indexpublic byte getColour()
public void setStyle(int style)
style
- point/line stylepublic int getStyle()
public void setTileXSize(int dimx)
dimx
- horizontal tile sizepublic int getTileXSize()
public void setTileYSize(int dimy)
dimy
- vertical tile sizepublic int getTileYSize()
public void setTileSize(int size)
size
- tile sizepublic MapCanvas createCanvas()
public void renderMap(java.lang.String gpxfile)
gpxfile
- path of the GPX file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |