public class MapGpsLogic
extends java.lang.Object
Copyright 2005-2009 Partner Software, Inc.
| Constructor and Description |
|---|
MapGpsLogic(MapApp app) |
| Modifier and Type | Method and Description |
|---|---|
void |
autodraw()
Performs an autodraw action.
|
void |
editGpsSettings() |
XyPoint |
forwardProject(double longitude,
double latitude)
Convenience method that just forwards to app.getSpace().getCoordinateSystem().forwardProject().
|
XyPoint |
forwardProject(LonlatPoint lonlat)
Convenience method that just forwards to app.getSpace().getCoordinateSystem().forwardProject().
|
GPSState |
getGpsState()
Returns a projected GPSState.
|
GPSReading |
getLastReading()
Returns a projected GPSReading.
|
Projection |
getProjection()
Figuring out the projection is a little complicated
because we have to be backwards compatible with previous
versions of 4.0.
|
java.lang.String |
getProjectionName()
Works exactly like getProjection(), except it returns a
human-readable name.
|
protected void |
initialize() |
boolean |
isAddingWithGps()
If true, GPS auto-drawing is enabled.
|
boolean |
isFollowingGps() |
boolean |
isGpsEnabled() |
boolean |
isGpsOpen()
Returns true if there is a configured, active GPS device.
|
boolean |
isRotatingWithGps() |
LonlatPoint |
reverseProject(double x,
double y)
Convenience method that just forwards to app.getSpace().getCoordinateSystem().reverseProject().
|
LonlatPoint |
reverseProject(XyPoint xy)
Convenience method that just forwards to app.getSpace().getCoordinateSystem().reverseProject().
|
void |
setAddingWithGps(boolean addingWithGps)
Setting this to true turns on GPS auto-drawing functionality, subject the the auto-draw granularity.
|
void |
setFollowingGps(boolean followingGps) |
void |
setRotatingWithGps(boolean rotatingWithGps) |
void |
whereAmI() |
public MapGpsLogic(MapApp app)
protected void initialize()
public void autodraw()
public void editGpsSettings()
public void whereAmI()
public GPSReading getLastReading()
public GPSState getGpsState()
public Projection getProjection()
The translator writes out projection settings as part of the background mapset. These settings are configured in the translator and were originally used by the Palm map viewer.
However, the projection settings for the background mapset were never used by 4.0. Instead, each seat was configured with its own projection setting.
In 4.4 prior to 4.4.7, we used those parameters from the background mapset. This proved dangerous since it complicated precision and datum shift issues and required coordination of configuration between 3.7 and 4.4.7 even if the translator itself wasn't doing any projection.
Now, projections are configured in the mapspace file CoordinateSystem.xml.
If all else fails, returns a do-nothing projection. Never returns null.
public java.lang.String getProjectionName()
public boolean isGpsEnabled()
public boolean isFollowingGps()
public void setFollowingGps(boolean followingGps)
public boolean isAddingWithGps()
public void setAddingWithGps(boolean addingWithGps)
addingWithGps - public boolean isRotatingWithGps()
public void setRotatingWithGps(boolean rotatingWithGps)
public boolean isGpsOpen()
public XyPoint forwardProject(double longitude, double latitude)
longitude - latitude - public XyPoint forwardProject(LonlatPoint lonlat)
longitude - latitude - public LonlatPoint reverseProject(double x, double y)
longitude - latitude - public LonlatPoint reverseProject(XyPoint xy)
longitude - latitude -