iOS Developer Library

Developer

CoreLocation Framework Reference CLPlacemark Class Reference

Options
Deployment Target:

On This Page
Language:

CLPlacemark

Inherits From


Conforms To


Import Statement


Swift

import CoreLocation

Objective-C

@import CoreLocation;

Availability


Available in iOS 5.0 and later

A CLPlacemark object stores placemark data for a given latitude and longitude. Placemark data includes information such as the country, state, city, and street address associated with the specified coordinate. It can also include points of interest and geographically related data. Placemark objects are typically generated by a CLGeocoder object, although you can also create them explicitly yourself.

  • Initializes and returns a placemark object from another placemark object.

    Declaration

    Swift

    init!(placemark placemark: CLPlacemark!)

    Objective-C

    - (instancetype)initWithPlacemark:(CLPlacemark *)placemark

    Parameters

    placemark

    The placemark object to use as the source of the data for the new object.

    Return Value

    A new placemark object.

    Discussion

    You can use this method to transfer information from one placemark object to another placemark object.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • location location Property

    The location object containing latitude and longitude information. (read-only)

    Declaration

    Swift

    @NSCopying var location: CLLocation! { get }

    Objective-C

    @property(nonatomic, readonly, copy) CLLocation *location

    Discussion

    This object is used to initialize the placemark object.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • name name Property

    The name of the placemark. (read-only)

    Declaration

    Swift

    var name: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *name

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • A dictionary containing the Address Book keys and values for the placemark. (read-only)

    Declaration

    Swift

    var addressDictionary: [NSObject : AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSDictionary *addressDictionary

    Discussion

    The keys in this dictionary are those defined by the Address Book framework and used to access address information for a person. For a list of the strings that can be in this dictionary, see the “Address Property” constants in ABPerson Reference.

    You can format the contents of this dictionary to get a full address string as opposed to building the address yourself. To format the dictionary, use the ABCreateStringWithAddressDictionary function as described in Address Book UI Functions Reference.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • The abbreviated country name. (read-only)

    Declaration

    Swift

    var ISOcountryCode: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *ISOcountryCode

    Discussion

    This string is the standard abbreviation used to refer to the country. For example, if the placemark location is Apple’s headquarters, the value for this property would be the string “US”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • country country Property

    The name of the country associated with the placemark. (read-only)

    Declaration

    Swift

    var country: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *country

    Discussion

    If the placemark location is Apple’s headquarters, for example, the value for this property would be the string “United States”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • The postal code associated with the placemark. (read-only)

    Declaration

    Swift

    var postalCode: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *postalCode

    Discussion

    If the placemark location is Apple’s headquarters, for example, the value for this property would be the string “95014”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • The state or province associated with the placemark. (read-only)

    Declaration

    Swift

    var administrativeArea: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *administrativeArea

    Discussion

    The string in this property can be either the spelled out name of the administrative area or its designated abbreviation, if one exists. If the placemark location is Apple’s headquarters, for example, the value for this property would be the string “CA” or “California”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • Additional administrative area information for the placemark. (read-only)

    Declaration

    Swift

    var subAdministrativeArea: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *subAdministrativeArea

    Discussion

    Subadministrative areas typically correspond to counties or other regions that are then organized into a larger administrative area or state. For example, if the placemark location is Apple’s headquarters, the value for this property would be the string “Santa Clara”, which is the county in California that contains the city of Cupertino.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • locality locality Property

    The city associated with the placemark. (read-only)

    Declaration

    Swift

    var locality: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *locality

    Discussion

    If the placemark location is Apple’s headquarters, for example, the value for this property would be the string “Cupertino”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • Additional city-level information for the placemark. (read-only)

    Declaration

    Swift

    var subLocality: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *subLocality

    Discussion

    This property contains additional information, such as the name of the neighborhood or landmark associated with the placemark. It might also refer to a common name that is associated with the location.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • The street address associated with the placemark. (read-only)

    Declaration

    Swift

    var thoroughfare: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *thoroughfare

    Discussion

    The street address contains the street name. For example, if the placemark location is Apple’s headquarters, the value for this property would be the string “Infinite Loop”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • Additional street-level information for the placemark. (read-only)

    Declaration

    Swift

    var subThoroughfare: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *subThoroughfare

    Discussion

    Subthroughfares provide information such as the street number for the location. For example, if the placemark location is Apple’s headquarters (1 Infinite Loop), the value for this property would be the string “1”.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • region region Property

    The geographic region associated with the placemark. (read-only)

    Declaration

    Swift

    @NSCopying var region: CLRegion! { get }

    Objective-C

    @property(nonatomic, readonly, copy) CLRegion *region

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • The name of the inland water body associated with the placemark. (read-only)

    Declaration

    Swift

    var inlandWater: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *inlandWater

    Discussion

    For coordinates that lie over an inland body of water, this property contains the name of that water body—the name of a lake, stream, river, or other waterway.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • ocean ocean Property

    The name of the ocean associated with the placemark. (read-only)

    Declaration

    Swift

    var ocean: String! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSString *ocean

    Discussion

    For coordinates that lie over an ocean, this property contains the name of the ocean.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later

  • The relevant areas of interest associated with the placemark. (read-only)

    Declaration

    Swift

    var areasOfInterest: [AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly, copy) NSArray *areasOfInterest

    Discussion

    Examples of an area of interest are the name of a military base or large national park or an attraction such as Eiffel Tower, Disneyland, or Golden Gate Park.

    Import Statement

    Objective-C

    @import CoreLocation;

    Swift

    import CoreLocation

    Availability

    Available in iOS 5.0 and later