Public Member Functions | Properties

BMEntity Class Reference

A BMEntity object stores address data for a given coordinate. More...

Inheritance diagram for BMEntity:
<BMMarker>

List of all members.

Public Member Functions

(id) - initWithCoordinate:bingAddressDictionary:
 Initializes the BMEntity object with a coordinate and a Bing Maps dictionary.
(CLLocationCoordinate2D) - coordinate [implementation]
 The coordinate of the entity.
(NSString *) - title [implementation]
 BMMarker title for the entity.
(NSString *) - subtitle [implementation]
 BMMarker subtitle for the entity.

Properties

NSDictionary * addressDictionary
 A dictionary containing the keys and values for the entity.
NSString * addressLine
 A string containing the first address line of the entity.
NSString * adminDistrict
 A string containing the subdivision name in the country or region of the entity.
NSString * adminDistrict2
 A string containing the subdivision name in the country or region of the entity.
NSString * locality
 A string containing the locality, such as the city or neighborhood, of the entity.
NSString * postalCode
 A string containing the post code, postal code, or ZIP code of an address.
NSString * countryRegion
 A string containing the country for an entity.
NSString * formattedAddress
 A string containing the complete address.

Detailed Description

A BMEntity object stores address data for a given coordinate.

Entity data includes information such as the country, city, postal code and street address associated with the given coordinate. BMEntity objects are generated by a BMReverseGeocoder object, although you can also create them yourself with the BMEntity initWithCoordinate function. An entity is a marker and conforms to the BMMarker protocol. Entities can be added directly to the map view with the addMarker function.

Results from the Bing Maps Geocoding Service conform to the Address Type, described in the Location Data MSDN documentation

You can return localized geocoding results by setting Region Format in the International settings menu.


Member Function Documentation

- (CLLocationCoordinate2D) coordinate [implementation]

The coordinate of the entity.

Returns:
The coordinate of the entity.
- (id) initWithCoordinate: (CLLocationCoordinate2D)  coordinate
bingAddressDictionary: (NSDictionary *)  addressDictionary 

Initializes the BMEntity object with a coordinate and a Bing Maps dictionary.

Use keys with the same format as the accessors to have the dictionary values copied into the BMEntity object accessors.

Parameters:
coordinateThe map coordinate to use.
addressDictionaryA dictionary where key names map to BMEntity properties.
- (NSString *) subtitle [implementation]

BMMarker subtitle for the entity.

Returns:
formattedAddress result from the Bing Maps geocoding service.

Reimplemented from <BMMarker>.

- (NSString *) title [implementation]

BMMarker title for the entity.

Returns:
adminDistrict result from the Bing Maps geocoding service.

Reimplemented from <BMMarker>.


Property Documentation

- (NSDictionary *) addressDictionary [read, assign]

A dictionary containing the keys and values for the entity.

Returns:
Bing Map formatted address dictionary.
- (NSString *) addressLine [read, assign]

A string containing the first address line of the entity.

Typical use of this element would be to provide a street address or any official address.

Returns:
addressLine result from the Bing Maps reverse geocoding service. Example: 1 Microsoft Way
- (NSString *) adminDistrict [read, assign]

A string containing the subdivision name in the country or region of the entity.

Typically treated as the first-order administrative subdivision, but in some cases it is the second, third, or fourth order subdivision in a country, dependency, or region.

Returns:
adminDistrict result from the Bing Maps geocoding service. Example: WA
- (NSString *) adminDistrict2 [read, assign]

A string containing the subdivision name in the country or region of the entity.

Typically treated as the second-order administrative subdivision, but in some cases it is the third, or fourth order subdivision in a country, dependency, or region.

Returns:
adminDistrict2 result from the Bing Maps geocoding service. Example: King Co.
- (NSString *) countryRegion [read, assign]

A string containing the country for an entity.

Returns:
countryRegion result from the Bing Maps geocoding service. Example: United States
- (NSString *) formattedAddress [read, assign]

A string containing the complete address.

Returns:
formattedAddress result from Bing Maps geocoding service. Example: 1 Microsoft Way, Redmond, WA 98052-6399
- (NSString *) locality [read, assign]

A string containing the locality, such as the city or neighborhood, of the entity.

Returns:
locality result from the Bing Maps geocoding service. Example: Redmond
- (NSString *) postalCode [read, assign]

A string containing the post code, postal code, or ZIP code of an address.

Returns:
postalCode result from the Bing Maps geocoding service. Example: 98052

The documentation for this class was generated from the following files: