Forum Academy Marketplace Showcase Pricing Features

Connector API Google Directions Waypoints

I’m trying to call a directions API to calculate mileage but I’m having trouble formatting the waypoints. I feel like I’ve exhausted every permutation. The google documentation states that waypoints should be formatted as follows:
location: checkboxArray[i].value,
stopover: true,
It should be an array with multiple objects. Right now I have it getting one of the waypoints but it’s not picking up the other waypoints. Here are some screenshots of what I have. I’m not sure how to format it properly to display a route to all the addresses listed below.

Screen Shot 2021-04-01 at 2.53.22 PM

Screen Shot 2021-04-01 at 2.53.29 PM

Thanks to whoever reads this and wants to help me out :slight_smile: !!

Can someone please help me?