【发布时间】:2014-03-14 22:10:28
【问题描述】:
在模拟器中,我将位置设置为
Latitude: 38.056709
Longitude: -78.6115
但返回的地标是弗吉尼亚的。
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
[geocoder reverseGeocodeLocation: APP_DELEGATE.userLocation completionHandler:^(NSArray *placemarks, NSError *error)
{
if([placemarks count] > 0)
{
CLPlacemark *placemark = [placemarks objectAtIndex:0];
NSLog(@"placemark --- %@",placemark);
}
}];
“App.userlocation”是我更新locationmanager后得到的位置
这是我在控制台中得到的:
placemark ----
{
City = "Charlottesville";
Country = "United States";
CountryCode = US;
FormattedAddressLines = ("704 Grassmere Rd",
"Charlottesville",
"VA 22903-9214",
"United States");
Name = "704 Grassmere Rd";
PostCodeExtension = 9214;
State = "Virginia";
Street = "704 Grassmere Rd";
SubAdministrativeArea = "Albemarle";
SubLocality = "Samuel Miller";
SubThoroughfare = 704;
Thoroughfare = "Grassmere Rd";
ZIP = 22903;
}
【问题讨论】:
-
您的具体问题是什么?
-
@Volker 我设置的位置是哥伦比亚特区,但返回的是弗吉尼亚
-
地标适合坐标,刚刚在地图应用中检查
标签: ios objective-c core-location cllocationmanager