|
static void | addItinerary (ArrayList< StopOffPoint > pointArr, String itineraryName, int maxTime) throws GeneralException |
| Creates itinerary and fills it with the items from PointArr. More...
|
|
static void | setRoute (String itineraryName, int flags, int maxTime) throws NavigationException |
| Computes route based on the given itinerary, and if the navigation has a valid GPS signal it starts navigation. More...
|
|
static void | setRoute (String itineraryName, int flags, boolean closedDelivery, int maxTime) throws NavigationException |
|
static void | addEntryToItinerary (String itineraryName, StopOffPoint stopOffPoint, int index, int maxTime) throws GeneralException |
| Adds new waypoint to the given itinerary. More...
|
|
static void | deleteEntryInItinerary (String itineraryName, int index, int maxTime) throws GeneralException |
| Deletes the waypoint from itinerary at the given position. More...
|
|
static void | deleteItinerary (String itineraryName, int maxTime) throws GeneralException |
| Deletes the given itinerary. More...
|
|
static ArrayList< StopOffPoint > | getItineraryList (String itineraryName, int maxTime) throws GeneralException |
| Returns the list of waypoints of the itinerary. More...
|
|
static void | skipNextWaypoint (int maxTime) throws GeneralException |
| Skips the next waypoint. More...
|
|
static void setRoute |
( |
String |
itineraryName, |
|
|
int |
flags, |
|
|
int |
maxTime |
|
) |
| throws NavigationException |
|
static |
Computes route based on the given itinerary, and if the navigation has a valid GPS signal it starts navigation.
- Parameters
-
itineraryName | Name of the itinerary which will be used to compute route. |
flags | Parameter flags determines route computing properties. |
maxTime | Maximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited. Notes:
If Navigation does not have a valid GPS signal, first waypoint in itinerary must be marked as START.
Parameter flags determines some route computing properties. Possible values are enumerated in ApiNavigation class. For example it is possible to ask user to avoid toll roads or (later) notify user that not all toll roads can be avoided.
To join more flags together use logical or operator (|).
Itinerary used to compute route must contain item of type "finish". If you do not have valid GPS position itinerary must contain also item of type "start". |
Example:
String strItineraryName = "MyItin";
int nflags = NavigationParams.NpMessageAvoidTollRoadsUnable;
int maxTime = 10000;
ApiItinerary.setRoute(strItineraryName, nflags, maxTime);
This code starts computing route according to itinerary
MyItin. If computed route contains toll roads, Navigation asks
user to avoid them. If toll roads can not be avoided,
Navigation notify user about this.
- Exceptions
-
References Api.getInstance(), and Api.getService().