相关疑难解决方法(0)

是否可以使用谷歌地图从坐标获取地址?

我只是好奇.也许是为了未来的项目.我想知道是否可以通过Google API从给定坐标中检索地址.

google-maps google-maps-api-3

18
推荐指数
2
解决办法
4万
查看次数

在iOS中获取纬度和经度的位置名称

我想从纬度和经度中找到当前位置名称,

这里是我的代码片段我试过,但我的日志显示,除了在所有的地方空值placemark,placemark.ISOcountryCodeplacemark.country

我想要的价值placemark.locality,并placemark.subLocality却是露出空值.

- (void)viewWillAppear:(BOOL)animated
{
     [super viewWillAppear:animated];

    // this creates the CCLocationManager that will find your current location
    locationManager = [[CLLocationManager alloc] init];
    locationManager.delegate = self;
    locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters;
    [locationManager startUpdatingLocation];

}

// this delegate is called when the app successfully finds your current location
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
    CLGeocoder *geocoder = [[CLGeocoder alloc] init];
    [geocoder reverseGeocodeLocation:locationManager.location
                   completionHandler:^(NSArray *placemarks, NSError *error) {
                       NSLog(@"reverseGeocodeLocation:completionHandler: Completion Handler called!"); …
Run Code Online (Sandbox Code Playgroud)

iphone reverse-geocoding cllocationmanager ipad ios

16
推荐指数
3
解决办法
4万
查看次数