|
static GpsPosition | getActualGpsPosition (boolean satInfo, int maxTime) throws GpsException |
| Returns informations about actual GPS position. More...
|
|
static RouteInfo | getRouteInfo (boolean extended, int maxTime) throws GeneralException |
| Returns informations about computed route. More...
|
|
static void | startNavigation (WayPoint location, int flags, boolean searchAddress, int maxTime) throws NavigationException |
| Starts navigation to a given location. More...
|
|
static void | startNavigation (WayPoint location, int flags, boolean searchAddress, RouteComputeSettings rcs, int maxTime) throws NavigationException |
| Starts navigation to a given location. More...
|
|
static void | stopNavigation (int maxTime) throws GeneralException |
| Stops navigation and the current route is canceled. More...
|
|
static void | navigateToAddress (String strAddress, boolean postal, int flags, int maxTime) throws NavigationException |
| Computes route from actual GPS position to taken target and starts navigate to taken address. More...
|
|
static void | loadComputedRoute (String routePath, int maxTime) throws GeneralException |
| Loads a pre-computed route from a file and starts navigation following that route. More...
|
|
static void | loadComputedRoute (String routePath, int startWpId, int maxTime) throws GeneralException |
| Loads a pre-computed route from a file and starts navigation following that route. More...
|
|
static void | saveComputedRoute (String routePath, int maxTime) throws GeneralException |
| Saves the current route in navigation to a file. More...
|
|
static void | loadOFGRoute (String routePath, int startFromIndex, int flags, int maxTime) throws GeneralException |
| Loads an offroad guided route (OFG) and starts navigation following that route. More...
|
|
static String | getOFGRouteStatus (int maxTime) throws GeneralException |
| Gets the status of currently loaded guided (OFG) route in JSON format. More...
|
|
static void | saveOFGRoute (String fileName, int fromIndex, Position fromPos, int toIndex, Position toPos, int maxTime) throws GeneralException |
| Saves sub-route of currently loaded guided (OFG) route. More...
|
|
|
static final int | ASK_DELETE_ROUTE = 0x00000002 |
| NpAskDeleteRoute commands Navigation to ask user to delete computed route. More...
|
|
static final int | MESSAGE_AVOID_MOTORWAYS_ENABLE = 0x00000004 |
| NpMessageAvoidMotorwaysUnable commands Navigation to notice user that not all motorways can be avoided. More...
|
|
static final int | MESSAGE_AVOID_TOLL_ROADS_ENABLE = 0x00000008 |
| NpMessageAvoidTollRoadsUnable commands Navigation to notice user that not all toll roads can be avoided. More...
|
|
static final int | MESSAGE_AVOID_FERRIES_ENABLE = 0x00000010 |
| NpMessageAvoidFerriesUnable commands Navigation to notice user that not all ferries can be avoided. More...
|
|
static final int | MESSAGE_ROUTE_ENABLE = 0x00000020 |
| NpMessageRouteUnable commands Navigation to notice user that route can not be computed. More...
|
|
static final int | MESSAGE_WAYPOINTS_DISTANT = 0x00000040 |
| NpMessageWaypointsDistant commands Navigation to notice user that route can not be computed because of too big distance between start and destination points. More...
|
|
static final int | FLAG_OFG_DEFAULT = 0x00000000 |
| commands navigation to load OFG route and switch to offroad mode. More...
|
|
static final int | FLAG_OFG_SHOW_ONLY = 0x00000001 |
| commands navigation to show OFG route on map, but it will not switch to offroad mode and progress of guided route will not be computed. More...
|
|
static void navigateToAddress |
( |
String |
strAddress, |
|
|
boolean |
postal, |
|
|
int |
flags, |
|
|
int |
maxTime |
|
) |
| throws NavigationException |
|
static |
Computes route from actual GPS position to taken target and starts navigate to taken address.
- Parameters
-
strAddress | Specifies address of route target. Address must be in "ISO,city/ZIP, street, house number" format |
postal | Flag determining whether second address parameter represents city or ZIP code.
-
true - ZIP code
-
false - City
|
flags | Determines route computing properties. |
maxTime | Maximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited. |
Example:
int flags = DriveNavigation.MESSAGE_AVOID_TOLL_ROADS;
boolean searchAddress = true;
boolean postal = false;
String strAddress = "SVK,Bratislava,Einsteinova,1";
int maxTime = 10000;
ApiNavigation.navigateToAddress(strAddress, postal, flags, maxTime);
- Exceptions
-
NavigationException | the navigation exception |
References Api.getInstance(), and Api.getService().
Starts navigation to a given location.
- Parameters
-
location | model.WayPoint instance which contains information about target. |
flags | Determines route computing properties. |
searchAddress | Flag determining whether ApiHistory.getHistoryList(boolean, int) searches for address or not.
-
StartNavigation fills address member of each model.HistoryRecord with corresponding address
-
StartNavigation does not search for address
|
maxTime | the max time |
- Exceptions
-
NavigationException | the navigation exception |
Example:
WayPoint location = new WayPoint();
int flags;
boolean searchAddress;
Position pos = new Position();
String strAddress = "SVK,Bratislava,Einsteinova,1";
int maxTime;
ApiNavigation.locationFromAddress(pos, strAddress, maxTime);
WayPoint wp = new WayPoint(strAddress, pos.getX(), pos.getY());
flags = NavigationParams.NpMessageAvoidTollRoadsUnable;
searchAddress = true;
maxTime = 10000;
ApiNavigation.startNavigation(wp, flags, searchAddress, maxTime);
References Api.getInstance(), Api.getService(), and WayPoint.writeBundle().
Starts navigation to a given location.
- Parameters
-
location | model.WayPoint instance which contains information about target. |
flags | Determines route computing properties. |
searchAddress | Flag determining whether ApiHistory#getHistoryList(boolean, int) searches for address or not.
-
StartNavigation fills address member of each model.HistoryRecord with corresponding address
-
StartNavigation does not search for address
|
maxTime | the max time |
rcs | special route computing settings |
- Exceptions
-
NavigationException | the navigation exception |
Example:
WayPoint location = new WayPoint();
int flags;
boolean searchAddress;
Position pos = new Position();
String strAddress = "SVK,Bratislava,Einsteinova,1";
int maxTime;
ApiNavigation.locationFromAddress(pos, strAddress, maxTime);
WayPoint wp = new WayPoint(strAddress, pos.getX(), pos.getY());
flags = NavigationParams.NpMessageAvoidTollRoadsUnable;
searchAddress = true;
maxTime = 10000;
ApiNavigation.startNavigation(wp, flags, searchAddress, maxTime);
References Api.getInstance(), Api.getService(), RouteComputeSettings.writeBundle(), and WayPoint.writeBundle().