1

您好,我正在使用 GOOGLE maps API for android,并且使用我的 API 密钥我能够绘制地图。

还增加了放大缩小功能。但是当我尝试从谷歌 API 获取数据时,它给了我 REQUEST_DENIED 错误消息。

这是我的查询字符串

https://maps.googleapis.com/maps/api/place/search/json?location=43.666,93.166&radius=5000&sensor=false&types=establishment&name=hotel&key={myKey}

我尝试了许多链接来生成密钥

也试过这个链接。

在过去的两天里,需要帮助解决这个问题。

4

1 回答 1

1

If your keyApi is a android key won't work because you need a browser api (leave in black for all access allowed). From this link

"Accessing Google places API involves a http/https request from the browser. The application key you created wouldn't work for the Google places as it needs a browser key. You need to create a new browser key on the Google API console clicking the "Create new Browser Key"

Also leave the Accept requests from these HTTP referers (web sites): blank so that it allows access to all referrers and include the key generated in your query URL."

于 2014-04-29T07:41:10.130 回答