I am interested being able to use PowerBuilder to iterate through rows in a datawindow and make calls to Google Maps Routing Service to get drivetime and distance (numerical values (e.g. 176, not '2 hours 56 mins')) and store those values in a table.
I think Inet used to be the way to go here, but I understand that HTTPClient introduced recently might be easier to use.
I am hoping for some guidance on what things in what order I would need to do in order to accomplish this.
The resulting code will be published on CodeXchange with attribution.
Essentially, I need to iterate through 8,400 rows of data and get the drivetime (in minutes) and distance (as numerical value) and the same table where the data lives.
I am willing to put some effort into this if someone can kindly provide some guidance.
I think it goes as follows:
- Call Google Maps Routing function using Origin and Destination Lat/Longs to get DriveTime / Distance as values (as shown in screenshot).
- Parse out drivetime and mileage for each response.
- Set variables in the same DW for DriveTime / Distance
- Update the DW.
I know it is a gross oversimplication...Sorry.