track property

Path? get track

The path representing the detailed track of this route, if available.

Returns the Path object that contains the ordered list of coordinates which make up the route's track.

Returns

  • The Path representing the track of this route when available.
  • null when the track is unavailable or the underlying platform call indicates an error (native result == -1).

/ {@category Routes & Navigation}

Implementation

Path? get track {
  final OperationResult resultString = objectMethod(
    pointerId,
    'OTRoute',
    'getTrack',
  );

  if (resultString['result'] == -1) {
    return null;
  }

  return Path.init(resultString['result']);
}