Contents

PlaceDescriptor

A structure that contains identifying information about a place that a mapping service may use to attempt to find rich place information such as phone numbers, websites, and so on.

Declaration

struct PlaceDescriptor

Discussion

A PlaceDescriptor allows you to construct a collection of metadata about a place, including at least one PlaceDescriptor.PlaceRepresentation which contains common geographic concepts like an address or coordinate. PlaceDescriptor may optionally include a supportingRepresentations which contains identifiers that match the place for mapping service providers. Use PlaceDescriptor in conjunction with a mapping service to request rich information about a place.

For example to create a PlaceDescriptor that describes an address with a common name use init(representations:commonName:supportingRepresentations:) as shown here.

    let fountain = PlaceDescriptor(
        representations: [.address("121-122 James's St \n Dublin 8 \n D08 ET27 \n Ireland")],
        commonName: "Obelisk Fountain"
    )

You can also initialize a PlaceDescriptor using an MKMapItem as shown below.

    guard let descriptor = PlaceDescriptor(item: myMapItem) else {
        return
    }

Topics

Creating place descriptors

Getting the attributes of a place descriptor

Enumeration values that describe places and mapping service representations

Type Aliases

Type Properties