How can I set latitude & longitude from a user’s address using Google Maps API and display it in the Google Map widget?

Integrations

Hi FlutterFlow fam! 👋

I’m working on a feature where the user can enter their address manually, and I want to:

  1. Use the Google Maps Geocoding API to convert that address into latitude and longitude.

  2. Display the returned coordinates on the Google Map widget in FlutterFlow.

✅ What I’ve done:

  • I already created a TextField for the address input.

  • I’m planning to use a custom function to fetch the coordinates using this API:
    https://maps.googleapis.com/maps/api/geocode/json?address=[USER_ADDRESS]&key=[API_KEY]

  • I want to return the LatLng and show it on the map.

💡 My main question:
How do I properly take the returned LatLng and update the Google Map widget with that new location?

Has anyone done something similar or have a best practice for this setup?

Thanks in advance for your help! 🙌

What have you tried so far?

✅ What I’ve done:

  • I already created a TextField for the address input.

  • I’m planning to use a custom function to fetch the coordinates using this API:
    https://maps.googleapis.com/maps/api/geocode/json?address=[USER_ADDRESS]&key=[API_KEY]

  • I want to return the LatLng and show it on the map.

Did you check FlutterFlow's Documentation for this topic?
No
3 replies