//Page code export function buttonCalc_click(event) { distance($w("#startingPoint").value, $w("#endPoint").value) .then(function (resp) { let distanceInMiles = parseFloat(resp.rows[0].elements[0].distance["text"], 10); distanceInMiles *= 1.00; distanceInMiles = distanceInMiles.toFixed(2); let duration = resp.rows[0].elements[0].duration["text"]; let miles = resp.rows[0].elements[0].distance["text"] // printing the result on the screen $w("#result").value = distanceInMiles; $w("#duration").value = duration; $w("#textboxMiles").value = miles; }) } //Backend file code export async function distance(origin, destination) { const secret = await wixSecretsBackend.getSecret("apiDistance"); const distanceUrl = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial"; const url = distanceUrl + `&origins=` + origin + `&destinations=` + destination + `&key=${secret}`; return fetch(url, { method: 'get' }) .then((httpResponse) => httpResponse.json()); }
top of page

Choose Your Service

I'm a paragraph. Click here to add your own text and edit me. I’m a great place for you to tell a story and let your users know a little more about you.

Supply Sprinters.png

Construction
Material Delivery

job staging

all the supplies delivered to your job before the start date

one stop delivery
within hours

$49+

$175+

*price varies by load size, weight, distance, and rush

bottom of page