OGeek|极客世界-中国程序员成长平台

标题: ios - 在 iOS 6 上使用 Google Maps SDK 转发地理编码 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 18:27
标题: ios - 在 iOS 6 上使用 Google Maps SDK 转发地理编码

是否有任何方法可以在 Google Maps SDK 上实现正向地理编码?我不想使用 Google Maps API Web Services。 谢谢



Best Answer-推荐答案


根据您的评论,您可以使用 native CLGeocoder类(class)。前向地理编码请求获取用户可读的地址并找到相应的纬度和经度值。

CLGeocoder geocoder = [[CLGeocoder alloc] init];
[geocoder geocodeAddressString"1 Infinite Loop"
     completionHandler:^(NSArray* placemarks, NSError* error){
         for (CLPlacemark* aPlacemark in placemarks)
         {
             // Process the placemark.
         }
}];

关于ios - 在 iOS 6 上使用 Google Maps SDK 转发地理编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21535187/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4