Add a Map and Address Autocomplete

Hello,

Does anybody have any suggestions on how I can add a map to a page I haven’t seen anywhere that indicates how to do this I am still getting used to the platform. Also is there anyway I can add an address autocomplete input field? Let me know if anyone has any suggestions.

Thanks, Luke

These two features are still on the roadmap – follow https://tracker.appgyver.com/feature-requests/p/map-component for the map component, and I created https://tracker.appgyver.com/feature-requests/p/address-autocomplete-input for the address autocomplete input field.

That said, if you integrate a REST API that provides you autocomplete suggestions for an address, you could make it so that as you type into the address field, it requests suggestions from the API, then renders them below the component as a list.

hi, I’ve been trying for a few days to interface my app in appgyver with google places to get the auto-completion of the addresses but without success. I was able to get the data from Places through a call with Postman, but when I try to replicate the same call in appgyver I get this answer:

Error: TypeError: Failed to fetch. Does the server allow CORS?status: undefined

Resource settings for Get record (GET)

Resource URL: https://maps.googleapis.com/maps/api/place/autocomplete/json?language=it&key=MYAPIKEYHERE&types=geocode&input=
Relative path: {ricerca}

any suggestions ? Thank you very much!!

Do a search exactly for this on the forum, many people shared their similar issues and some answers may lead you to a solution.

hello I tried to search for the exact error as suggested but none of the solutions in the other topics help me to solve my problem. Any other suggestions? thanks!

If you use Firebase, have you done any CORS setup?

hello, I using firebase in my app but I don’t have any CORS settings (at least from what I can see)

Check this in case it fixes your problem.

Thanks first for the detailed directions.
I ran everything and the shell responded fine but unfortunately I still get the same error when I try to call the Places API :frowning:

All I can suggest now is to check the google map API documentation, they may have a section for error handling.
They also have an online tool where you can simulate an API request. I can’t find the page anymore…

The strange thing is that my request works if I simulate it in POSTMAN or even if I enter the exact URL in my browser. There is something wrong with Appgyver, but I don’t understand what :frowning:

this is my request:
https://maps.googleapis.com/maps/api/place/autocomplete/json?language=it&key=MYKEY&types=geocode&input=colosseo

this works perfectly in POSTMAN

1 Like

She suggests inspecting the Dev Tool of your Chrome browser for some possible insights…

from my chrome console it would seem like a CORS problem.

What is the response from the network tab?
image

hello, here is the answer from the network tab.
thanks for your help!!

We need to see what’s under Payload, Preview and Risposta

here are the screenshots, thanks!



This does not seem a CORS issue, the CORS message is a default error message.
I have had the same problem with another no code tool and it was fixed with the quick Firebase setup.

You need to search for clues on the GET error in the google map API documentation.

thanks, I try to look for something there

Based on others’ posts, seems like the resource url should be just this:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?