Hi, I'm trying to get address details using the custom code described on this topic:
https://toolset.com/forums/topic/separating-content-from-the-address-field/
It works when I fill the address field with some direction, but I would like to make it work also when I click on the "use my location" button. Can you help me?
thanks
Hello and thank you for contacting the Toolset support.
I am not sure to understand correctly what you are trying to build? Are you trying to get the city, zip code or other information from the Toolset Maps requests to the Goolge Maps APIs?
Toolset Maps, stores address fields as plain addresses, and also as latitudes and longitudes(used in distance search). When you enter an address, it asks Google for the latitude-longitude. But, when you use the "Use my location", it asks the browser platform for the coordinates, instead of Google Maps, API.
If, I understood correctly, that you want to get the city, zip code, or other information from the current user location, right?
You will need to perform a reverse geocoding API call manually because Toolset will not perform it in this case.
hidden link
You can listen for a "change" event on the address field, and check the value, which will be the coordinates.
I hope this helps. Let me know if you have any questions.
Hi, I decided for a different solution.
Thank you!