SafetyLocation
public struct SafetyLocation
extension SafetyLocation: Equatable
extension SafetyLocation: Hashable
Define a common safety location.
-
Creates a new
SafetyLocationinstance.Declaration
Swift
public init( id: SafetyLocationID, type: SafetyLocationType, speedLimit: Measurement<UnitSpeed>?, startLocation: CLLocationCoordinate2D, endLocation: CLLocationCoordinate2D )Parameters
idSafety location identifier
SafetyLocationIDof this safety location.typeSafety location type
SafetyLocationTypeof this safety location.speedLimitSpeed limit applicable to this safety location type, otherwise nil.
startLocationStart location of this safety location.
endLocationEnd location of this safety location. If startLocation and endLocation are equal, the safety location is a spot.
-
Creates a new
SafetyLocationinstance.Declaration
Swift
public init( id: SafetyLocationID, type: SafetyLocationType, speedLimit: Measurement<UnitSpeed>?, location: CLLocationCoordinate2D )Parameters
idSafety location identifier
SafetyLocationIDof this safety location.typeSafety location type
SafetyLocationTypeof this safety location.speedLimitSpeed limit applicable to this safety location type, otherwise nil.
locationPosition of a spot safety location.
-
Describes the type of a safety location.
See moreDeclaration
Swift
public enum SafetyLocationType : CaseIterable -
Identifier of a safety location.
Declaration
Swift
public let id: SafetyLocationID -
Type of safety location.
Declaration
Swift
public let type: SafetyLocationType -
Defines the speed limit for the safety cameras of relevant type.
Declaration
Swift
public let speedLimit: Measurement<UnitSpeed>? -
Start position of the safety location.
Declaration
Swift
public let startLocation: CLLocationCoordinate2D -
End position of the safety location. By default endLocation is equal to the startLocation. If startLocation and endLocation are equal, the safety location is a spot.
Declaration
Swift
public let endLocation: CLLocationCoordinate2D
-
Returns a Boolean value indicating whether two
SafetyLocations are equal.Declaration
Swift
public static func == ( lhs: SafetyLocation, rhs: SafetyLocation ) -> BoolParameters
lhsA
SafetyLocationto compare.rhsAnother
SafetyLocationto compare.Return Value
Returns a Boolean value indicating whether two
SafetyLocations are equal.
-
Allowing instances of he containing type to be used in hash-based collections like sets and dictionaries.
Declaration
Swift
public func hash(into hasher: inout Hasher)Parameters
hasherThe hasher used to combine the hash values of the essential properties.
TomTom SDK for iOS (0.51.1)
SafetyLocation