I need a script that calculates how much you will spend on fuel for a trip.
The following fields should be present:
- address for the starting point;
- address for the ending point;
- dollars per gallon;
- miles per gallon (car’s average gas mileage).
Google Maps should be used to determine the distance between locations. Once you know the distance it is simple math to calculate the fuel cost.