CLPlacemark Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CoreLocation.framework
Availability
Available in iOS 5.0 and later.
Companion guide
Declared in
CLPlacemark.h
Related sample code

Overview

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.

Tasks

Initializing a Placemark Object

Accessing the Location Data

Accessing the Placemark Attributes

Accessing Geographic Information

Accessing Landmark Information

Properties

addressDictionary

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

@property(nonatomic, readonly) 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.

Availability
  • Available in iOS 5.0 and later.
Related Sample Code
Declared In
CLPlacemark.h

administrativeArea

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

@property(nonatomic, readonly) 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”.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

areasOfInterest

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

@property(nonatomic, readonly) 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.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

country

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

@property(nonatomic, readonly) NSString *country
Discussion

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

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

inlandWater

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

@property(nonatomic, readonly) 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.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

ISOcountryCode

The abbreviated country name. (read-only)

@property(nonatomic, readonly) 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”.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

locality

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

@property(nonatomic, readonly) NSString *locality
Discussion

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

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

location

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

@property(nonatomic, readonly) CLLocation *location
Discussion

This object is used to initialize the placemark object.

Availability
  • Available in iOS 5.0 and later.
Related Sample Code
Declared In
CLPlacemark.h

name

The name of the placemark. (read-only)

@property(nonatomic, readonly) NSString *name
Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

ocean

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

@property(nonatomic, readonly) NSString *ocean
Discussion

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

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

postalCode

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

@property(nonatomic, readonly) NSString *postalCode
Discussion

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

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

region

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

@property(nonatomic, readonly) CLRegion *region
Availability
  • Available in iOS 5.0 and later.
Related Sample Code
Declared In
CLPlacemark.h

subAdministrativeArea

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

@property(nonatomic, readonly) 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.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

subLocality

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

@property(nonatomic, readonly) 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.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

subThoroughfare

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

@property(nonatomic, readonly) 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”.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

thoroughfare

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

@property(nonatomic, readonly) 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”.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h

Instance Methods

initWithPlacemark:

Initializes and returns a placemark object from another placemark object.

- (id)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.

Availability
  • Available in iOS 5.0 and later.
Declared In
CLPlacemark.h