struct LatLngextension LatLng : AutomationValue, Decodable, Encodable, Equatable, Hashable, Sendable, StructDataRepresentableRepresents a latitude/longitude pair.
-
The latitude of the geocoordinate.
Declaration
Swift
let latitude: Double -
The longitude of the geocoordinate.
Declaration
Swift
let longitude: Double -
Initializes the
LatLngwith the given properties.Declaration
Swift
init(latitude: Double, longitude: Double) -
Initializes
LatLngwith the trait decoder.Declaration
Swift
init(decoder: TraitDecoder) throwsParameters
decoderThe trait decoder to decode the lat/lng.
-
Encodes
LatLngto the trait encoder.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Creates a new instance by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Declaration
Swift
init(from decoder: any Decoder) throws