restrictionSections property

List<RestrictionSection> get restrictionSections

Restricted sections contained in this segment.

Each RestrictionSection describes a portion of the segment subject to one or more RouteRestrictionType flags (for example access restrictions, transport-mode restrictions or vehicle-attribute restrictions).

Returns

  • List<RestrictionSection>: list of restricted sections with start/end distances and the applicable restriction bitmask. Empty when the segment has no restrictions.

See also:

Implementation

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

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

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