Google Places自动完成功能无法正常运行

时间:2019-07-11 08:33:51

标签: flutter google-places-api

每日限额真的只有1个请求吗?还是我遗漏了什么?有时我会收到建议,但它们消失了,在Google控制台指标上,我有403错误的97%。我使用默认的以下代码:


Future<Null> displayPrediction(Prediction p) async {
    const kGoogleApiKey = "";
    GoogleMapsPlaces _places = GoogleMapsPlaces(apiKey: kGoogleApiKey);

    if (p != null) {
      PlacesDetailsResponse detail =
          await _places.getDetailsByPlaceId(p.placeId);


      var address = await Geocoder.local.findAddressesFromQuery(p.description);

      // print(lat);
      // print(address);
    }
  }

Prediction p = await PlacesAutocomplete.show(
                          context: context, apiKey: kGoogleApiKey);
                      displayPrediction(p);


0 个答案:

没有答案