Initializer

init(coordinate:addressDictionary:)

Initializes and returns a placemark object using the specified coordinate and Address Book dictionary.

Declaration

init(coordinate: CLLocationCoordinate2D, addressDictionary: [String : Any]?)

Parameters

coordinate

The geographic coordinate to associate with the placemark.

addressDictionary

A dictionary containing keys and values from an Address Book record. For a list of strings that you can use for the keys of this dictionary, see the “Address Property” constants in ABPerson. All of the keys in should be at the top level of the dictionary.

Return Value

An initialized MKPlacemark object.

Discussion

You can create placemark objects manually for entities for which you already have address information, such as contacts in the Address Book. Creating a placemark object explicitly avoids the need to query the reverse geocoder object for the same information.

See Also

Creating a Placemark Object

init(coordinate: CLLocationCoordinate2D)

Initializes and returns a placemark object using the specified coordinate.

init(coordinate: CLLocationCoordinate2D, postalAddress: CNPostalAddress)

Initializes and returns a placemark object with the specified coordinate and postal address from the user's Contacts database.