|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eightmotions.map.Track
public class Track
A Track represnt a combination of Waypoints (Marker) and
and a list of points.
Tracks are saved and loaded through RMS or through external
input stream...
Do not use directly constructor, use the factory calls instead:
Track.getTrack()
Track can be statics, just loaded once and displayed, or dynamic, and be reloaded if needed, usually
because the visible part of the map
| Field Summary | |
|---|---|
float[] |
alts
|
int[] |
coordSeg
The track itself in pixel ccordinates. |
float[] |
courses
|
static int |
currRecord
|
boolean |
isInit
|
java.util.Vector |
listPlaces
The list of "Waypoints" of this track. |
boolean |
m_autoDisplay
|
static int |
m_curRate
current sampling rate, in seconds... |
static MarkerStyle |
m_defaultMarkerStyle
|
MarkerStyle |
m_markerStyle
The default location type when a point is created in this track. |
java.lang.String |
m_name
The name of this Track. |
int |
m_refreshType
|
static int |
REFRESH_MODE_NONE
True if the track need to be notified when visible area change (onyl called if track is displayed |
static int |
REFRESH_MODE_ON_CHANGE
|
static int |
REFRESH_MODE_ON_INTERVAL
|
byte[] |
savedTrack
|
static int |
sizeElem
The internal header size used when writing with RMS. |
static int |
sizeHeader
|
float[] |
speeds
|
long[] |
times
If altitude datas are present, this is not null |
static java.util.Vector |
tracks
List of tracks. |
static int |
TYPE_EXPORT_GPX
Used for exporting tracks, define an export in GPX format. |
static int |
TYPE_EXPORT_KML
Used for exporting tracks, define an export in GoogleEarth/KML format. |
| Constructor Summary | |
|---|---|
protected |
Track(javax.microedition.lcdui.Display d,
javax.microedition.lcdui.Displayable reference,
java.io.InputStream is,
java.lang.String inInfo)
|
protected |
Track(javax.microedition.lcdui.Display d,
int inRmsId)
|
protected |
Track(javax.microedition.lcdui.Display d,
java.lang.String name)
|
protected |
Track(javax.microedition.lcdui.Display d,
java.lang.String inUrl,
java.lang.String inInfo,
MapDisplay inCanvas)
|
| Method Summary | |
|---|---|
void |
addMarker(Marker newLoc)
Add one location to display in the track |
void |
addRecord(oneGPSPos newLoc)
|
static void |
addTrack(Track t)
Add an existing track to the list of Track. |
void |
clear()
Clear all content of track... |
void |
delete()
Delete this track. |
void |
error(int inErrorCode)
|
void |
export(java.io.OutputStream os,
int typeExport)
Export the Track to an output stream. |
boolean |
fireOpened(Marker theLoc)
|
void |
fireSelected(Marker theLoc)
|
int |
getNbWayPoints()
|
int |
getSizeTrack()
|
long |
getTimeStamp()
|
int[] |
getTrack()
|
static Track |
getTrack(javax.microedition.lcdui.Display d,
javax.microedition.lcdui.Displayable reference,
java.io.InputStream is,
java.lang.String inInfo)
|
static Track |
getTrack(javax.microedition.lcdui.Display d,
java.lang.String name)
Create and get an empty track. |
static Track |
getTrack(javax.microedition.lcdui.Display d,
java.lang.String inUrl,
java.lang.String inInfo,
MapDisplay inMap)
Create and get a track to be loaded from a specific URL |
java.util.Vector |
getWaypoints()
|
static void |
initTracks()
Init thr track list: open the RMS, read the saved track and add them into the global list of tracks. |
boolean |
inputStream(java.io.InputStream is,
javax.microedition.io.HttpConnection cnx)
implemented for notifyLoadURL |
boolean |
lineRead(URLFetcher f,
java.lang.String inLine)
|
void |
loaded(URLFetcher f)
|
protected void |
loadHeader()
Load the header (from RMS) of the track. |
void |
loadTrack()
|
boolean |
parse(org.kxml2.io.KXmlParser parser)
|
protected long |
readLong(byte[] b,
int off,
int length)
|
void |
refreshTrack(MapDisplay m_map)
|
static void |
removeTrack(Track t)
Delete and remove a track from the list of tracks... |
void |
saveTrack()
|
protected void |
sendGPX(java.io.OutputStream os)
|
protected void |
sendKML(java.io.OutputStream os)
|
java.lang.String |
sendTrack(java.lang.String theUrl)
Post track to an url |
static void |
setGlobalNotifier(TrackNotifier tn)
Set the global notifier |
void |
setName(java.lang.String inName)
|
void |
setNotifier(TrackNotifier tn)
Set the notifier to this track only |
void |
setTrackListener(TrackListener inListener)
|
void |
setUrl(java.lang.String inUrl,
MapDisplay inMap)
set the current url of the track. |
protected static void |
writeLong(byte[] b,
int off,
int length,
long data)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean isInit
public int[] coordSeg
public long[] times
public float[] alts
public float[] courses
public float[] speeds
public static MarkerStyle m_defaultMarkerStyle
public MarkerStyle m_markerStyle
public java.lang.String m_name
public java.util.Vector listPlaces
public byte[] savedTrack
public boolean m_autoDisplay
public static final int sizeElem
public static final int sizeHeader
public static int currRecord
public static int m_curRate
public static java.util.Vector tracks
public static final int TYPE_EXPORT_KML
public static final int TYPE_EXPORT_GPX
public static final int REFRESH_MODE_NONE
public static final int REFRESH_MODE_ON_CHANGE
public static final int REFRESH_MODE_ON_INTERVAL
public int m_refreshType
| Constructor Detail |
|---|
protected Track(javax.microedition.lcdui.Display d,
java.lang.String inUrl,
java.lang.String inInfo,
MapDisplay inCanvas)
d - inUrl - inInfo -
protected Track(javax.microedition.lcdui.Display d,
java.lang.String name)
protected Track(javax.microedition.lcdui.Display d,
int inRmsId)
protected Track(javax.microedition.lcdui.Display d,
javax.microedition.lcdui.Displayable reference,
java.io.InputStream is,
java.lang.String inInfo)
| Method Detail |
|---|
public static Track getTrack(javax.microedition.lcdui.Display d,
java.lang.String name)
d - the current displayname - the new name of the track
public static Track getTrack(javax.microedition.lcdui.Display d,
java.lang.String inUrl,
java.lang.String inInfo,
MapDisplay inMap)
d - the current display or null if you don't want to display anythinginUrl - the URL to load the track frominInfo - the information to be displayed to the user...inMap - : a referance to the canvas to display the URL. Used to "localize" the URL with the current area if needed
public static Track getTrack(javax.microedition.lcdui.Display d,
javax.microedition.lcdui.Displayable reference,
java.io.InputStream is,
java.lang.String inInfo)
public static void addTrack(Track t)
t: - the track to be added.
protected long readLong(byte[] b,
int off,
int length)
protected static void writeLong(byte[] b,
int off,
int length,
long data)
public void setUrl(java.lang.String inUrl,
MapDisplay inMap)
public void export(java.io.OutputStream os,
int typeExport)
os - the output streal to export the tracktypeExport - the type of the export ( TYPE_EXPORT_GPX or TYPE_EXPORT_KML )public static void initTracks()
protected void loadHeader()
public void clear()
public boolean inputStream(java.io.InputStream is,
javax.microedition.io.HttpConnection cnx)
inputStream in interface NotifyLoadURLpublic boolean parse(org.kxml2.io.KXmlParser parser)
public void error(int inErrorCode)
error in interface NotifyLoadURLpublic void loaded(URLFetcher f)
loaded in interface NotifyLoadURL
public boolean lineRead(URLFetcher f,
java.lang.String inLine)
lineRead in interface NotifyLoadURLpublic static void setGlobalNotifier(TrackNotifier tn)
tn - public void setNotifier(TrackNotifier tn)
tn - public java.lang.String sendTrack(java.lang.String theUrl)
public void loadTrack()
public int[] getTrack()
public java.util.Vector getWaypoints()
protected void sendKML(java.io.OutputStream os)
protected void sendGPX(java.io.OutputStream os)
public void saveTrack()
public void addMarker(Marker newLoc)
public void addRecord(oneGPSPos newLoc)
public void delete()
public void setName(java.lang.String inName)
public int getSizeTrack()
public int getNbWayPoints()
public long getTimeStamp()
public static void removeTrack(Track t)
t - public void refreshTrack(MapDisplay m_map)
public void setTrackListener(TrackListener inListener)
public void fireSelected(Marker theLoc)
public boolean fireOpened(Marker theLoc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||