Static Public Member Functions | |
static void | addItinerary (ArrayList< StopOffPoint > pointArr, String itineraryName, int maxTime) throws GeneralException |
Creates itinerary and fills it with items from array of waypoints. More... | |
static void | addItinerary (String itineraryJson, String itineraryName, int maxTime) throws GeneralException |
Creates itinerary from JSON string. More... | |
static void | setRoute (String itineraryName, int flags, int maxTime) throws NavigationException |
Computes route based on given itinerary, and it starts navigation when there is a valid GPS signal, otherwise it waits for a valid signal. More... | |
static void | addEntryToItinerary (String itineraryName, StopOffPoint stopOffPoint, int index, int maxTime) throws GeneralException |
Adds new waypoint to taken itinerary. More... | |
static void | deleteEntryInItinerary (String itineraryName, int index, int maxTime) throws GeneralException |
Deletes waypoint from itinerary at taken position. More... | |
static void | deleteItinerary (String itineraryName, int maxTime) throws GeneralException |
Deletes taken itinerary. More... | |
static ArrayList< StopOffPoint > | getItineraryList (String itineraryName, int maxTime) throws GeneralException |
Returns list of waypoints in itinerary. More... | |
static void | skipNextWaypoint (int maxTime) throws GeneralException |
Skips the next waypoint. More... | |
static boolean | optimizeRoute (int maxTime) throws GeneralException |
Optimizes route comprised of waypoints. More... | |
static String | calculateRoute (String route, int maxTime) throws GeneralException |
|
static |
Adds new waypoint to taken itinerary.
itineraryName | Name of itinerary where new item will be added. |
stopOffPoint | model.StopOffPoint instance which contains information about waypoint to be added to itinerary. |
index | Index of position where new waypoint will be inserted. |
maxTime | Maximum time (in milliseconds) the function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), Api.getService(), and StopOffPoint.writeBundle().
|
static |
Creates itinerary and fills it with items from array of waypoints.
pointArr | ArrayList of model.StopOffPoint items which will be inserted into itinerary. |
itineraryName | Itinerary name. |
maxTime | Maximum time (in milliseconds) the function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), Api.getService(), and StopOffPoint.writeBundle().
|
static |
Creates itinerary from JSON string.
itineraryJson | Itinerary in JSON format. |
itineraryName | Itinerary name. |
maxTime | Maximum time (in milliseconds) the function can take. If maxTime=0 function execution is not time limited. |
GeneralException | GeneralException#getCode() |
References Api.getInstance(), and Api.getService().
|
static |
References Api.getInstance(), and Api.getService().
|
static |
Deletes waypoint from itinerary at taken position.
itineraryName | Name of itinerary where item will be deleted. |
index | Index in itinerary list which defines which waypoint will be deleted. |
maxTime | Maximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), and Api.getService().
|
static |
Deletes taken itinerary.
itineraryName | Name of itinerary to delete. |
maxTime | Maximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), and Api.getService().
|
static |
Returns list of waypoints in itinerary.
itineraryName | >Name of itinerary from which waypoints will be retrieved. If the name of itinerary is "default", function returns the list of waypoints from current route. |
maxTime | Maximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), Api.getService(), and StopOffPoint.readBundle().
|
static |
Optimizes route comprised of waypoints.
maxTime | Maximum time (in milliseconds) the function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), and Api.getService().
|
static |
Computes route based on given itinerary, and it starts navigation when there is a valid GPS signal, otherwise it waits for a valid signal.
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. |
NavigationException | the navigation exception |
Example
This code starts computing route from the itinerary MyItin. When computed route contains toll roads, navigation asks user to avoid them. If toll roads can not be avoided, navigation notifies user about this.
String strItineraryName = "MyItin"; int flags = ApiNavigation.MESSAGE_AVOID_TOLL_ROADS_ENABLE; int maxTime = 3000; ApiItinerary.setRoute(strItineraryName, flags, maxTime);
References Api.getInstance(), and Api.getService().
|
static |
Skips the next waypoint.
maxTime | Maximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited. |
GeneralException | the general exception |
References Api.getInstance(), and Api.getService().