Connecting with Google API

Who would I have to talk to, To integrate the annualloadbook app to an api that would track the miles in each state.

I know we integrate with Google maps for location services. 

Is it possible to use a Google service to track the miles driven in each state?

Where can I find this information or whom do I need to speak with or partner with to achieve this goal.

Currently the annualloadbook app tracks the “Fuel Gallons”, “Fuel Tax” for each state and totals them according to the dates selected. If i could track the miles in each state that would automate the IFTA reporting process completely from one source.

Solved Solved
0 9 310
1 ACCEPTED SOLUTION

After a meeting with Google maps team. The conclusion is that there is no way that we can total the miles in each state driven using the Google maps.

I know that there is app that can do it. But I believe that it will be too much to try on this app at this time

View solution in original post

9 REPLIES 9

Ok that’s going to take me awhile. I read it through and it makes sense, 

Now I need to understand how I can use it for my application

after reading the information I tried to write a script on a test app. It works only that with the script it only works from two locations that are known. So it tracks back and forth. 

I need to be able to track the miles from crossing a state line in the US until it crosses the next. Then have it log the miles each day that it does.

At the same time tho it will have to be shut off for bus or car travel.

Im going to have to study this a bit or work with someone that understands the script i need to work with.

 https://www.googlecloudcommunity.com/gc/Tips-Tricks/Getting-real-distance-and-arrival-time-between-t...

The trick for you is going to be the ability to identify State lines and distances traveled to/from them.  As far as I know, the Direction Service doesn't provide the ability to explicitly return this data by state lines.  

I do know of a couple options:

1)  Get the turn-by-turn steps returned from the Direction Service.  In the turn-by-turn details of a route there is embedded text such as "Entering California".  I don't know how accurate this might be for mileage and I've seen one example where it says "Passing through <<state>>".  (see image below)   If this works, then it's a matter of identifying the "Entering <<state>>" steps and then summing up the mileage to that point.  NOTE:  there is no guarantee this text will remain constant.  It could change at any time.

Screenshot 2025-02-03 at 8.45.30 PM.png

2)  If your routes are common - i.e. same roadways - you can build a table of those routes and determine the coordinates of where they cross each state line.  When it's time to calculate the mileage, lookup the included state line waypoints in your table and send them into the Directions Service.  You'll get back the route details with stops at each waypoint allowing you to calculate miles to, from and between state lines.

I hope this helps!!

Routes are Random

I had a meeting with Google Maps Developer. The only way to do random will be to create a script that will track the Google Maps when the Google app is launched from the Annualloadbook app Load book address from Shipper to Consignee .

Google maps will write to the script when crossing state lines recording miles and route.

My burden will be to write the script so that the data Google provides will have a table to write the Data to. To include the Route and the Columns for state miles.

The way I see it possibly is to create a table with columns that match Google {Google_ID}, {State},{State Miles},{Date} and then write the script to accept this data and make it track by Load Data from empty status to Shipper then to Consignee to the same ID. Then repeat.

with that then I know how to write the miles to add to the truck Odometer.

I tried this but I’m not able to make it work but

Im thinking that to start with if we can change the Origin and destination to match the Load data ID Start and stop pointsIMG_0628.jpeg

1. By using the Load data will be the first part of the script by setting the two points. Then Google maps would track state miles from that. But only launched from this table The ID has bot points that will be needed to track.

1a. The other trick will be to track after the end of this load data ID to the shipper of the next load data ID

2. Or seeing that we track all miles empty and loaded within the app, there may be just a way to track from state lines I’m not sure yet

 

 

IMG_0625.pngIMG_0627.png

Any Thoughts will be appreciated!

After a meeting with Google maps team. The conclusion is that there is no way that we can total the miles in each state driven using the Google maps.

I know that there is app that can do it. But I believe that it will be too much to try on this app at this time

Top Labels in this Space