Type Alias

CLGeocodeCompletionHandler

A block to be called when a geocoding request is complete.

Declaration

typealias CLGeocodeCompletionHandler = ([CLPlacemark]?, Error?) -> Void

Discussion

Upon completion of a geocoding request, a block of this form is called to give you a chance to process the results. The parameters of this block are as follows:

placemark

Contains an array of CLPlacemark objects. For most geocoding requests, this array should contain only one entry. However, forward-geocoding requests may return multiple placemark objects in situations where the specified address could not be resolved to a single location.

If the request was canceled or there was an error in obtaining the placemark information, this parameter is nil.

error

Contains nil or an error object indicating why the placemark data was not returned. For a list of possible error codes, see CLError.Code.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software