restrictionSections property

List<RestrictionSection> get restrictionSections

A list of restricted sections that occur along the route.

Each RestrictionSection describes the start/end distances (in metres from route start) and a bitmask of RouteRestrictionType values describing the applicable restrictions (for example access restricted, transport mode restricted, vehicle attribute over limit, etc.).

Returns

  • A List<RestrictionSection> containing restriction sections; empty when the route has no restrictions.

See also:

Implementation

List<RestrictionSection> get restrictionSections {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteBase',
    'getRestrictionSections',
  );

  final List<dynamic> restrictionSectionsJson = resultString['result'];

  return restrictionSectionsJson
      .map((final dynamic e) => RestrictionSection.fromJson(e))
      .toList();
}