. All rights reserved.
Use is subject to license terms, see
LICENSE.txt.
Field Summary |
static int |
DEFVAL
Default value for parameters. |
static long |
EpocOffset
Offset in milliseconds between the OZI Epoc and the Unix Epoc. |
static double |
UNKALT
Value for an unknown altitude. |
static String |
VERSION
com.oziexplorer.OziAPI version. |
Method Summary |
static int |
addMapComment(MapComment comment)
Create a MapComment at the specified Position with the
specified parameters. |
static int |
addMapFeature(MapFeature feature)
Add a MapFeature at the specified position. |
static void |
addTrackPoint(int trackNum,
TrackPoint point)
Add a TrackPoint to a track. |
static int |
addWaypoint(Waypoint waypoint)
Add a Waypoint to the map. |
static void |
centerMapAtPosition(Position position)
Center map at position. |
static void |
centerMapAtPositionWithMark(Position position)
Center map at position, with mark. |
static void |
clearAllTracks()
Clear all tracks from the map. |
static void |
clearEvents()
Clear all events from the map. |
static void |
clearMapComments()
Clear all MapComment s from the map. |
static void |
clearMapFeatures()
Clear all MapFeature s. |
static void |
clearPoints()
Clear all points from the map. |
static void |
clearRoutes()
Clear all routes from the map. |
static void |
clearTrack(int trackNum)
Clear the specified track number from the map. |
static void |
clearWaypoints()
Clear all Waypoint from the map. |
static void |
closeProgram()
Close OziExplorer. |
static Position |
convertPositionToDatum(Position fromPosition,
String toDatum)
Convert between map datums. |
static GridRef |
convertPositionToGridRef(Position fromPosition,
Grid toGrid,
String toDatum,
UserGridDef userGrid)
Convert between a Position and a GridRef. |
static LatLon |
convertPositionToLatLon(Position fromPosition,
String toDatum)
Convert between a grid reference and lattitude/longitude. |
static void |
deleteMapComment(int num)
Delete a MapComment by number. |
static void |
deleteMapFeature(int number)
Delete a MapFeature . |
static void |
deleteWaypoint(int number)
Delete a Waypoint by number. |
static void |
deleteWaypoint(String name)
Delete a Waypoint by name. |
static void |
deleteWaypoint(Waypoint waypoint)
Delete the given Waypoint . |
static String |
findBestMap(Position position,
boolean subFolders,
String mapPath)
Find best map for position. |
static void |
findMapAtPosition(Position position)
Find map at position. |
static boolean |
findOzi()
Check if OziExplorer is running. |
static String |
getApiVersion()
Retrieve the OziAPI version number. |
static Elevation |
getElevation(Position position)
Get the elevation at the given the position. |
static String |
getExePath()
Retrieve the path of the OziExplorer executable (oziexp.exe). |
static String |
getMapDatum()
Get the datum of the loaded map. |
static String |
getMapFilePath()
Get the map file path setting in OziExplorer. |
static String |
getOziVersion()
Retrieve the OziExplorer version number. |
static XY |
getPixelXY(Position position)
Return the screen (x, y) coordinate representing the position. |
static int |
getWaypointNumberFromName(String name)
Get the Waypoint number given the waypoint name. |
static int |
getWinACP()
Return the Windows active code page. |
static NavigationData |
GPSToNavigationWaypoint()
From the current GPS position return the name, description, distance
and bearing to the Waypoint being navigated to. |
static void |
hideAllTracks()
Hide all tracks on the map. |
static void |
hideTrack(int trackNum)
Hide a track on the map. |
static boolean |
isPositionOnMap(Position position)
Check if position on map. |
static void |
loadMap(String mapName)
Load a map file. |
static void |
loadPointFile(int pointSetNum,
String fileName)
Load a point file. |
static void |
loadRouteFile(String fileName)
Load a route file. |
static void |
loadTrackFile(int trackNum,
String fileName)
Load a track file. |
static void |
loadWaypointFile(String fileName)
Load a waypoint file. |
static void |
mapDoubleClickOff()
Disable map double-clicks. |
static void |
mapDoubleClickOn(MapClickCallback callback)
Enable map double-clicks. |
static void |
mapSingleClickOff()
Disable map single-clicks. |
static void |
mapSingleClickOn(MapClickCallback callback)
Enable map single-clicks. |
static void |
objectClickOff()
Disable map object clicks. |
static void |
objectClickOn(ObjectClickCallback callback)
Enable map object clicks. |
static void |
oedometer1Down()
Set oedometer 1 to decrement. |
static void |
oedometer1Off()
Disable oedometer 1. |
static void |
oedometer1On(OedometerCallback callback)
Enable oedometer 1. |
static void |
oedometer1Reset()
Reset oedometer 1 to zero. |
static void |
oedometer1Set(double distance)
Set oedometer 1 to a specific distance, in metres. |
static void |
oedometer1Up()
Set oedometer 1 to increment. |
static void |
oedometer2Down()
Set oedometer 2 to decrement. |
static void |
oedometer2Off()
Disable oedometer 2. |
static void |
oedometer2On(OedometerCallback callback)
Enable oedometer 2. |
static void |
oedometer2Reset()
Reset oedometer 2 to zero. |
static void |
oedometer2Set(double distance)
Set oedometer 2 to a specific distance, in metres. |
static void |
oedometer2Up()
Set oedometer 2 to increment. |
static void |
refreshMap()
Redraw the map screen. |
static int |
registerStatus()
Check the OziExplorer registration status. |
static void |
repositionMapComment(int num,
Position position)
Reposition a MapComment . |
static void |
repositionMapFeature(int number,
Position position)
The MapFeature referred to by the specified number is
repositioned to the specified Position . |
static void |
repositionWaypoint(int number,
Position position)
Reposition a Waypoint . |
static void |
repositionWaypoint(Waypoint waypoint,
Position position)
Reposition a Waypoint . |
static void |
saveMap(String mapName)
Save a map file. |
static void |
saveMapFlag(boolean flag)
Toggle map saved flag. |
static void |
saveMapImage(String fileName)
Save map image. |
static void |
savePointFlag(boolean flag)
Toggle points saved flag. |
static void |
saveRouteFlag(boolean flag)
Toggle the routes saved flag. |
static void |
saveTrackFile(int trackNum,
String fileName)
Save a track file. |
static void |
saveTrackFlag(int trackNum,
boolean flag)
Set a track's saved flag. |
static void |
saveWaypointFile(String fileName)
Save a waypoint file. |
static void |
saveWaypointFlag(boolean flag)
Toggle waypoints saved flag. |
static void |
sendMovingMapPositionOff()
Turn off the sending of moving map data. |
static void |
sendMovingMapPositionOn(MovingMapCallback callback)
Turn on moving map callbacks. |
static void |
sendMovingMapString(String NMEAString)
Send NMEA strings to OziExplorer. |
static void |
setTimeout(int timeout)
This sets the API timeout value (in milliseconds). |
static void |
setTrackColor(int trackNum,
int color)
Set a track's color. |
static void |
setTrackDescription(int trackNum,
String description)
Specify the description for a track. |
static void |
setTrackType(int trackNum,
TrackType type)
Specify a track's TrackType . |
static void |
setTrackWidth(int trackNum,
int trackWidth)
Set a track's width in pixels. |
static void |
showAllTracks()
Show all tracks on the map. |
static void |
showTrack(int trackNum)
Turn on the display of the specified track. |
static void |
startMovingMapAPI()
Start moving map in OziExplorer. |
static void |
startMovingMapSerial()
Start moving map in OziExplorer. |
static void |
stopMovingMap()
Turn off the moving map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION
public static final String VERSION
- com.oziexplorer.OziAPI version.
- See Also:
- Constant Field Values
DEFVAL
public static final int DEFVAL
- Default value for parameters.
- See Also:
- Constant Field Values
UNKALT
public static final double UNKALT
- Value for an unknown altitude.
- See Also:
- Constant Field Values
EpocOffset
public static final long EpocOffset
- Offset in milliseconds between the OZI Epoc and the Unix Epoc.
- See Also:
- Constant Field Values
setTimeout
public static void setTimeout(int timeout)
throws OziException
- This sets the API timeout value (in milliseconds). The default is 5000
msec. This is the length of time the API waits before it returns if it
has not received acknowledgement of the command from OziExplorer, the
acknowledgement is sent after the command has been done. This can cause
your software to appear to freeze as it waits. In some cases a long
timeout is not required, it is suggested the timeout be set to a small
value (say 200 msec). Example - checking if OziExplorer is running using
the oziFindOzi function does not require a long timeout.
- Parameters:
timeout
- timeout in milliseconds
- Throws:
OziException
- if OziAPI returns an error.
getApiVersion
public static String getApiVersion()
throws OziException
- Retrieve the OziAPI version number.
- Returns:
- the version number of OziAPI.
- Throws:
OziException
- if OziAPI returns an error.
getOziVersion
public static String getOziVersion()
throws OziException
- Retrieve the OziExplorer version number.
- Returns:
- the OziExplorer version number.
- Throws:
OziException
- if OziAPI returns an error.
getExePath
public static String getExePath()
throws OziException
- Retrieve the path of the OziExplorer executable (oziexp.exe).
- Returns:
- the path of the OziExplorer executable.
- Throws:
OziException
- if OziAPI returns an error.
closeProgram
public static void closeProgram()
throws OziException
- Close OziExplorer.
- Throws:
OziException
- if OziAPI returns an error.
findOzi
public static boolean findOzi()
throws OziException
- Check if OziExplorer is running.
- Returns:
- true if OziExplorer is running, false if it is not.
- Throws:
OziException
- if OziAPI returns an error.
registerStatus
public static int registerStatus()
throws OziException
- Check the OziExplorer registration status.
- Returns:
- 0 if it is the shareware version, 1 if it is the trial version
and 2 if it is the registered version.
- Throws:
OziException
- if OziAPI returns an error.
refreshMap
public static void refreshMap()
throws OziException
- Redraw the map screen. Some commands require that you call the
refreshMap command so OziExplorer will redraw the map to display the
changed data. Example - if you add a track point the new point will not
be drawn unless you call the refreshMap command.
- Throws:
OziException
- if OziAPI returns an error.
getMapFilePath
public static String getMapFilePath()
throws OziException
- Get the map file path setting in OziExplorer. Useful if you want to use
the
findBestMap(com.oziexplorer.Position, boolean, java.lang.String)
command and want to search the map file path.
- Returns:
- the map file path setting in OziExplorer.
- Throws:
OziException
- if OziAPI returns an error.
getMapDatum
public static String getMapDatum()
throws OziException
- Get the datum of the loaded map.
- Returns:
- the datum of the loaded map.
- Throws:
OziException
- if OziAPI returns an error.
convertPositionToDatum
public static Position convertPositionToDatum(Position fromPosition,
String toDatum)
throws OziException
- Convert between map datums. The datum names must be from the list of
Datums in OziExplorer (althought not case sensitive). The returned
Position will be a LatLon if fromPosition was a LatLon and a GridRef if
fromPosition was a LatLon.
- Parameters:
fromPosition
- Position to be convertedtoDatum
- new map datum.
- Returns:
- the converted Position as a LatLon object.
- Throws:
OziException
- if OziAPI returns an error.
convertPositionToGridRef
public static GridRef convertPositionToGridRef(Position fromPosition,
Grid toGrid,
String toDatum,
UserGridDef userGrid)
throws OziException
- Convert between a Position and a GridRef. The type of GridRef object
returned will depend on the
Grid
specified by
toGrid
:
toGrid == UTM -> UTMGridRef
toGrid == TMU -> UserGridRef
toGrid == BNG -> BNGGridRef
toGrid == -> GridRef
- Parameters:
fromPosition
- Position
to be converted.toGrid
- Grid
the coordinates are to be converted to.toDatum
- datum the coordinates are to be converted to.userGrid
- only valid if toGrid
is a user grid -
Grid.TM_USER
, in which case it holds the user grid definition.
For all other grid types it should be null.
- Returns:
- The converted position as a GridRef.
- Throws:
OziException
- if OziAPI returns an error.
convertPositionToLatLon
public static LatLon convertPositionToLatLon(Position fromPosition,
String toDatum)
throws OziException
- Convert between a grid reference and lattitude/longitude.
- Parameters:
fromPosition
- Position
to be converted.toDatum
- datum of the converted lattitude/longitude.
- Returns:
- the converted
LatLon
.
- Throws:
OziException
- if OziAPI returns an error.
getElevation
public static Elevation getElevation(Position position)
throws OziException
- Get the elevation at the given the position.
- Parameters:
position
- the Position
the altitude is required for.
- Returns:
- the
Elevation
of the lat, lon.
- Throws:
OziException
- if OziAPI returns an error.
getPixelXY
public static XY getPixelXY(Position position)
throws OziException
- Return the screen (x, y) coordinate representing the position.
- Parameters:
position
- the Position
the (x, y) coordinates are required
for.
- Returns:
- the
coordinate
for the screen coordinates
- Throws:
OziException
- if OziAPI returns an error.
mapSingleClickOn
public static void mapSingleClickOn(MapClickCallback callback)
throws OziException
- Enable map single-clicks. When turned on OziExplorer will return the
single map clicks by calling
MapClickCallback.mapClickCallback(MapClickType, Point, LatLon,
UTMGridRef)
- Parameters:
callback
- the MapClickCallback
object.
- Throws:
OziException
- if OziAPI returns an error.
mapSingleClickOff
public static void mapSingleClickOff()
throws OziException
- Disable map single-clicks.
- Throws:
OziException
- if OziAPI returns an error.
mapDoubleClickOn
public static void mapDoubleClickOn(MapClickCallback callback)
throws OziException
- Enable map double-clicks. When turned on OziExplorer will return the
double map clicks by calling
MapClickCallback.mapClickCallback(MapClickType, Point, LatLon,
UTMGridRef)
- Parameters:
callback
- the MapClickCallback
object.
- Throws:
OziException
- if OziAPI returns an error.
mapDoubleClickOff
public static void mapDoubleClickOff()
throws OziException
- Disable map double-clicks.
- Throws:
OziException
- if OziAPI returns an error.
objectClickOn
public static void objectClickOn(ObjectClickCallback callback)
throws OziException
- Enable map object clicks. When turned ON OziExplorer will return the
double map clicks by calling
ObjectClickCallback.objectClickCallback(ObjectClickType, LatLon,
UTMGridRef, String)
- Parameters:
callback
- the ObjectClickCallback
object.
- Throws:
OziException
- if OziAPI returns an error.
objectClickOff
public static void objectClickOff()
throws OziException
- Disable map object clicks.
- Throws:
OziException
- if OziAPI returns an error.
loadMap
public static void loadMap(String mapName)
throws OziException
- Load a map file. Specify the full path and name of the file.
- Parameters:
mapName
- the path name of the map file to load.
- Throws:
OziException
- if OziAPI returns an error.
saveMap
public static void saveMap(String mapName)
throws OziException
- Save a map file. If the
mapName
is empty the map file is
saved using its current name. If the mapName
is not empty
the map file is saved using the specified name.
- Parameters:
mapName
- the path of the map file to save.
- Throws:
OziException
- if OziAPI returns an error.
saveMapFlag
public static void saveMapFlag(boolean flag)
throws OziException
- Toggle map saved flag. If flag is true then the map loaded into
OziExplorer is assumed to be saved and the user will not be prompted to
save it when a new map is loaded or OziExplorer is closed.
- Parameters:
flag
- the map saved flag.
- Throws:
OziException
- if OziAPI returns an error.
findMapAtPosition
public static void findMapAtPosition(Position position)
throws OziException
- Find map at position. The available maps will be scanned and a list of
maps presented for selection (within OziExplorer), the map will be
centered on the specified position and a mark added at the position
(a bullseye).
- Parameters:
position
- the Position
to locate maps for.
- Throws:
OziException
- if OziAPI returns an error.
centerMapAtPosition
public static void centerMapAtPosition(Position position)
throws OziException
- Center map at position. The map will be centered at the specified
position.
- Parameters:
position
- the Position
to centre at.
- Throws:
OziException
- if OziAPI returns an error.
centerMapAtPositionWithMark
public static void centerMapAtPositionWithMark(Position position)
throws OziException
- Center map at position, with mark. The map will be centered at the
specified position and a mark added at the position (a bullseye).
- Parameters:
position
- the Position
to centre at.
- Throws:
OziException
- if OziAPI returns an error.
isPositionOnMap
public static boolean isPositionOnMap(Position position)
throws OziException
- Check if position on map. Returns true if the position is on the current
map and false if it is not on the map. Useful to create a moving map in
OziExplorer without using the OziExplorer built in moving map function.
- Parameters:
position
- the Position
to check.
- Returns:
- true if the position is on the current map.
- Throws:
OziException
- if OziAPI returns an error.
findBestMap
public static String findBestMap(Position position,
boolean subFolders,
String mapPath)
throws OziException
- Find best map for position. Will return the best (most detailed) map it
finds which matches the position. Useful to create a moving map in
OziExplorer without using the OziExplorer built in moving map functions.
- Parameters:
position
- the Position
to check.subFolders
- if false, do not search subfolders; if true, search
subfolders.mapPath
- the path to search, use the
getMapFilePath()
command if you want the map file path
setting.
- Returns:
- the name of the best map.
- Throws:
OziException
- if OziAPI returns an error.
saveMapImage
public static void saveMapImage(String fileName)
throws OziException
- Save map image.
- Parameters:
fileName
- the name of the file to save the map image to (.png or
.bmp extensions can be used). Note - some licensed image formats cannot
be saved.
- Throws:
OziException
- if OziAPI returns an error.
getWaypointNumberFromName
public static int getWaypointNumberFromName(String name)
throws OziException
- Get the
Waypoint
number given the waypoint name. Will return the
first waypoint number which matches the name, or 0 if not found.
- Parameters:
name
- the Waypoint
name.
- Returns:
- the waypoint number, or 0.
- Throws:
OziException
- if OziAPI returns an error.
deleteWaypoint
public static void deleteWaypoint(String name)
throws OziException
- Delete a
Waypoint
by name. Will delete the first waypoint it
finds with the specified name.
- Parameters:
name
- the name of the Waypoint
to delete.
- Throws:
OziException
- if OziAPI returns an error.
deleteWaypoint
public static void deleteWaypoint(int number)
throws OziException
- Delete a
Waypoint
by number.
- Parameters:
number
- the number of the Waypoint
to delete.
- Throws:
OziException
- if OziAPI returns an error.
deleteWaypoint
public static void deleteWaypoint(Waypoint waypoint)
throws OziException
- Delete the given
Waypoint
. The matching is done by name.
- Parameters:
waypoint
- theWaypoint
to delete.
- Throws:
OziException
- if OziAPI returns an error.
clearWaypoints
public static void clearWaypoints()
throws OziException
- Clear all
Waypoint
from the map.
- Throws:
OziException
- if OziAPI returns an error.
addWaypoint
public static int addWaypoint(Waypoint waypoint)
throws OziException
- Add a
Waypoint
to the map. Adds a waypoint at the specified
position using the information from the passed Waypoint
. The
return value is the internal OziExplorer number of the waypoint created.
This number may need to be stored locally if the waypoint is to be
manipulated later in your program.
- Parameters:
waypoint
- the Waypoint
to add to the map.
- Returns:
- the number of the new waypoint.
- Throws:
OziException
- if OziAPI returns an error.
loadWaypointFile
public static void loadWaypointFile(String fileName)
throws OziException
- Load a waypoint file. Specify the full path and name of the file.
- Parameters:
fileName
- the pathname of the waypoint file.
- Throws:
OziException
- if OziAPI returns an error.
saveWaypointFile
public static void saveWaypointFile(String fileName)
throws OziException
- Save a waypoint file. Specify the full path and name of the file.
- Parameters:
fileName
- the pathname of the waypoint file.
- Throws:
OziException
- if OziAPI returns an error.
saveWaypointFlag
public static void saveWaypointFlag(boolean flag)
throws OziException
- Toggle waypoints saved flag. If flag is true then the waypoints loaded
into OziExplorer are assumed to be saved and the user will not be
prompted to save it when a new waypoint file is loaded or OziExplorer is
closed.
- Parameters:
flag
- the value of the saved flag.
- Throws:
OziException
- if OziAPI returns an error.
repositionWaypoint
public static void repositionWaypoint(int number,
Position position)
throws OziException
- Reposition a
Waypoint
. The waypoint pointed to by the specified
number is repositioned to the specified position. The waypoint number is
returned when a new waypoint is created via the API.
- Parameters:
number
- the Waypoint
number to reposition.position
- the new position for the waypoint.
- Throws:
OziException
- if OziAPI returns an error.
repositionWaypoint
public static void repositionWaypoint(Waypoint waypoint,
Position position)
throws OziException
- Reposition a
Waypoint
. The waypoint is repositioned to the
specified position. The waypoint number is returned when a new waypoint
is created via the API.
- Parameters:
waypoint
- the Waypoint
to be repositioned.position
- the new position for thr waypoint.
- Throws:
OziException
- if OziAPI returns an error.
clearRoutes
public static void clearRoutes()
throws OziException
- Clear all routes from the map.
- Throws:
OziException
- if OziAPI returns an error.
saveRouteFlag
public static void saveRouteFlag(boolean flag)
throws OziException
- Toggle the routes saved flag. If flag is true then the routes loaded
into OziExplorer are assumed to be saved and the user will not be
prompted to save them when a new route file is loaded or OziExplorer is
closed.
- Parameters:
flag
- the 'saved' flag value.
- Throws:
OziException
- if OziAPI returns an error.
loadRouteFile
public static void loadRouteFile(String fileName)
throws OziException
- Load a route file. Specify the full path and name of the file.
- Parameters:
fileName
- the pathname of the route file.
- Throws:
OziException
- if OziAPI returns an error.
clearPoints
public static void clearPoints()
throws OziException
- Clear all points from the map.
- Throws:
OziException
- if OziAPI returns an error.
savePointFlag
public static void savePointFlag(boolean flag)
throws OziException
- Toggle points saved flag. If flag is true then the points loaded into
OziExplorer are assumed to be saved and the user will not be prompted to
save them when a new point file is loaded or OziExplorer is closed.
- Parameters:
flag
- the 'saved' flag value
- Throws:
OziException
- if OziAPI returns an error.
loadPointFile
public static void loadPointFile(int pointSetNum,
String fileName)
throws OziException
- Load a point file.
- Parameters:
pointSetNum
- the point set to load the points into.fileName
- the pathname of the point file.
- Throws:
OziException
- if OziAPI returns an error.
clearEvents
public static void clearEvents()
throws OziException
- Clear all events from the map.
- Throws:
OziException
- if OziAPI returns an error.
clearAllTracks
public static void clearAllTracks()
throws OziException
- Clear all tracks from the map.
- Throws:
OziException
- if OziAPI returns an error.
clearTrack
public static void clearTrack(int trackNum)
throws OziException
- Clear the specified track number from the map.
- Parameters:
trackNum
- the number of the track to clear.
- Throws:
OziException
- if OziAPI returns an error.
showAllTracks
public static void showAllTracks()
throws OziException
- Show all tracks on the map.
- Throws:
OziException
- if OziAPI returns an error.
hideAllTracks
public static void hideAllTracks()
throws OziException
- Hide all tracks on the map.
- Throws:
OziException
- if OziAPI returns an error.
showTrack
public static void showTrack(int trackNum)
throws OziException
- Turn on the display of the specified track. Note - track display must be
turned on as well. Except for track 1, all tracks are initially turned
off so the use of this command is necessary if you are adding track
oints to a track.
- Parameters:
trackNum
- the track number to show.
- Throws:
OziException
- if OziAPI returns an error.
hideTrack
public static void hideTrack(int trackNum)
throws OziException
- Hide a track on the map.
- Parameters:
trackNum
- the track number to hide.
- Throws:
OziException
- if OziAPI returns an error.
addTrackPoint
public static void addTrackPoint(int trackNum,
TrackPoint point)
throws OziException
- Add a
TrackPoint
to a track. Don't forget to turn on the
individual track using showTrack(int)
and display all tracks using
showAllTracks()
.
- Parameters:
trackNum
- the number of the track (1 .. 75).
line from the last point.point
- the TrackPoint
to add to the track.
- Throws:
OziException
- if OziAPI returns an error.
setTrackDescription
public static void setTrackDescription(int trackNum,
String description)
throws OziException
- Specify the description for a track.
- Parameters:
trackNum
- the track number to set the description for.description
- the track description.
- Throws:
OziException
- if OziAPI returns an error.
setTrackType
public static void setTrackType(int trackNum,
TrackType type)
throws OziException
- Specify a track's
TrackType
.
- Parameters:
trackNum
- the track number to set the type for.type
- the TrackType
.
- Throws:
OziException
- if OziAPI returns an error.
setTrackWidth
public static void setTrackWidth(int trackNum,
int trackWidth)
throws OziException
- Set a track's width in pixels.
- Parameters:
trackNum
- the track number to set the width for.trackWidth
- the track width.
- Throws:
OziException
- if OziAPI returns an error.
setTrackColor
public static void setTrackColor(int trackNum,
int color)
throws OziException
- Set a track's color.
- Parameters:
trackNum
- the track number to set the color of.color
- the RGB track color.
- Throws:
OziException
- if OziAPI returns an error.
loadTrackFile
public static void loadTrackFile(int trackNum,
String fileName)
throws OziException
- Load a track file.
- Parameters:
trackNum
- the track number to load into.fileName
- the pathname of the track points file.
- Throws:
OziException
- if OziAPI returns an error.
saveTrackFile
public static void saveTrackFile(int trackNum,
String fileName)
throws OziException
- Save a track file.
- Parameters:
trackNum
- the track number to save.fileName
- the pathname of the track points file.
- Throws:
OziException
- if OziAPI returns an error.
saveTrackFlag
public static void saveTrackFlag(int trackNum,
boolean flag)
throws OziException
- Set a track's saved flag. If flag is true then the track loaded into
OziExplorer is assumed to be saved and the user will not be prompted to
save it when a new track file is loaded or OziExplorer is closed.
- Parameters:
trackNum
- the track number to set the flag for.flag
- the 'saved' flag value.
- Throws:
OziException
- if OziAPI returns an error.
clearMapFeatures
public static void clearMapFeatures()
throws OziException
- Clear all
MapFeature
s. If the map is saved after clearing the map
features there will be no map features saved in the .map file.
- Throws:
OziException
- if OziAPI returns an error.
addMapFeature
public static int addMapFeature(MapFeature feature)
throws OziException
- Add a
MapFeature
at the specified position.
- Parameters:
feature
- the MapFeature
to add.
- Returns:
- the number of the newly-created map feature.
- Throws:
OziException
- if OziAPI returns an error.
deleteMapFeature
public static void deleteMapFeature(int number)
throws OziException
- Delete a
MapFeature
.
- Parameters:
number
- the number of the MapFeature
to be deleted.
- Throws:
OziException
- if OziAPI returns an error.
repositionMapFeature
public static void repositionMapFeature(int number,
Position position)
throws OziException
- The
MapFeature
referred to by the specified number is
repositioned to the specified Position
. The map feature number
is returned.
- Parameters:
number
- the MapFeature
number.position
- the new Position
.
- Throws:
OziException
- if OziAPI returns an error.
clearMapComments
public static void clearMapComments()
throws OziException
- Clear all
MapComment
s from the map. If the map is saved after
clearing the map comments there will be no map comments saved in the
.map file.
- Throws:
OziException
- if OziAPI returns an error.
addMapComment
public static int addMapComment(MapComment comment)
throws OziException
- Create a
MapComment
at the specified Position
with the
specified parameters. The return value is the internal OziExplorer
number of the MapComment
created. This number may need to be
stored locally if the MapComment
is to be manipulated later in
your program.
- Parameters:
comment
- the MapComment
to add.
- Returns:
- the number of the new map comment.
- Throws:
OziException
- if OziAPI returns an error.
deleteMapComment
public static void deleteMapComment(int num)
throws OziException
- Delete a
MapComment
by number.
- Parameters:
num
- the number of the MapComment
to delete.
- Throws:
OziException
- if OziAPI returns an error.
repositionMapComment
public static void repositionMapComment(int num,
Position position)
throws OziException
- Reposition a
MapComment
.
- Parameters:
num
- the MapComment
to reposition.position
- the new Position
for the map comment.
- Throws:
OziException
- if OziAPI returns an error.
startMovingMapSerial
public static void startMovingMapSerial()
throws OziException
- Start moving map in OziExplorer. NMEA is expected on the serial port.
This is the same as starting moving map using OziExplorer's own menu
command.
- Throws:
OziException
- if OziAPI returns an error.
startMovingMapAPI
public static void startMovingMapAPI()
throws OziException
- Start moving map in OziExplorer. NMEA is expected to be sent using the
sendMovingMapString(String)
command.
- Throws:
OziException
- if OziAPI returns an error.
sendMovingMapString
public static void sendMovingMapString(String NMEAString)
throws OziException
- Send NMEA strings to OziExplorer. The strings must be one or more of the
supported types of NMEA strings. ($GPRMC, $GPGGA, $GPGLL, $ GPVTG).
- Parameters:
NMEAString
- the NMEA string to send.
- Throws:
OziException
- if OziAPI returns an error.
stopMovingMap
public static void stopMovingMap()
throws OziException
- Turn off the moving map.
- Throws:
OziException
- if OziAPI returns an error.
sendMovingMapPositionOn
public static void sendMovingMapPositionOn(MovingMapCallback callback)
throws OziException
- Turn on moving map callbacks. When turned on OziExplorer will return the
moving map data by calling the specified callback.
- Parameters:
callback
- the MovingMapCallback
object to call.
- Throws:
OziException
- if OziAPI returns an error.
sendMovingMapPositionOff
public static void sendMovingMapPositionOff()
throws OziException
- Turn off the sending of moving map data.
- Throws:
OziException
- if OziAPI returns an error.
GPSToNavigationWaypoint
public static NavigationData GPSToNavigationWaypoint()
throws OziException
- From the current GPS position return the name, description, distance
and bearing to the
Waypoint
being navigated to.
- Returns:
- a
NavigationData
object containing the requested data.
- Throws:
OziException
- if OziAPI returns an error.
oedometer1On
public static void oedometer1On(OedometerCallback callback)
throws OziException
- Enable oedometer 1. The Oedometer will be turned on and the distance
will be notified by callbacks to the
OedometerCallback
object.
- Parameters:
callback
- the callback object to be called.
- Throws:
OziException
- if OziAPI returns an error.
oedometer1Off
public static void oedometer1Off()
throws OziException
- Disable oedometer 1.
- Throws:
OziException
- if OziAPI returns an error.
oedometer1Reset
public static void oedometer1Reset()
throws OziException
- Reset oedometer 1 to zero.
- Throws:
OziException
- if OziAPI returns an error.
oedometer1Set
public static void oedometer1Set(double distance)
throws OziException
- Set oedometer 1 to a specific distance, in metres.
- Parameters:
distance
- the distance in metres.
- Throws:
OziException
- if OziAPI returns an error.
oedometer1Up
public static void oedometer1Up()
throws OziException
- Set oedometer 1 to increment.
- Throws:
OziException
- if OziAPI returns an error.
oedometer1Down
public static void oedometer1Down()
throws OziException
- Set oedometer 1 to decrement.
- Throws:
OziException
- if OziAPI returns an error.
oedometer2On
public static void oedometer2On(OedometerCallback callback)
throws OziException
- Enable oedometer 2. The Oedometer will be turned on and the distance
will be notified by callbacks to the
OedometerCallback
object.
- Parameters:
callback
- the callback object to be called.
- Throws:
OziException
- if OziAPI returns an error.
oedometer2Off
public static void oedometer2Off()
throws OziException
- Disable oedometer 2.
- Throws:
OziException
- if OziAPI returns an error.
oedometer2Reset
public static void oedometer2Reset()
throws OziException
- Reset oedometer 2 to zero.
- Throws:
OziException
- if OziAPI returns an error.
oedometer2Set
public static void oedometer2Set(double distance)
throws OziException
- Set oedometer 2 to a specific distance, in metres.
- Parameters:
distance
- the distance in metres.
- Throws:
OziException
- if OziAPI returns an error.
oedometer2Up
public static void oedometer2Up()
throws OziException
- Set oedometer 2 to increment.
- Throws:
OziException
- if OziAPI returns an error.
oedometer2Down
public static void oedometer2Down()
throws OziException
- Set oedometer 2 to decrement.
- Throws:
OziException
- if OziAPI returns an error.
getWinACP
public static int getWinACP()
- Return the Windows active code page.
- Returns:
- the Windows active code page.