Initializer

init(placemark:)

Initializes and returns a map item object using the specified placemark object.

Declaration

init(placemark: MKPlacemark)

Parameters

placemark

The placemark object corresponding to the desired map location. This parameter must not be nil.

Return Value

An initialized map item object.

Discussion

Use this method to create a map item for an existing placemark. Do not use it to create a map item representing the user’s current location. To do that, use the forCurrentLocation() method instead.

See Also

Creating Map Items

class func forCurrentLocation() -> MKMapItem

Creates and returns a singleton map item object representing the device’s current location.

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