The navigation callbacks inform about the navigation progress, like next crossing, information about the destination and speech advices
|
| boolean | beforeAdviceStarts (String speechIndependentSentence, String additionalAdviceInfo, String sentence) |
| |
| void | crossingInfoReceived (String actualStreetName, String nextStreetName, String pictoFileName, CrosswayStreetType streetType, double metersToCrossing, double secondsToCrossing) |
| |
| void | destinationInfoReceived (double secondsToDestination, double metersToDestination, double averageSecondsToDestination) |
| |
| void | destinationReached (int index) |
| |
| void | laneInfoReceived (String allArrows, String divider, String relevantArrows) |
| |
| void | navigationStarted () |
| |
| void | rerouting (Task< Void > task) |
| |
| void | routeUpdate (RouteComparison routeComparison) |
| | This callback is thrown if a routing server calculated a route that is faster than the current one. More...
|
| |
| void | speedLimitReceived (double limit) |
| |
| void | vehicleWarningReceived (VehicleWarningType restrictionType, double restrictionValue) |
| |
◆ beforeAdviceStarts()
| boolean beforeAdviceStarts |
( |
String |
speechIndependentSentence, |
|
|
String |
additionalAdviceInfo, |
|
|
String |
sentence |
|
) |
| |
Is called before a new advice will be played. By inhibiting the speech (return false) you can use your own speech engine. The text to speak is in the parameter "sentence".
On Androd the sentence is not spoken automatically and has to be redirected to your audio output.
If you inhibit the speach by returning false, the callback is executed for the same advice until you return true (speak the advice via maptripAPI speech) or the advice is not valid anymore due to the navigation progress
- Parameters
-
| speechIndependentSentence | - language independent speech sentence |
| additionalAdviceInfo | - streetname / routenumber responses |
| sentence | - speechIndependentSentence in target language including the additionalAdviceInfo |
- Returns
- If true is returned the advise will be played, if false is returned, playing the advice will be inhibited
◆ crossingInfoReceived()
| void crossingInfoReceived |
( |
String |
actualStreetName, |
|
|
String |
nextStreetName, |
|
|
String |
pictoFileName, |
|
|
CrosswayStreetType |
streetType, |
|
|
double |
metersToCrossing, |
|
|
double |
secondsToCrossing |
|
) |
| |
Is called when new crossing infos are available
- Parameters
-
| actualStreetName | - The name of the current street |
| nextStreetName | - The name of the next street |
| pictoFileName | - The name of the pictogram picture file |
| streetType | - Type of the street |
| metersToCrossing | - The distance to the crossing |
◆ destinationInfoReceived()
| void destinationInfoReceived |
( |
double |
secondsToDestination, |
|
|
double |
metersToDestination, |
|
|
double |
averageSecondsToDestination |
|
) |
| |
Is called when new destination infos are available
- Parameters
-
| secondsToDestination | - The expected drive time in seconds to destination |
| metersToDestination | - The distance to the destination in meters |
| averageSecondsToDestination | - The average drive time in seconds to the destination without traffic. Only different to secondsToDestination, if the navigation uses a offboard route with traffic information. |
◆ destinationReached()
| void destinationReached |
( |
int |
index | ) |
|
Is called when the destination was reached
- Parameters
-
| index | - of the interstation in itinerary; 0 based |
◆ laneInfoReceived()
| void laneInfoReceived |
( |
String |
allArrows, |
|
|
String |
divider, |
|
|
String |
relevantArrows |
|
) |
| |
Is called if new lane information is available for the current situation. allArrows, dividers and relevantArrows follow these semantics:
There are n lanes. Where n is the amount of substrings divided by semicolons. Each lane can have multiple possible arrow directions given by m integers within [1-9]. The substrings in relevantArrows can be empty. The non empty substrings denominate the recommended directions. The integers have the following meaning: 1 - Straight 2 - Soft Right 3 - Right 4 - Sharp Right 5 - U-Turn (Left) 6 - Sharp Left 7 - Left 8 - Soft Left 9 - U-Turn (Right)
There are n-1 dividers. Each one represented by a substring divided by a semicolon. Each substring is one integer that describes a divider type. The integers have the following meaning: 1 - Thin dashed 2 - Solid thick and solid thin 3 - Solid 4 - Solid thick and dashed thin 5 - Dashed thick and solid thin 6 - Thick dashed
- Parameters
-
| allArrows | - All arrows at the next crossing |
| divider | - The lane divider between the lanes |
| relevantArrows | - Relevant arrows at the next crossing |
◆ navigationStarted()
| void navigationStarted |
( |
| ) |
|
Is called when the navigation started successfully
◆ rerouting()
| void rerouting |
( |
Task< Void > |
task | ) |
|
Is called when an automatic rerouting occurs. Requires an active route guidance process initialized via Navigation.startNavigation() or Navigation.startSimulatedNavigation(). If this callback is called, the task parameter contains the rerouting process. You can use this task to show the rerouting progress or cancel the rerouting. You don't have to take any action for the current navigationm, the updated route is automatically used for the route guidance
- Parameters
-
◆ routeUpdate()
The passed route comparison object can be used to identify the differences and acces the new route
- Parameters
-
| routeComparison | - the route comparison of the route update |
◆ speedLimitReceived()
| void speedLimitReceived |
( |
double |
limit | ) |
|
Is called when a new speed limit occurs. A number <= 0 signals that speed limit is not available at the moment.
- Parameters
-
| limit | - The new speed limit in km/h. |
◆ vehicleWarningReceived()
| void vehicleWarningReceived |
( |
VehicleWarningType |
restrictionType, |
|
|
double |
restrictionValue |
|
) |
| |
Is called if new vehicle restrictions are available for the current situation and vehicle type.
- Parameters
-
The documentation for this interface was generated from the following file: