SafetyLocation
public struct SafetyLocation
extension SafetyLocation: Equatable
extension SafetyLocation: Hashable
Define a common safety location.
Returns a Boolean value indicating whether two SafetyLocation
s are equal.
Declaration
Swift
public static func == (
lhs: SafetyLocation,
rhs: SafetyLocation
)
-> Bool
Parameters
lhs
|
A |
rhs
|
Another |
Return Value
Returns a Boolean value indicating whether two SafetyLocation
s are equal.
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
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
hasher
|
The hasher used to combine the hash values of the essential properties. |
Identifier of a safety location.
Declaration
Swift
public let id: SafetyLocationID
Creates a new SafetyLocation
instance.
Declaration
Swift
public init(
id: SafetyLocationID,
type: SafetyLocationType,
speedLimit: Measurement<UnitSpeed>?,
location: CLLocationCoordinate2D
)
Parameters
id
|
Safety location identifier |
type
|
Safety location type |
speedLimit
|
Speed limit applicable to this safety location type, otherwise nil. |
location
|
Position of a spot safety location. |
Creates a new SafetyLocation
instance.
Declaration
Swift
public init(
id: SafetyLocationID,
type: SafetyLocationType,
speedLimit: Measurement<UnitSpeed>?,
startLocation: CLLocationCoordinate2D,
endLocation: CLLocationCoordinate2D
)
Parameters
id
|
Safety location identifier |
type
|
Safety location type |
speedLimit
|
Speed limit applicable to this safety location type, otherwise nil. |
startLocation
|
Start location of this safety location. |
endLocation
|
End location of this safety location. If startLocation and endLocation are equal, the safety location is a spot. |
Describes the type of a safety location.
See moreDeclaration
Swift
public enum SafetyLocationType : CaseIterable
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
Type of safety location.
Declaration
Swift
public let type: SafetyLocationType