Google 地图附近搜索返回 Invalid_Request
Google Maps nearby search returning Invalid_Request
我正在尝试使用以下 url 和代码连接到 google 地图以获取附近的地点,但我收到无效请求。这似乎是什么问题?
let url = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=...&location=49.1804488%2C-122.7851227'
let results = await axios.get(url)
console.log(results.data)
console.log(results.status)
console.log(results.error_message)
console.log(results.info_messages)
documentation says that only location
is required. That seems to be wrong, adding radius
查询到returns一个结果。
这个有效:
这行不通 (returns "status" : "INVALID_REQUEST"
):
我正在尝试使用以下 url 和代码连接到 google 地图以获取附近的地点,但我收到无效请求。这似乎是什么问题?
let url = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=...&location=49.1804488%2C-122.7851227'
let results = await axios.get(url)
console.log(results.data)
console.log(results.status)
console.log(results.error_message)
console.log(results.info_messages)
documentation says that only location
is required. That seems to be wrong, adding radius
查询到returns一个结果。
这个有效:
这行不通 (returns "status" : "INVALID_REQUEST"
):