Distance and travel time calculator

This calculator connects with the Google Maps API in order to calculate distance (in miles or metric units) and driving time (in hours or minutes).

    [group result_miles]

    [/group]

    [group result_km]

    [/group]

    Source code for this form:

    <label>Starting address:
    [address start]</label>
    
    <label>Destination address:
    [address finish]</label>
    
    <label>Units:
    [radio units "miles" "kilometers"]</label>
    
    [calculate_button calculate_button-1 "Calculate"]
    
    [group result_miles]
    <label>Road travel distance:
    [calculation distance_mi precision:2 "fn_distance(start, finish, miles)"] miles</label>
    [/group]
    
    [group result_km]
    <label>Road travel distance:
    [calculation distance_km precision:2 "fn_distance(start, finish, km)"] km</label>
    [/group]
    
    <label>Travel time:
    [calculation travel_time precision:1 "fn_travel_time(start, finish, h)"] hours</label>