let map; let marker; function initMap() { map = new google.maps.Map(document.getElementById("map"), { center: { lat: 53.5461, lng: -113.4938 }, // Default center, e.g., Edmonton zoom: 10, }); map.addListener("click", (event) => { placeMarker(event.latLng); }); } function placeMarker(location) { if (marker) { marker.setPosition(location); } else { marker = new google.maps.Marker({ position: location, map: map, }); } // Pass the location to calculate delivery rate calculateDeliveryRate(location); } $w("#timeSlotDropdown").options = [ { label: "9:00 AM - 11:00 AM", value: "9-11" }, { label: "11:00 AM - 1:00 PM", value: "11-1" }, { label: "1:00 PM - 3:00 PM", value: "1-3" }, ]; function proceedToCheckout() { const deliveryDetails = { address: marker.getPosition().toString(), rate: $w("#deliveryRate").text, timeSlot: $w("#timeSlotDropdown").value, }; // Add custom order details to the checkout flow wixStores.addProductToCart("productID", { options: { DeliveryDetails: JSON.stringify(deliveryDetails) }, }).then(() => { wixLocation.to("/checkout"); }); }
top of page

Our Services

As a leading Construction Company in the Athabasca/Lac La Biche area, we know what exceptional and reliable service means. We’re committed to providing clients with a wide range of options, all with guaranteed quality and precision. From the beginning stages of the project all the way to the completion of the process, we work side-by-side with clients every step of the way.

Tanks.jpg

Certified Wastewater Design and Install

IMG_0566.jpg

Excavation

IMG_2456_edited.jpg

Aggregate Sales

IMG_0354.jpg

Water Management

BroomFinishphoto_553.jpg

Concrete Finishing

construction-300x200.jpg

Residential Construction Management

block-3.jpg

Hard and Soft Landscaping

IMG_9586.HEIC

Snow Removal

​

Services: Services

©2022 by Greencut Group. Proudly created with Wix.com

bottom of page
async function calculateDeliveryRate(destination) { const origin = "123 Aggregate Rd, Edmonton, AB"; // Your loading center const apiKey = "YOUR_API_KEY"; const url = `https://maps.googleapis.com/maps/api/directions/json?origin=${origin}&destination=${destination.lat()},${destination.lng()}&key=${apiKey}`; const response = await fetch(url); const data = await response.json(); if (data.routes && data.routes.length > 0) { const distance = data.routes[0].legs[0].distance.value / 1000; // Distance in km const deliveryRate = calculateRate(distance); displayDeliveryRate(deliveryRate); } } function calculateRate(distance) { const baseRate = 50; // Base delivery fee const perKmRate = 2; // Per km charge return baseRate + distance * perKmRate; } function displayDeliveryRate(rate) { $w("#deliveryRate").text = `$${rate.toFixed(2)}`; }