returnToRoutePosition property

Coordinates? get returnToRoutePosition

Closest position on route when waiting to return to route.

Valid only when navigationStatus is NavigationStatus.waitingReturnToRoute. Returns the coordinates of the closest point on the original route, helping guide the user back when they have deviated from the planned path.

Returns

  • (Coordinates?) Closest position on route, or null if not applicable.

See also:

Implementation

Coordinates? get returnToRoutePosition {
  final OperationResult resultString = objectMethod(
    pointerId,
    'NavigationInstruction',
    'getReturnToRoutePosition',
  );

  final Coordinates coords = Coordinates.fromJson(resultString['result']);

  if (coords.isValid) {
    return coords;
  }
  return null;
}