Section

public class Section
extension Section: NativeBase
extension Section: Hashable

A section is a part of the route between two stopovers. A stopover is a location on the route where a stop is made.

Note: A section contains a list of SectionNotice objects that describe potential issues after the route was calculated. If the list is non-empty, it is recommended to evaluate possible violations against the requested route options and reject the route if deemed necessary.

  • The GeoPolyline object representing the polyline of this section.

    Declaration

    Swift

    public private(set) lazy var geometry: GeoPolyline { get set }
  • The Span‘s that constitute this section.

    Declaration

    Swift

    public private(set) lazy var spans: [Span] { get set }
  • The maneuvers for this section.

    Declaration

    Swift

    public private(set) lazy var maneuvers: [Maneuver] { get set }
  • The closest rectangular area where this section fits in.

    Declaration

    Swift

    public var boundingBox: GeoBox { get }
  • The length of this section in meters.

    Declaration

    Swift

    public var lengthInMeters: Int32 { get }
  • The transport mode of this section.

    Declaration

    Swift

    public var sectionTransportMode: SectionTransportMode { get }
  • Describes the departure place.

    Declaration

    Swift

    public var departurePlace: RoutePlace { get }
  • The arrival place. Describes the arrival place.

    Declaration

    Swift

    public var arrivalPlace: RoutePlace { get }
  • The departure location time of this section.

    Declaration

    Swift

    public var departureLocationTime: LocationTime? { get }
  • The arrival location time of this section.

    Declaration

    Swift

    public var arrivalLocationTime: LocationTime? { get }
  • The preceding actions that must be done prior to departure at the beginning of the section.

    Declaration

    Swift

    public private(set) lazy var preActions: [PreAction] { get set }
  • The post actions that must be done after the arrival at the end of the section.

    Declaration

    Swift

    public private(set) lazy var postActions: [PostAction] { get set }
  • The notices which explain the issues encountered during processing of this section. For example, while the scooter transport mode is selected, if no reasonable alternative route is possible except violating controlled-access to highway rule for the section, one notice is generated for the violation. The user must judge all the notices carefully before proceeding.

    Declaration

    Swift

    public private(set) lazy var sectionNotices: [SectionNotice] { get set }
  • Estimated net energy consumption (in kWh) if the transportation mode used for this route is an electric vehicle. Note that it can be negative due to energy recuperation.

    Declaration

    Swift

    public var consumptionInKilowattHours: Double? { get }
  • The transit details which are avilable for transit sections of a route.

    Declaration

    Swift

    public var transitDetails: TransitSectionDetails? { get }
  • All the tolls for this section. Note that tolls are found depending on the transport mode. For example, if pedestrian or bicycle transport mode specified, route sections have no tolls. Indoor route sections have no tolls, too. Note: If you’re using the OfflineRoutingEngine, be aware that this feature is currently in beta. As a result, there may be some bugs or unexpected behaviors. Additionally, this feature and related APIs may be updated in future releases without going through the deprecation process. Note that the OfflineRoutingEngine is only available with the Navigate license. If you’re using the RoutingEngine, this feature is considered to be stable.

    Declaration

    Swift

    public private(set) lazy var tolls: [Toll] { get set }
  • The list of traffic incidents that are found on the section.

    Declaration

    Swift

    public private(set) lazy var trafficIncidents: [TrafficIncidentOnRoute] { get set }
  • The estimated time in seconds needed to travel along this section, including real-time traffic delays if available.

    Declaration

    Swift

    public var duration: TimeInterval { get }
  • The estimated extra time in seconds spent due to traffic delays along this section. Negative values indicate that the route can be traversed faster than usual.

    Declaration

    Swift

    public var trafficDelay: TimeInterval { get }
  • The list of passthrough waypoints in this section.

    Declaration

    Swift

    public var passthroughWaypoints: [PassThroughWaypoint] { get }
  • The list of no through restriction The no through restriction area is part of the road network that do not allow through traffic. For example the Resident only sign indicates that vehicles are only allowed to enter this area if they are making a stop. This area will be set only if origin, destination or via waypoint will be requested within the area.

    Declaration

    Swift

    public var noThroughRestrictions: [ViolatedRestriction] { get }