Itinerary is an ordered sequence of waypoints that is the base for route calculations.
More...
A waypoint between start (first waypoint) and final destination (last waypoint) is called a destination or intermediate destination.
An itinerary for a navigation to a destination should contain the GPS position as first (use Waypoint.createCurrentGPSPosWaypoint() for this waypoint) and the destination as second or last waypoint.
◆ Itinerary() [1/2]
Create an empty itinerary.
- Returns
- An empty itinerary
◆ Itinerary() [2/2]
Creates a copy of the itinerary.
◆ appendWaypoint()
Append a copy of the given waypoint at the end of the itinerary.
- Parameters
-
- Returns
- Errorcode
◆ equals()
| boolean equals |
( |
Object |
o | ) |
|
|
inherited |
◆ getId()
- Returns
- Get the id of the itinerary.
◆ getName()
| native String getName |
( |
| ) |
|
- Returns
- Get the name of the itinerary.
◆ getWaypointIterator()
| native Iterable< Waypoint > getWaypointIterator |
( |
| ) |
|
- Returns
- iterator enumerating waypoints
◆ hasStartPoint()
| native boolean hasStartPoint |
( |
| ) |
|
Returns true, if the first waypoint is a GPS position
◆ insertWaypoint()
Insert a copy of the waypoint before the element at a specific position in the itinerary.
- Parameters
-
| wpt | - Waypoint to insert |
| index | - insert position |
- Returns
- Errorcode
◆ loadFromFile()
| native ApiError loadFromFile |
( |
String |
xmlFilename | ) |
|
Load an Itinerary from file. The format can be GPX, csv or MapTrip-internal XML. See Itinerary.saveToFile() If the itinerary is not empty, the loaded waypoints are append at the end. If you load the itinerary from a csv file and the csv file has only the columns "long" and "lat", every point of this file will be used. But if the csv file has the column "eventCode" too and if there are points with an eventCode=46000, only these points are used, the direction angle is set and the entire csv file is used as a reference route. If the csv file has the column "eventText", the name of the generated waypoint will be set by this optional column. You can get this name by Waypoint.getAliasName()
- Parameters
-
- Returns
- Errorcode
◆ removeAll()
Remove all waypoints from itinerary.
- Returns
- Errorcode
◆ removeAt()
Remove waypoint at specific position in itinerary.
- Parameters
-
- Returns
- Errorcode
◆ replaceWaypointAt()
Replace a waypoint at specific position with a copy of the given waypoint in the itinerary.
- Parameters
-
| wpt | - waypoint to insert |
| index | - replace position |
- Returns
- Errorcode
◆ saveToFile()
| native ApiError saveToFile |
( |
String |
xmlFilename, |
|
|
int |
indexStart, |
|
|
int |
indexEnd |
|
) |
| |
A generated itinerary is saved to the specified file on disk either in custom xml format. See Itinerary.loadFromFile()
- Parameters
-
| xmlFilename | - name of the desired file (use .xml ending to save in xml format or .gpx to store in GPX format) |
| indexStart | - defines the first waypoint that will be saved to the xml-file out of the current itinerary. |
| indexEnd | - defines the last waypoint that will be saved to the xml-file out of the current itinerary. |
- Returns
- Errorcode
◆ setId()
Set the id of the itinerary.
- Parameters
-
- Returns
- Errorcode
◆ setName()
Set the name of the itinerary.
- Parameters
-
- Returns
- Errorcode
The documentation for this class was generated from the following file: