LatLng

struct LatLng
extension LatLng : AutomationValue, Decodable, Encodable, Equatable, Hashable, Sendable, StructDataRepresentable

Represents 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 LatLng with the given properties.

    Declaration

    Swift

    init(latitude: Double, longitude: Double)
  • Initializes LatLng with the trait decoder.

    Declaration

    Swift

    init(decoder: TraitDecoder) throws

    Parameters

    decoder

    The trait decoder to decode the lat/lng.

  • Encodes LatLng to 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