I want to do something similar to what this person is asking here question.
I want to have a map which shows the location of the user → this I have already achieved. Then I want to use a search field, where I enter “restaurants” as a search key, OR it would also be possible to press some kind of button where if I click, it shows me the restaurants within a certain distance. I DO NOT want to use a static list of places. I want Google Maps to search for results and list them dynamically.
Once listed I would then click on them to do other actions, like show details, etc. I want it to work exactly like Google Maps app (see screenshot), and then add additional functionalities on top of that.
So far I am only able to find information about navigation, or about listing places contained in a preexisting uploaded list.
Thanks for your help!
You’ll want to use Google’s “Find Place” API as an external collection.
Here is the documentation from Google: https://developers.google.com/maps/documentation/places/web-service/search-find-place
Hello again, thanks for your feedback!
I was playing around with the API a bit and I have to concerns:
1- how can I use the multiple results (i.e. an array) from an api, to inject them as multiple entries in the screen (i.e. the multiple results for restaurants and have them listed)
1-a) apparently this would be possible with collections, but I need to use a dynamic generated database (i.e. as the response coming from the api)
2- how can I user the user location as a parameter for the google places get request? for example, I want to find a certain type of restaurants, which are within a radius of x meters away from the user. I see that one can use variables for the api call, but is it possible to use dynamic variables like user location coordinates?
Thanks in advance!