Hi everyone, I’m going to show you the quickest and easiest way to access the autocomplete input of google maps.
STEP 1 :
Take the “search with results” element
STEP 2 :
Scroll through all the blocks and click on “search input” to open the workflow where it says “on change”.
STEP3 :
Delete all existing steps
STEP 4 :
Create thoses 2 variables (with the same properties)
STEP 5 :
Go back to the “on change” workflow and in the first step add a “change variable value” and reproduce this:
Add a “rest api request” and reproduce it IDENTICALLY:
THE URL : https://maps.googleapis.com/maps/api/place/autocomplete/json
TO GET YOUR API KEY FOLLOW THIS TUTORIAL
STEP 6 :
Go back to your input on the page and write something so that the input is not empty.
STEP 7 :
Then click on “test” and it should say “success”.
STEP 8 :
Add a “change variable value” and reproduce this (with the second variable you created earlier called “search result” :
STEP 9 :
Return to the page and click on the same block, then bind the list collection with the same variable as before.
Do the same for the text displaying the places
STEP 10 :
Now to make it so that when you click on an address the list closes follow this :
Click on the “on click” workflow already created
Remove everything that’s there
STEP 11 :
Change the variable value of the INPUT itself with the data representing the clicked location
Then change the variable value of the very first variable named “is writing” like this
FINAL STEP :
Finally, we’re going to make sure that when we click on a place, it closes the list automatically :
I hope this will be useful, so you can modify the ui as you wish and if you have any questions, let me know