Autocomplete of address using google places in angular project

plugins

#1

I currently use the RadAutoCompleteTextView component and API calls, same as @vbudilov did in the thread: How to implement Google Places Autocomplete lookup with Angular, and it works perfectly, but I get only stores/businesses addresses, rather than specific addresses.
For example, the query: 6 Downing St, Westminster would autocomplete to the nearest store to that address, whereas I would like it to just autocomplete that specific address.

The API call I use is:

https://maps.googleapis.com/maps/api/place/nearbysearch/json” +
"?location=" + latitude + “,” + longitude +
"&radius=50000" +
"&keyword=" + text +
"&key=YOUR_GOOGLE_API_KEY"

Which plugin/call should I use in order to get actual addresses?


#2

The endpoint https://maps.googleapis.com/maps/api/place/autocomplete is what you’re looking for. Works great for me. Here’s the doc: https://developers.google.com/places/web-service/autocomplete


#3

Will try that and update later
Thank you!


#4

Worked perfectly, thanks again!


#5

@kpfdoe @freshlytyped Does this return just the address of the user, or places near the user? I need it to return the address of the user as I need to capture that for bookings. Please advise.


#6

Do you know of a way I can determine the user’s address based on their lat lng coordinates?