init(placeDescriptor:)
Creates a new map item request with the specified place descriptor
Declaration
convenience init(placeDescriptor: PlaceDescriptor)Parameters
- placeDescriptor:
The Placedescriptor the system should use to try to resolve information about desired map location. This parameter can’t be
nil.
Return Value
An initialized map item object.
Discussion
Use this method to create a MKMapItemRequest from a PlaceDescriptor which you can then attempt to resolve asynchronously as shown here.
Task {
do {
let request = MKMapItemRequest(placeDescriptor: descriptor)
mapItem = try await request.mapItem
} catch {
handleLoadError(error, for: descriptor)
}
}