没有得到任何附近的餐厅使用谷歌位置API

Not getting any nearby restaurant using Google place API

本文关键字:谷歌 位置 API 餐厅 任何附      更新时间:2023-09-26

我正在尝试获取用户Location附近所有餐厅的列表。对于某些坐标,我得到了结果,但对于某些位置,我一无所获。例如:

对此未得到任何结果:https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=77.04744149999999,28.5080526&半径=5000&type=restaurant=&密钥=%20AIzaSyBwJsemNhTY8_HZDc3wAfhUrY0xrLm6EWY

注:以上坐标为古尔冈23 A区贷款

正在为此获取结果:https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=41.6639,-83.5552&半径=5000&type=restaurant=&密钥=%20AIzaSyBwJsemNhTY8_HZDc3wAfhUrY0xrLm6EWY

有人能告诉我这里出了什么问题吗?

我能想到两个主要原因

1.您使用的坐标无效

2.附近根本没有在Google Place数据库中注册的餐厅

除此之外,我没有看到你使用API的方式有任何错误(顺便说一下,我得到了同样的结果)。