Representation of a location
Methods
Creates a new empty Location
.
Tries to load a new location based upon the latitute and longitute. This calls the OpenStreetMap Api to resolve the cordinates to a address.
Tries to validate and update the values of a location. When the validation fails, it throws an error. Otherwise it will update the location.
Protocols
protocol
get house_number
let output = value.house_number
Allows a get operation to work.
protocol
set house_number
value.house_number = input
Allows a set operation to work.
let output = value.road
Allows a get operation to work.
value.road = input
Allows a set operation to work.
let output = value.town
Allows a get operation to work.
value.town = input
Allows a set operation to work.
let output = value.state
Allows a get operation to work.
value.state = input
Allows a set operation to work.
let output = value.postcode
Allows a get operation to work.
value.postcode = input
Allows a set operation to work.
let output = value.country
Allows a get operation to work.
value.country = input
Allows a set operation to work.
let output = value.lat
Allows a get operation to work.
value.lat = input
Allows a set operation to work.
let output = value.lon
Allows a get operation to work.
value.lon = input
Allows a set operation to work.
let output = value.validated
Allows a get operation to work.
value.validated = input
Allows a set operation to work.
if value == b { }
Allows for partial equality operations to work.
println("{:?}", value)
Allows the value to be debug printed.
println("{}", value)
Allows the value to be display printed.