Locality property for CLPlacemark in Washington, D.C. is

Originator:ceager
Number:rdar://14403319 Date Originated:2013-07-10
Status:Duplicate Resolved:2013-08-06
Product:iPhone SDK Product Version:6.1.4
Classification:Other bug Reproducible:Always
 
10-Jul-2013 01:37 PM Christian Eager:
Summary:

Geocoding an address in Washington, D.C. results in a place mark whose locality property includes the administrative area ("Washington D.C.").


Steps to Reproduce:

    [[[CLGeocoder alloc] init] geocodeAddressString:@"1050 Connecticut Ave, NW Washington, D.C. 20036" completionHandler:^(NSArray* placemarks, NSError* error) {
		for (CLPlacemark *placemark in placemarks) {
			NSLog(@"%@", placemark.locality);
		}
	}];

Expected Results:

The result of NSLog() is "Washington".

Actual Results:

The result of NSLog is "Washington D.C."

Regression:

None

Notes:

This behavior makes using the structured data (i.e., not placemark.addressDictionary[@"FormattedAddressLines"]) difficult without confusing and redundant information. For example, NSLog(@"%@, %@", placemark.locality, placemark.administrativeArea) results in "Washington D.C., District of Columbia" for DC place marks, but "New York, New York" for NYC place marks.


Update (2013-08-06):

Duplicate of rdar://problem/12664231

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!