distanceToDestination property
Distance (in meters) from the event position on the current route to the destination.
This value is route-specific and therefore only available for events that are part of a computed Route.
When no route context is available the SDK returns 0.
Returns
- int: distance in meters to destination, or
0when unavailable.
Implementation
int get distanceToDestination {
final OperationResult resultString = objectMethod(
pointerId,
'RouteTrafficEvent',
'getDistanceToDestination',
);
return resultString['result'];
}