Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/MapKit.framework |
Availability | Available in iOS 3.0 and later. |
Declared in | MKPlacemark.h |
A MKPlacemark
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. Placemark objects are typically generated by a MKReverseGeocoder
object, although you can also create them explicitly yourself.
A placemark is also an annotation and conforms to the MKAnnotation
protocol, whose properties and methods include the placemark coordinate and other information. Because they are annotations, you can add them directly to the map view.
Important: The MapKit framework uses Google services to provide map data. Use of this class and the associated interfaces binds you to the Google Maps/Google Earth API terms of service. You can find these terms of service at http://code.google.com/apis/maps/iphone/terms.html.
addressDictionary
property
thoroughfare
property
subThoroughfare
property
locality
property
subLocality
property
administrativeArea
property
subAdministrativeArea
property
postalCode
property
country
property
countryCode
property
For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.
A dictionary containing the Address Book keys and values for the placemark. (read-only)
@property (nonatomic, readonly) NSDictionary *addressDictionary
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 might be in this dictionary, see the “Address Property” constants in ABPerson Reference.
MKPlacemark.h
The state associated with the placemark. (read-only)
@property (nonatomic, readonly) NSString *administrativeArea
If the placemark location was Apple’s headquarters, the value for this property would be the string “CA” or “California”.
MKPlacemark.h
The name of the country associated with the placemark. (read-only)
@property (nonatomic, readonly) NSString *country
If the placemark location was Apple’s headquarters, the value for this property would be the string “United States”.
MKPlacemark.h
The abbreviated country name. (read-only)
@property (nonatomic, readonly) NSString *countryCode
This string is the standard abbreviation used to refer to the country. For example, if the placemark location was Apple’s headquarters, the value for this property would be the string “US”.
MKPlacemark.h
The city associated with the placemark. (read-only)
@property (nonatomic, readonly) NSString *locality
If the placemark location was Apple’s headquarters, the value for this property would be the string “Cupertino”.
MKPlacemark.h
The postal code associated with the placemark. (read-only)
@property (nonatomic, readonly) NSString *postalCode
If the placemark location was Apple’s headquarters, the value for this property would be the string “95014”.
MKPlacemark.h
Additional administrative area information for the placemark. (read-only)
@property (nonatomic, readonly) NSString *subAdministrativeArea
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 was 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.
MKPlacemark.h
Additional city-level information for the placemark. (read-only)
@property (nonatomic, readonly) NSString *subLocality
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.
MKPlacemark.h
Additional street-level information for the placemark. (read-only)
@property (nonatomic, readonly) NSString *subThoroughfare
Subthroughfares provide information such as the street number for the location. For example, if the placemark location was Apple’s headquarters (1 Infinite Loop), the value for this property would be the string “1”.
MKPlacemark.h
The street address associated with the placemark. (read-only)
@property (nonatomic, readonly) NSString *thoroughfare
The street address contains the street name. For example, if the placemark location was Apple’s headquarters, the value for this property would be the string “Infinite Loop”.
MKPlacemark.h
Initializes and returns a placemark object using the specified coordinate and Address Book dictionary.
- (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate addressDictionary:(NSDictionary *)addressDictionary
The map coordinate to associate with the placemark.
A dictionary containing keys and values from an Address Book record. For a list of strings that you can use for the keys of this dictionary, see the “Address Property” constants in ABPerson Reference. All of the keys in should be at the top level of the dictionary.
An initialized MKPlacemark
object.
You can create placemark objects manually for entities for which you already have address information, such as contacts in the Address Book. Creating a placemark object explicitly avoids the need to query the reverse geocoder object for the same information.
MKPlacemark.h
Last updated: 2009-07-23