getPersistentRoadblockPathPreview static method
- required UserRoadblockPathPreviewCoordinate from,
- required Coordinates to,
- required RouteTransportMode transportMode,
Get persistent roadblock path preview
Parameters
- IN coords The previous defined coordinates in roadblock path from where to start the preview
- IN to The movable coordinate in roadblock path to where the preview ends
- IN to The transport mode
Returns
- The coordinates list preview of the roadblock path in from -> last order + next roadblock point match suggestion
Throws
- An exception if it fails
Implementation
static (List<Coordinates>, UserRoadblockPathPreviewCoordinate, GemError)
getPersistentRoadblockPathPreview({
required UserRoadblockPathPreviewCoordinate from,
required Coordinates to,
required RouteTransportMode transportMode,
}) {
final OperationResult resultString = staticMethod(
'TrafficService', 'getPersistentRoadblockPathPreview',
args: <String, dynamic>{
'from': from,
'to': to,
'transportMode': transportMode.id,
});
final List<Coordinates> coordinates =
(resultString['result']['coords'] as List<dynamic>)
.map((dynamic e) => Coordinates.fromJson(e))
.toList();
final UserRoadblockPathPreviewCoordinate previewCoordinate =
UserRoadblockPathPreviewCoordinate.fromJson(
resultString['result']['preview']);
final GemError error =
GemErrorExtension.fromCode(resultString['result']['error']);
return (coordinates, previewCoordinate, error);
}