I'm working on integrating the Google Maps Distance Matrix API to calculate the distance between two locations (Homeowner and Freelancer). I’ve successfully set up the API key and enabled the necessary Google services (Geocoding, Places, and Distance Matrix APIs). However, I’m stuck on calling the API and binding the data dynamically to my app.
Here’s the setup:
Freelancer’s location is stored in Firestore and set as the
origins
.Homeowner’s location is stored in Firestore and set as the
destinations
.
What I Need Help With:
How to query multiple Homeowner locations from Firestore and format them dynamically for the API call.
Properly binding the Distance Matrix API response to the quest list.
Filter based off a certain distance (only show up to 50 miles away)