getTimeDistanceCoordinates method
inherited
Build a list of timestamp coordinates from a route.
Parameters
- IN start Start distance from route start.
- IN end End distance from route start.
- IN step The step on which the coordinates are created.
- IN stepType The step unit type. See StepType
Returns
- The result list of TimeDistanceCoordinate objects containing the time and distance information for the route.
Throws
- An exception if it fails.
Implementation
List<TimeDistanceCoordinate> getTimeDistanceCoordinates({
required final int start,
required final int end,
required final int step,
required final StepType stepType,
}) {
final OperationResult resultString = objectMethod(
_pointerId,
'RouteBase',
'getTimeDistanceCoordinates',
args: <String, Object>{
'start': start,
'end': end,
'step': step,
'stepType': stepType == StepType.distance,
},
);
final List<dynamic> timeDistanceJson = resultString['result'];
return timeDistanceJson
.map((final dynamic e) => TimeDistanceCoordinate.fromJson(e))
.toList();
}