|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjaron.google.GoogleEarthKMLProvider
public class GoogleEarthKMLProvider
The GoogleEarthKMLProvider
class provides a KLM structure
containing a GPS track and its information. The structure can be requested
by Google Earth via a HTTP connection.
The track information that is contained in the KML structure is collected
from a GPS provider/device that supports the TrackpointListener
interface.
By opening the following KML file, Google Earth starts polling the HTTP
server every 2 seconds and displays the real time tracking information.
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <NetworkLink> <name>UAV Playground Network Link</name> <Link> <href>http://127.0.0.1:8080/</href> <refreshMode>onInterval</refreshMode> <refreshInterval>2</refreshInterval> </Link> </NetworkLink> </kml>
Field Summary | |
---|---|
static java.lang.String |
ALTITUDE_MODE_ABSOLUTE
A preset value to be used with the setTrackAltitudeMode method. |
static java.lang.String |
CLAMP_TO_GROUND
A preset value to be used with the setTrackAltitudeMode method. |
static int |
DEFAULT_PORT
The default port 8080 that is used for the HTTP server. |
static java.lang.String |
RELATIVE_TO_GROUND
A preset value to be used with the setTrackAltitudeMode method. |
Constructor Summary | |
---|---|
GoogleEarthKMLProvider()
Creates a new GoogleEarthKMLProvider and starts its HTTP
server through which the KML tracking data is provided. |
|
GoogleEarthKMLProvider(int port)
Creates a new GoogleEarthKMLProvider and starts its HTTP
server through which the KML tracking data is provided. |
Method Summary | |
---|---|
java.lang.String |
getKML()
Returns the KML track information. |
void |
setPlacemarkAltitudeMode(java.lang.String placemarkAltitudeMode)
Sets the KML placemarks altitude mode. |
void |
setTrackAltitudeMode(java.lang.String trackAltitudeMode)
Sets the KML track altitude mode. |
void |
setWritePlacemaks(java.lang.Boolean flag)
Sets the placemaks write flag. |
void |
setWriteTrack(java.lang.Boolean flag)
Sets the track write flag. |
void |
trackpointChanged(Trackpoint trackpoint)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ALTITUDE_MODE_ABSOLUTE
setTrackAltitudeMode
method.
public static final java.lang.String CLAMP_TO_GROUND
setTrackAltitudeMode
method.
public static final java.lang.String RELATIVE_TO_GROUND
setTrackAltitudeMode
method.
public static final int DEFAULT_PORT
Constructor Detail |
---|
public GoogleEarthKMLProvider(int port)
GoogleEarthKMLProvider
and starts its HTTP
server through which the KML tracking data is provided.
port
- the port to be used for the HTTP connectionpublic GoogleEarthKMLProvider()
GoogleEarthKMLProvider
and starts its HTTP
server through which the KML tracking data is provided.
Method Detail |
---|
public void setWriteTrack(java.lang.Boolean flag)
flag
- true if the track information should part of the KML outputpublic void setWritePlacemaks(java.lang.Boolean flag)
flag
- true if the placemaks should part of the KML outputpublic void setTrackAltitudeMode(java.lang.String trackAltitudeMode)
trackAltitudeMode
- a KML <altitudeMode> valuepublic void setPlacemarkAltitudeMode(java.lang.String placemarkAltitudeMode)
placemarkAltitudeMode
- a KML <altitudeMode> valuepublic java.lang.String getKML()
TrackpointListener
interface.
public void trackpointChanged(Trackpoint trackpoint)
trackpointChanged
in interface TrackpointListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |