Initializer

init(location:name:postalAddress:)

Creates and initializes a placemark object using the specified location and address information.

Declaration

convenience init(location: CLLocation, name: String?, postalAddress: CNPostalAddress?)

Parameters

location

The geographic location to associate with the placemark. This value is used to set the location property of the placemark object.

name

The name to associate with the placemark. This value is used to set the name property of the placemark object.

postalAddress

The postal address to associate with the placemark. This parameter is optional but lets you provide a more specific location for the placemark. This parameter is used to populate additional properties of the returned object.

Return Value

A new placemark object.

Discussion

App extensions built with the Intents framework can use this method to create a placemark from existing location and address data. For example, an app that offers a ride service might create a new placemark when resolving a user’s pickup or drop-off location. The returned placemark contains only the data that you provide.

See Also

Initializing a Placemark Object

init(placemark: CLPlacemark)

Initializes and returns a placemark object from another placemark object.