getCoordinateOnRoute method

Coordinates getCoordinateOnRoute(
  1. int distance
)

Returns the coordinate located at distance metres from the route start.

The returned Coordinates correspond to the point on the route track that lies at the specified distance measured from the departure point.

Parameters

  • distance: Distance from the route start in meters.

Returns

  • A Coordinates instance at the requested distance along the route.

Implementation

Coordinates getCoordinateOnRoute(final int distance) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteBase',
    'getCoordinateOnRoute',
    args: distance,
  );

  return Coordinates.fromJson(resultString['result']);
}