-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domestic address javascript component autocomplete #72 #75 [TGER-140] #90
Domestic address javascript component autocomplete #72 #75 [TGER-140] #90
Conversation
@kylebarney When you get a chance, could you make sure this is implementing the Google Places Autocomplete (TIPOFF/laravel-google-api#18) as you had in mind with the tipoff/laravel-google-api package? |
https://developers.google.com/maps/documentation/places/web-service/autocomplete In the example of the JSON response, the JSON object -> predictions -> terms, the address is split into terms/parts. |
…ipt_component_autocomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drewroberts To your question on this PR earlier this week, this code is using a client-side implementation rather than the server-side one that is included in the package that I pulled into laravel-google-api
. If we wanted to go the server-side route, we would need to send a call to our own server and have that proxy through to the Places API like so: (app()->make(\SKAgarwal\GoogleApi\PlacesApi::class))->placeAutocomplete('query-input');
That being said, either approach will work. The client-side approach would make for a snappier experience, possibly at the expense of a little extra cost and less protection against abuse of the API key. The server-side could take a bit longer to respond since it is being proxied, but we could add rate-limiting if the number of requests/spamming is a concern.
Thank you, @kylebarney. Let's stick with this implementation then and we can refactor later if necessary to have rate-limiting functionality. |
Please delete/don't merge this PR. I created a new PR to replace this. |
** do not TEST or merge, I need to add session tokens.
Need a test environment.