Reputation: 1779
I would like to search places around a specific location. I've tried to use the autocomplete search api https://developers.google.com/places/web-service/autocomplete however it's also returning results that aren't inside my search radius. Besides the response does not include the place location so I cannot manually remove places that are out of the radius.
I've also tried to use nearbysearch (https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters ) and textsearch (https://maps.googleapis.com/maps/api/place/textsearch/output?parameters) but they don't return any result when the query parameter has a partial name (example: searching with query "wa" instead of "walmart").
Is there any solution to find places around a location in ONE request to the place api ?
Upvotes: 4
Views: 3918
Reputation: 5481
By default, the Google Places API will prefer showing results within your search radius, but can return results outside the radius. The API also supports a parameter called strictbounds
that will limit the results to your search radius.
More information can be found here.
Upvotes: 5