【问题标题】:Google Places are not ShowingGoogle 地方信息未显示
【发布时间】:2015-09-21 14:44:39
【问题描述】:

我在本教程中提到了Android – AutoCompleteTextView with Google Places Autocomplete API,但是当我输入 autocompleteTextView 时它没有显示位置。我已经尝试使用浏览器密钥(如所写)和 android 密钥但没有找到解决方案并且无法查看地点...帮助

已编辑:Logcat 错误Result = { "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 103.240.236.65, with empty referer", "predictions" : [], "status" : "REQUEST_DENIED"}

【问题讨论】:

  • 确保在开发者控制台中启用了 api。我建议您按照docs 中的步骤操作。

标签: java android google-maps google-maps-api-3 google-play-services


【解决方案1】:

找到了!

  1. 转到谷歌控制台https://console.developers.google.com/

  2. 启用此 api“用于 Web 服务的 Google Places Api”

  3. 创建服务器密钥(是的,服务器密钥)。

  4. 在输入中单击它并将其留空the input

  5. 拿钥匙然后这样使用

    https://maps.googleapis.com/maps/api/place/search/json?location=40.7463956,-73.9852992&radius=100&key=your_key_here

希望它的帮助:)

【讨论】:

    猜你喜欢
    • 2013-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-03
    • 1970-01-01
    • 2020-09-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多