LatLng
Struct representing a geographical coordinate with latitude and longitude in degrees.
Declaration
struct LatLngConstructors
Properties
| Name | Type | Summary |
|---|---|---|
| var description | String | |
| let latDegrees | Double | Latitude in degrees. |
| let lngDegrees | Double | Longitude in degrees. |
Relationships
conforms to: Swift.CustomStringConvertible
conforms to: Swift.Sendable
conforms to: Swift.SendableMetatype
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the
String(describing:)initializer. This initializer works with any type, and uses the custom
descriptionproperty for types that conform toCustomStringConvertible:struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of
pto a string in the assignment tosuses thePointtype'sdescriptionproperty.