restrictionSections property
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:
- RouteRestrictionType - The kinds of restrictions that can apply.
- RouteSegmentBase.restrictionSections - Restriction sections per segment.
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();
}