Span
public class Span
extension Span: NativeBase
extension Span: Hashable
A span is a part of the Section which is traversable or navigable. Each span
usually has some geometry associated with it.
-
The
GeoPolylineobject representing the polyline of this span.Declaration
Swift
public var geometry: GeoPolyline { get } -
The length of this span in meters.
Declaration
Swift
public var lengthInMeters: Int32 { get } -
The list of indexes to
Section.sectionNoticesthe parent section owns. In case the list is not empty, the user must judge all the indexedSectionNotices carefully before proceeding.Declaration
Swift
public var noticeIndexes: [Int32] { get } -
The segment reference of this span.
Declaration
Swift
public var segmentReference: SegmentReference { get } -
The indexes of traffic incidents from the field
Section.trafficIncidentsof the parentSection. Each matching incident takes at least a wholeSpan.geometry. The same incident can take other spans and an area out of the built route as well.Declaration
Swift
public var trafficIncidentIndexes: [Int32] { get } -
The position of the span inside the section’s geometry, given as an offset. The span geometry starts from this offset and ends on the offset of the next span, both start offset point and end offset point being included in the span, because the spans’ geometry share a point in the section’s geometry.
Declaration
Swift
public var sectionPolylineOffset: Int32 { get } -
The dynamic speed information on the span.
Declaration
Swift
public var dynamicSpeedInfo: DynamicSpeedInfo? { get } -
The list of street attributes on the span.
Declaration
Swift
public var streetAttributes: [StreetAttributes] { get } -
The list of car access attributes on the span.
Declaration
Swift
public var carAttributes: [AccessAttributes] { get } -
The list of truck access attributes on the span.
Declaration
Swift
public var truckAttributes: [AccessAttributes] { get } -
The list of scooter access attributes on the span.
Declaration
Swift
public var scooterAttributes: [AccessAttributes] { get } -
The list of walk attributes on the span.
Declaration
Swift
public var walkAttributes: [WalkAttributes] { get } -
The street names on the span.
Declaration
Swift
public var streetNames: LocalizedTexts { get } -
The road numbers on the span enriched with information specific to route numbers of a road such as I-10, US-50, or A3, and cardinal direction, if available, and a road level classification (
RouteType).Declaration
Swift
public var roadNumbers: LocalizedRoadNumbers { get } -
The speed limit in meters per second on the span.
Declaration
Swift
public var speedLimitInMetersPerSecond: Double? { get } -
The power consumption in kilowatt per hour necessary to traverse the span.
Declaration
Swift
public var consumptionInKilowattHours: Double? { get } -
The functional road class of the span.
Declaration
Swift
public var functionalRoadClass: FunctionalRoadClass? { get } -
The time duration necessary to traverse the span, using the speed provided in
Span.dynamicSpeedInfo. This duration takes also into consideration the delays caused by the traffic.Declaration
Swift
public var duration: TimeInterval { get } -
The time duration necessary to traverse the span, using the speed provided in
Span.dynamicSpeedInfowithout taking into consideration the delays caused by the traffic.Declaration
Swift
public var baseDuration: TimeInterval { get } -
The country code of the span. The value is
nilwhen no data is available.Declaration
Swift
public var countryCode: String? { get } -
The state code of the span. State code is available in some countries to denote principal subdivisions(provinces or states), e.g. in the United States, AK stands for Alaska and OH stands for Ohio. The format of state code can vary for different countries, take the United States as example, it consists of two alphabet letters. The value is
nilwhen no data is available.Declaration
Swift
public var stateCode: String? { get } -
The list of indexes to
Section.noThroughRestrictionsthe parent section owns. In case the list is not empty, the user must judge all the indexed sdk routing noThroughRestriction’s carefully before proceeding.Declaration
Swift
public var noThroughRestrictionsIndexes: [Int32] { get } -
Converts full route number to the value to be displayed on the road shield. The results are based on country code and state code of
Spanobject and route type of passedroad_numberargument.Declaration
Swift
public func getShieldText(roadNumber: LocalizedRoadNumber) -> StringParameters
roadNumberRoute number to convert to shield text.
Return Value
Text on the road shield to display.