I am trying to connect to google maps using the following url and code to fetch nearby places, but I am getting invalid request. What seems to be the issue here?
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)
The documentation says that only location
is required. That seems to be wrong, adding radius
to the query returns a result.
This works:
This doesn't work (returns "status" : "INVALID_REQUEST"
):