_placesClient lookUpPlaceID既不执行也不显示任何错误

时间:2015-06-19 06:54:36

标签: ios google-places-api

我正在使用地方ID来获取我关注的地方的详细信息 https://developers.google.com/places/ios/place-details

NSString * placeID ;//= place.placesId;
placeID=place.placesId;

[_placesClient lookUpPlaceID:place.placesId callback:^(GMSPlace *place,     NSError *error) {
    if (error != nil) {
        NSLog(@"Place Details error %@", [error localizedDescription]);
        return;
    }

    if (place != nil) {
        NSLog(@"Place name %@", place.name);
        NSLog(@"Place address %@", place.formattedAddress);
        NSLog(@"Place placeID %@", place.placeID);
        NSLog(@"Place attributions %@", place.attributions);
    } else {
        NSLog(@"No place details for %@", placeID);
    }
}];

但是代码没有执行和跳转语句

[_placesClient lookUpPlaceID:place.placesId callback:^(GMSPlace *place, NSError *error) {
    ...
}];

任何线索,我也按如下方式初始化_place客户端

_placesClient = [[GMSPlacesClient alloc] init];

0 个答案:

没有答案