I am pretty sure I can still (at least you used to) get suggested and autofill on google map api and mapbox does not look like it supports it yet, at least in the US.
@Momen - Any reason I should not use google maps api?
I am pretty sure I can still (at least you used to) get suggested and autofill on google map api and mapbox does not look like it supports it yet, at least in the US.
@Momen - Any reason I should not use google maps api?
Currently, we do not have direct support for Google Maps, and we won’t be considering it in the near future. You should be able to achieve the desired effect by configuring the Google Maps API yourself. My suggested steps are as follows:
Add the Autocomplete API (Place Autocomplete API) and the API to retrieve geographic coordinates (Place Details API).
In the text input component’s on change action, call the Place Autocomplete API, and assign the array portion of the results to a page variable of type JSON list. Then, use local data as the data source for the list component, and use the json_extract_path function to extract the specific information within the list item.
When a list item is selected, call the Place Details API. On success, use the retrieved coordinates and other information to add to the database (you might also need a database trigger to handle the conversion of coordinates into a geo point type).
However, I’m not sure if you only need to fill in the location, or if you also need to display coordinates or use them for sorting. Essentially, the action is to trigger the Autocomplete API when the input box component changes its behavior. If you simply need to use the first returned result without question, you could directly use the Set Input Value action, combined with a formula, to overwrite the original content with the first location matching the input. If you need to submit the data to a database, it might be more convenient to store the data in a page variable first, making it easier for subsequent calls to the Place Details API.
The whole logic is a bit complex. You can try it first; I haven’t configured it this way myself, so I can’t guarantee 100% correctness, but it’s an idea to start with.