【问题标题】:Current Place error The operation couldn’t be completed. (Google Place SDK, autocomplete error)当前位置错误 操作无法完成。 (Google Place SDK,自动完成错误)
【发布时间】:2016-08-26 15:57:48
【问题描述】:

两天后,我收到以下错误消息: “Places API 库中出现内部错误。如果您认为此错误代表错误,请使用我们社区和支持页面 (https://developers.google.com/places/support) 上的说明提交报告。”

这是我的代码:

 -(void)GetCurrentLocation {

    [_locationPoint setHidden:NO];
    [_placesClient currentPlaceWithCallback:^(GMSPlaceLikelihoodList *likelihoodList, NSError *error) {
        if (error != nil) {
            NSLog(@"Current Place error %@", [error localizedDescription]);
            return;
        }

        for (GMSPlaceLikelihood *likelihood in likelihoodList.likelihoods) {
            GMSPlace *place = likelihood.place;
            NSLog(@"Current Place name %@ at likelihood %g", place.name, likelihood.likelihood);
            NSLog(@"Current Place address %@", place.formattedAddress);
            _depart.text = place.formattedAddress;
            NSLog(@"Current Place attributions %@", place.attributions);
            NSLog(@"Current PlaceID %@", place.placeID);
            NSLog(@"coordinates %f,%f",place.coordinate.latitude,place.coordinate.longitude);
        }

    }];
}

没看懂,代码没改,突然出现这个错误。

Google Maps SDK for iOS 和 Google Places API for iOS 版本:2.0.26137.0

【问题讨论】:

    标签: ios objective-c google-places-api


    【解决方案1】:

    您收到此错误是因为您已超过每天 1000 次点击限制,您可以通过购买 Google Web 服务 API 来扩大您的限制,因此read google official doc.

    【讨论】:

      【解决方案2】:

      当您将 podFile 更新到新版本并更改 podFile.Lock 时,会发生此问题 转到旧的podFile.Lock 并查看谷歌地图版本。 如果有任何更改,只需复制旧的podiflie.Lock 并粘贴到当前。

      Pod 安装,我认为它会像魅力一样工作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-10-22
        • 2023-03-29
        • 1970-01-01
        • 2017-07-10
        • 2018-01-26
        • 2018-09-24
        • 1970-01-01
        相关资源
        最近更新 更多