|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.map.Layer
com.esri.map.GraphicsLayer
com.esri.map.GPSLayer
public final class GPSLayer

This purpose of this layer is to display location from a IGPSWatcher. This layer can
be created using a default serial port watcher (GPSLayer()) or using a custom watcher
(GPSLayer(IGPSWatcher)).
This layer
GPSEventListener to the associated IGPSWatcher to track changes. JMap.IGPSWatcher after the JMap is ready.NOTE:
Currently only 1 GPSLayer per process is supported.
| Nested Class Summary | |
|---|---|
static class |
GPSLayer.Mode
GPS modes. |
| Nested classes/interfaces inherited from class com.esri.map.Layer |
|---|
Layer.LayerStatus |
| Field Summary |
|---|
| Fields inherited from class com.esri.map.Layer |
|---|
_credentials, _progress, _resolutionList, serviceInfo |
| Constructor Summary | |
|---|---|
GPSLayer()
Creates a GPSLayer() with a serial-port GPS watcher. |
|
GPSLayer(IGPSWatcher gpsWatcher)
Creates a GPSLayer() with the specified watcher. |
|
| Method Summary | |
|---|---|
boolean |
autoFocus()
Deprecated. Instead, use getMode().
Auto-focus is replaced by GPSLayer.Mode.AUTOPAN. |
int |
getAutoFocusBoundary()
Returns the value that is used to calculate the virtual boundary for auto-focus. |
GPSLayer.Mode |
getMode()
Returns the current mode. |
double |
getNavigationPointHeightFactor()
Factor that determines the position of the GPS relative to the screen along the vertical axis of the map's center. 0 represents the bottom edge and 1 represents the top, incremented uniformly. |
void |
recycle()
Releases resources referenced by the Layer so that they can be recycled. |
void |
setAutoFocus(boolean autoFocus)
Deprecated. Instead, use setMode(Mode) with GPSLayer.Mode.AUTOPAN. |
void |
setAutoFocusBoundary(int autoFocusBoundary)
Sets the value used to calculate the virtual boundary for auto-focus. |
void |
setLocationSymbol(MarkerSymbol symbol)
Changes the symbol to indicate the location. |
void |
setMode(GPSLayer.Mode mode)
Sets the current mode. |
void |
setNavigationPointHeightFactor(double navigationPointHeightFactor)
Sets the factor that determines the position of the GPS relative to the screen along the vertical axis of the map's center. 0 represents the bottom edge and 1 represents the top, incremented uniformly. |
void |
setShowStatus(boolean showStatus)
This flag controls the display of the status of the IGPSWatcher. |
void |
setShowTrackPoints(boolean showTrackPoints)
This flag controls the display of every location recorded by the IGPSWatcher. |
void |
setShowTrail(boolean showTrail)
This flag controls the display of the path traced by the IGPSWatcher |
void |
setStatusSymbol(TextSymbol symbol)
Changes the symbol to indicate the status. |
void |
setTrackPointSymbol(MarkerSymbol symbol)
Changes the symbol to indicate the track points. |
void |
setTrailSymbol(LineSymbol symbol)
Changes the symbol to indicate the trail. |
boolean |
showStatus()
Returns whether the display of status is enabled. |
boolean |
showTrackPoints()
Returns whether the display of track points is enabled. |
boolean |
showTrail()
Returns whether the display of trail is enabled. |
protected void |
updateSpatialReferenceStatus(int SRStatus)
This method is a callback from the native code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPSLayer()
GPSLayer() with a serial-port GPS watcher.
The watcher will throw a runtime exception if there are no serial ports with GPS device.
public GPSLayer(IGPSWatcher gpsWatcher)
GPSLayer() with the specified watcher.
gpsWatcher - a IGPSWatcher. The layer tries to add a listener to the
IGPSWatcher. So it is required that the watcher is not running.
NullPointerException - if the input is null.
RuntimeException - if the watcher is running.| Method Detail |
|---|
public GPSLayer.Mode getMode()
GPSLayer.Mode.AUTOPAN.
setMode(Mode)public void setMode(GPSLayer.Mode mode)
GPSLayer.Mode.OFF or GPSLayer.Mode.AUTOPAN, the map's North is restored to top.
Default mode is GPSLayer.Mode.AUTOPAN.
mode - the mode to be set.getMode(),
setNavigationPointHeightFactor(double),
setAutoFocusBoundary(int)public boolean autoFocus()
getMode().
Auto-focus is replaced by GPSLayer.Mode.AUTOPAN.
setAutoFocus(boolean),
setAutoFocusBoundary(int),
getAutoFocusBoundary()public void setAutoFocus(boolean autoFocus)
setMode(Mode) with GPSLayer.Mode.AUTOPAN.
IGPSWatcher goes out of current extent, the extent of the map will be reset with
current location as the center.
autoFocus - flag to turn on/off auto-focus.autoFocus(),
setLocationSymbol(MarkerSymbol)public double getNavigationPointHeightFactor()
setNavigationPointHeightFactor(double)public void setNavigationPointHeightFactor(double navigationPointHeightFactor)
GPSLayer.Mode.NAVIGATION.
navigationPointHeightFactor - factor value.
IllegalArgumentException - if the input value is less than 0 or greater than 1.getNavigationPointHeightFactor()public int getAutoFocusBoundary()
setAutoFocusBoundary(int)public void setAutoFocusBoundary(int autoFocusBoundary)
GPSLayer.Mode.AUTOPAN.
autoFocusBoundary - percentage of the extent's width and height that will be used
to calculate the virtual boundary.
IllegalArgumentException - if the input value is less than 1 or greater than 49.getAutoFocusBoundary()public boolean showStatus()
setShowStatus(boolean)public void setShowStatus(boolean showStatus)
IGPSWatcher. The status is
not displayed when the status is GPSStatus.RUNNING.
showStatus - flag to turn on/off the status display.showStatus(),
setStatusSymbol(TextSymbol)public boolean showTrail()
setShowTrail(boolean)public void setShowTrail(boolean showTrail)
IGPSWatcher
showTrail - flag to turn on/off the trail.showTrail(),
setTrailSymbol(LineSymbol)public boolean showTrackPoints()
setShowTrackPoints(boolean)public void setShowTrackPoints(boolean showTrackPoints)
IGPSWatcher.
showTrackPoints - flag to turn on/off track points.showTrackPoints(),
setTrackPointSymbol(MarkerSymbol)public void setLocationSymbol(MarkerSymbol symbol)
symbol - a non-null symbol to be used for location.public void setStatusSymbol(TextSymbol symbol)
symbol - a non-null symbol to be used for status.setShowStatus(boolean)public void setTrackPointSymbol(MarkerSymbol symbol)
symbol - a non-null symbol to be used for track points.setShowTrackPoints(boolean)public void setTrailSymbol(LineSymbol symbol)
symbol - a non-null symbol to be used for trail.setShowTrail(boolean)protected void updateSpatialReferenceStatus(int SRStatus)
updateSpatialReferenceStatus in class Layerpublic void recycle()
Layer
recycle in class GraphicsLayer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||