I want to build a simple auto suggest powered by Google Places APIs but am unable to do so.
I can’t use the in-built Searchbox as it doesn’t expose few parameters that Google Places APIs support. (The ones mentioned here: https://developers.google.com/places/web-service/autocomplete)
I have also tried “Google Maps Extended”, “Google Places by airdev”, and “Google Autocomplete” plugins, but facing some or the other issue with all of these.
I even tried the “Repeating group” method where I create an input text box to take input from user, and show results in an RG. However, it shows results and in a blink it disappears.
Any suggestions on how to go about it?
Anyone knowledgeable about it?
I was wondering if you ever figured this out. I’m trying to do the same thing to access additional parameters (mostly session token), but am struggling to build a working version manually.
No, I didn’t. I left it as is. Would like to get a solution if I can. Please let me know if you come across someone who can help you with it.
I was able to get this partially working today. I setup a connection to the Google Places API using the API Connector plugin.
I then created an input and a Group Focus element that’s relative to the input. Within the Group Focus, I created a repeating group, with a text element for each line.
The repeating group has these settings:
(The type of content is set to Get Places Autocomplete prediction, although the name will vary depending on what you name your API call)
And the text element is set to this to pull in the predicted addresses:
Then set up a workflow to show the Group Focus when the input is not empty:
That gives me this when typing into the input:
That’s as far as I’ve gotten. I’m struggling to get the selected address to populate the input correctly, and the group focus element is still a bit glitchy in getting it to show up every time. I’m still fairly new to bubble – these might be simple tasks for someone with a bit more experience. Anyway, I hope this might be helpful to you.
If I can’t get this to work, I’m considering switching to Algolia Places using a plugin.
Thanks for sharing this. I’ll keep this in mind whenever I get to it next.