【问题标题】:reverse Geolocation : Postal Code Issues反向地理位置:邮政编码问题
【发布时间】:2012-12-20 22:45:46
【问题描述】:

我使用此代码通过反向地理位置获取用户的完整地址。有人可以建议我从中获取邮政编码或邮政编码的方法吗?

//Geocoding Block
[self.geoCoder reverseGeocodeLocation: locationManager.location completionHandler:
 ^(NSArray *placemarks, NSError *error) {

     //Get nearby address
     CLPlacemark *placemark = [placemarks objectAtIndex:0];


     //String to hold address
     NSString *locatedAt = [[placemark.addressDictionary valueForKey:@"FormattedAddressLines"] componentsJoinedByString:@", "];


     //Print the location to console
     NSLog(@"I am currently at %@",locatedAt);

     //Set the label text to current location
     [locationLabel setText:locatedAt];

 }];

【问题讨论】:

标签: objective-c ios geolocation reverse-geocoding


【解决方案1】:

使用谷歌地图将地理位置转换为邮编地址。

https://developers.google.com/maps/documentation/geocoding/

【讨论】:

  • google Maps 从 IOS 开始贬值,Google 今天发布了 Maps Sdk
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-06-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多