Skip to content
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

Autocomplete mode #1120

Open
jbelien opened this issue May 7, 2021 · 3 comments
Open

Autocomplete mode #1120

jbelien opened this issue May 7, 2021 · 3 comments

Comments

@jbelien
Copy link
Member

jbelien commented May 7, 2021

The last 2 PR are aiming to add autocomplete support.

I like the idea but I think we need to figure out a consistent way to implement that across all providers that offer autocompletion.


#1118 by @nassuf

$query->withData('autocomplete', true);

#1119 by @gdw96

$query->withData('mode', GoogleMapsPlaces::GEOCODE_MODE_AUTOCOMPLETE);

Personally, I would go for a new AutocompleteQuery class (see src/Common/Query) so we make it consistent and structured for every provider.
That being said, we would probably need to check how many provider offer autocompletion to see if it worth it.

Otherwise, I would go for solution 2 here above that seems more flexible.

Any insight on this topic @Nyholm @willdurand ?

@jbelien jbelien pinned this issue May 7, 2021
@gdw96
Copy link

gdw96 commented May 10, 2021

Note: Google Place Autocomplete returns limited information about places. It comes with Google Place details (the sessiontoken parameter allows, among other things, to link the two queries).

So I was planning to add Google Place Details [it also allows to return a place from its ID] in the same way as Google Place Autocomplete. But I'll wait for now.

All this to say, that the different providers that offer autocomplete do not necessarily return enough data. For example, Google Place Autocomplete returns very few data corresponding to the Address class.

@Nyholm
Copy link
Member

Nyholm commented May 10, 2021

Hm.. How many providers support auto complete?

Does it make sense to do bring them under a common interface? What would return values be? etc.

@jbelien
Copy link
Member Author

jbelien commented May 10, 2021

@gdw96 Thanks for the insight !

Maybe it doesn't make sense to add a common interface then...

I'll try to list the provider than have autocompletion (when I have some free time).

@jbelien jbelien unpinned this issue Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants