{"id":463,"date":"2023-01-12T18:44:37","date_gmt":"2023-01-12T18:44:37","guid":{"rendered":"http:\/\/localhost\/context\/?page_id=463"},"modified":"2024-01-12T18:11:50","modified_gmt":"2024-01-12T18:11:50","slug":"locations","status":"publish","type":"page","link":"https:\/\/pridetruckwash.com\/index.php\/locations\/","title":{"rendered":"Locations"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"463\" class=\"elementor elementor-463\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5637305 e-flex e-con-boxed e-con e-parent\" data-id=\"5637305\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d013631 carfresh-star-rating--align-center elementor-widget elementor-widget-witr_section_title\" data-id=\"d013631\" data-element_type=\"widget\" data-widget_type=\"witr_section_title.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<!-- title left -->\n\t\t\t\t\t<div class=\"witr_section_title\">\n\t\t\t\t\t\t<div class=\"witr_section_title_inner text-left\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- icon position -->\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- end icon position -->\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- title top -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h2>Pride Truck Wash<\/h2>\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- icon position -->\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- end icon position -->\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- title middle -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>Locations Details\n<\/h3>\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- title bottom -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- icon position -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- image -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- icon -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- bar -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!-- circle bar -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- end icon position -->\n\n\t\t\t\t\t\t\t<!-- content -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Hours and Details <\/p>\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<!-- inner title -->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<\/div>\t\t\t\t\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7bca789 elementor-widget elementor-widget-shortcode\" data-id=\"7bca789\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-shortcode\"><script src=\"https:\/\/maps.googleapis.com\/maps\/api\/js?key=AIzaSyBbEd-pS63MHzuYOnjMFw3GtowDICa2gwk&callback=initMapLoc\" async defer><\/script>\n\t      <div id=\"map\" style=\"width: 100%; height: 500px;\">Google Maps API<\/div><div id=\"locationContainer\"><\/div>\n\n    <script>\n    var addresses = []; \/\/ Global array to store addresses\n    var locations = [{\"branchno\":\"5\",\"branchid\":\"FW\",\"name\":\"FRANKLIN - West\",\"add1\":\"2940 Scottsville Road\",\"add2\":\"\",\"city\":\"Franklin\",\"state\":\"KY\",\"zip\":\"42134\",\"zone\":\"America\\\/Chicago\",\"phone\":\"270-586-0116\",\"email\":\"eric@pridetruckwash.com\",\"bays\":\"3\",\"branchcode\":\"FRAW\",\"shift1start\":\"5:00 AM\",\"shift2start\":\"8:00 AM\",\"shift3start\":\"4:00 PM\",\"shift1end\":\"8:00 AM\",\"shift2end\":\"4:00 PM\",\"shift3end\":\"11:00 PM\",\"opentickets\":0,\"workmen\":\"10\",\"waitingtruck\":\"0\",\"averageWaitTime\":\"00:14\"},{\"branchno\":\"3\",\"branchid\":\"HB\",\"name\":\"HEBRON\",\"add1\":\"3570 E. 181ST AVENUE\",\"add2\":\"\",\"city\":\"HEBRON\",\"state\":\"IN\",\"zip\":\"46341\",\"zone\":\"America\\\/Chicago\",\"phone\":\"219-696-4550\",\"email\":\"steve@pridetruckwash.com\",\"bays\":\"3\",\"branchcode\":\"HEBN\",\"shift1start\":\"5:00 AM\",\"shift2start\":\"8:00 AM\",\"shift3start\":\"4:00 PM\",\"shift1end\":\"8:00 AM\",\"shift2end\":\"4:00 PM\",\"shift3end\":\"11:00 PM\",\"opentickets\":0,\"workmen\":\"21\",\"waitingtruck\":\"0\",\"averageWaitTime\":\"00:17\"},{\"branchno\":\"2\",\"branchid\":\"KX\",\"name\":\"KNOXVILLE\",\"add1\":\"1651 Everett Road\",\"add2\":\"\",\"city\":\"Knoxville\",\"state\":\"TN\",\"zip\":\"37932\",\"zone\":\"America\\\/New_York\",\"phone\":\"865-539-0035\",\"email\":\"bill@pridetruckwash.com\",\"bays\":\"3\",\"branchcode\":\"KNOX\",\"shift1start\":\"5:00 AM\",\"shift2start\":\"8:00 AM\",\"shift3start\":\"4:00 PM\",\"shift1end\":\"8:00 AM\",\"shift2end\":\"4:00 PM\",\"shift3end\":\"1:00 AM\",\"opentickets\":1,\"workmen\":\"9\",\"waitingtruck\":\"0\",\"averageWaitTime\":\"00:04\"},{\"branchno\":\"4\",\"branchid\":\"SP\",\"name\":\"SHEPHERDSVILLE\",\"add1\":\"1116 Cedar Grove Road\",\"add2\":\"\",\"city\":\"Shepherdsville\",\"state\":\"KY\",\"zip\":\"40165\",\"zone\":\"America\\\/New_York\",\"phone\":\"502-543-1911\",\"email\":\"anthony@pridetruckwash.com\",\"bays\":\"4\",\"branchcode\":\"SHEP\",\"shift1start\":\"4:00 AM\",\"shift2start\":\"8:00 AM\",\"shift3start\":\"4:00 PM\",\"shift1end\":\"8:00 AM\",\"shift2end\":\"4:00 PM\",\"shift3end\":\"12:00 AM\",\"opentickets\":0,\"workmen\":\"20\",\"waitingtruck\":\"1\",\"averageWaitTime\":\"00:23\"}];\n    var branch_hours = {\n  \"branchhours\": [\n    {\n      \"branch\": \"HB\",\n      \"weekdaystart\": \"6:00 AM\",\n      \"weekdayend\": \"9:00 PM\",\n      \"weekendstart\": \"6:00 AM\",\n      \"weekendend\": \"7:00 PM\"\n    },\n    {\n      \"branch\": \"KX\",\n      \"weekdaystart\": \"6:00 AM\",\n      \"weekdayend\": \"11:00 PM\",\n      \"weekendstart\": \"6:00 AM\",\n      \"weekendend\": \"9:00 PM\"\n    },\n    {\n      \"branch\": \"SP\",\n      \"weekdaystart\": \"6:00 AM\",\n      \"weekdayend\": \"9:00 PM\",\n      \"weekendstart\": \"6:00 AM\",\n      \"weekendend\": \"7:00 PM\"\n    },\n    {\n      \"branch\": \"FW\",\n      \"weekdaystart\": \"6:00 AM\",\n      \"weekdayend\": \"9:00 PM\",\n      \"weekendstart\": \"6:00 AM\",\n      \"weekendend\": \"7:00 PM\"\n    }\n    \/\/ Add more branches as needed\n  ]\n};\n\n    var locationContainer = document.getElementById('locationContainer');\n\n    for (var i = 0; i < locations.length; i++) {\n      var blocation = locations[i];\n      var name = blocation.name;\n      var address = blocation.add1;\n      var address2 = blocation.add2;\n      var city = blocation.city;\n      var state = blocation.state;\n      var zip = blocation.zip;\n      var zone = blocation.zone;\n      var phone = blocation.phone;\n      var email = blocation.email;\n      var bays = blocation.bays - 1;\n      var openTickets = blocation.opentickets;\n      var waitingTrucks = blocation.waitingtruck;\n      var workingMen = blocation.workmen;\n      var avgWait = blocation.averageWaitTime;\n\n\t\/\/ Add name, phone, and email to the address string\n\tvar fullAddress = name + ', ' + phone + ', ' + email + ', ' + address + (address2 ? ', ' + address2 : '') + ', ' + city + ', ' + state + ' ' + zip;\n\n  \t\/\/ Push address to the global addresses array\n  \taddresses.push(fullAddress);\n\n\tvar shift1Start = blocation.shift1start; \n\tvar shift1End = convertToDateTime(blocation.shift1end); \n\tvar shift2End = blocation.shift2end !== 'NA NA' ? convertToDateTime(blocation.shift2end) : shift1End; \n\tvar shift3End = blocation.shift3end !== 'NA NA' ? convertToDateTime(blocation.shift3end) : shift2End;\n\tvar latestShiftEnd;\n\n\t\/\/ Determine the latest shift end time\n\tvar latestShiftEnd = shift1End;\n\tif (shift2End && shift2End.getTime() > latestShiftEnd.getTime()) {\n  \t\tlatestShiftEnd = shift2End;\n\t}\n\tif (shift3End && shift3End.getTime() > latestShiftEnd.getTime()) {\n  \t\tlatestShiftEnd = shift3End;\n\t}\n\n\t\/\/OVerRide POS Hours for Shifts Start End\n\tvar branchTimings = getBranchHours(blocation.branchid);\n\n\tif (branchTimings) {\n    \t\/\/console.log('Branch Hours:', branchTimings);\n    \t\/\/ You can access the timings like this:\n    \tconsole.log('Weekday Start:', branchTimings.weekdaystart);\n    \tconsole.log('Weekday End:', branchTimings.weekdayend);\n    \tconsole.log('Weekend Start:', branchTimings.weekendstart);\n    \tconsole.log('Weekend End:', branchTimings.weekendend);\n\t} else {\n    \tconsole.log('Timings for branch ID not found:', myBranchId);\n\t}\n\t\n\t\/\/ Get the current date and day of the week\n\tvar currentDate = new Date();\n\tvar currentDayOfWeek = currentDate.getDay();\n\n\t\/\/ Check if it's a weekday (Monday (1) to Friday (5))\n\tvar isWeekday = currentDayOfWeek >= 1 && currentDayOfWeek <= 5;\n\n\t\/\/Branch Time\n\t\/\/ Convert back to original time format for display\n\t\/\/var hoursOfOperation = 'Hours: ' + shift1Start + ' - ' + formatTime(latestShiftEnd);\n\n\tvar hoursOfOperationWeek = 'Mon - Fri: ' + branchTimings.weekdaystart + ' - ' + branchTimings.weekdayend;\n\tvar hoursOfOperationWeekend = 'Sat & Sun: ' + branchTimings.weekendstart + ' - ' + branchTimings.weekendend; \n \n    \tif (isWeekday) {\n        \/\/ It's a weekday, so do something with the weekday times\n        console.log('It is a weekday.');\n\n\t\/\/ Get the current date and time\n\tvar currentDate = new Date();\n\n\t\/\/ Format the current time as a string with the timezone\n\tvar currentTimeString = currentDate.toLocaleTimeString('en-US', { timeZone: zone });\n\n \t\/\/ Check if the operation hours are 24 hours\n\tif (hoursOfOperationWeek === 'Mon - Fri: 12:00 AM - 12:00 AM') {\n  \t\thoursOfOperationWeek = 'Mon - Fri: 24 Hours';\n\t\tisOpen = true; \/\/ Open 24 hours\n\t}\n\telse {\n\t\/\/OverRide \n\tshift1Start = branchTimings.weekdaystart;\n\tlatestShiftEnd = convertToDateTime(branchTimings.weekdayend);\n\n\t\/\/ Parse the shift start time\n\tvar shiftStartParts = shift1Start.split(' ');\n\tvar shiftStartHour = parseInt(shiftStartParts[0].split(':')[0], 10);\n\tvar shiftStartMinute = parseInt(shiftStartParts[0].split(':')[1], 10);\n\tif (shiftStartParts[1] === 'PM' && shiftStartHour !== 12) {\n  \t\tshiftStartHour += 12;\n\t} else if (shiftStartParts[1] === 'AM' && shiftStartHour === 12) {\n  \t\tshiftStartHour = 0;\n\t}\n\n\tvar shiftEndHour = latestShiftEnd.getHours();\n\tvar shiftEndMinute = latestShiftEnd.getMinutes();\n\n\t\/\/ Get the current time as hours and minutes\n\tvar currentTimeParts = currentTimeString.split(':');\n\tvar currentHour = parseInt(currentTimeParts[0], 10);\n\tvar currentMinute = parseInt(currentTimeParts[1], 10);\n\tif (currentTimeString.includes('PM') && currentHour !== 12) {\n  \t\tcurrentHour += 12;\n\t} else if (currentTimeString.includes('AM') && currentHour === 12) {\n  \t\tcurrentHour = 0;\n\t}\n\n\t\/\/ Determine if the branch is open\n\tvar isOpen = false;\n\n\t\/\/ Handle cases where the shift ends the next day (e.g., 12:00 AM of the next day)\n\tvar isShiftEndNextDay = (shiftEndHour === 0 && shiftEndMinute === 0);\n\n\tif (isShiftEndNextDay) {\n  \t\/\/ If the current time is after the start time but before midnight\n  \tif ((currentHour > shiftStartHour || (currentHour === shiftStartHour && currentMinute >= shiftStartMinute))) {\n    \t\tisOpen = true;\n  \t}\n\t} else {\n  \t\/\/ The regular check if the current time is between the shift start and end times\n  \tif (\n    \t\t(currentHour > shiftStartHour || (currentHour === shiftStartHour && currentMinute >= shiftStartMinute)) &&\n    \t\t(currentHour < shiftEndHour || (currentHour === shiftEndHour && currentMinute <= shiftEndMinute))\n  \t) {\n    \tisOpen = true;\n  \t}\n\t}\n\n\t}\n    \t} else {\n        \/\/ It's a weekend, so do something with the weekend times\n        console.log('It is a weekend.');\n\n\t\/\/ Get the current date and time\n\tvar currentDate = new Date();\n\n\t\/\/ Format the current time as a string with the timezone\n\tvar currentTimeString = currentDate.toLocaleTimeString('en-US', { timeZone: zone });\n\n   \t\/\/ Check if the operation hours are 24 hours\n\tif (hoursOfOperationWeekend === 'Sat & Sun: 12:00 AM - 12:00 AM') {\n  \t\thoursOfOperationWeekWeekend = 'Sat & Sun: 24 Hours';\n\t\tisOpen = true; \/\/ Open 24 hours\n\t}\n\telse {\n\n\tshift1Start = branchTimings.weekendstart;\n\tlatestShiftEnd = convertToDateTime(branchTimings.weekendend);\n\n\t\/\/ Parse the shift start time\n\tvar shiftStartParts = shift1Start.split(' ');\n\tvar shiftStartHour = parseInt(shiftStartParts[0].split(':')[0], 10);\n\tvar shiftStartMinute = parseInt(shiftStartParts[0].split(':')[1], 10);\n\tif (shiftStartParts[1] === 'PM' && shiftStartHour !== 12) {\n  \t\tshiftStartHour += 12;\n\t} else if (shiftStartParts[1] === 'AM' && shiftStartHour === 12) {\n  \t\tshiftStartHour = 0;\n\t}\n\n\tvar shiftEndHour = latestShiftEnd.getHours();\n\tvar shiftEndMinute = latestShiftEnd.getMinutes();\n\n\t\/\/ Get the current time as hours and minutes\n\tvar currentTimeParts = currentTimeString.split(':');\n\tvar currentHour = parseInt(currentTimeParts[0], 10);\n\tvar currentMinute = parseInt(currentTimeParts[1], 10);\n\tif (currentTimeString.includes('PM') && currentHour !== 12) {\n  \t\tcurrentHour += 12;\n\t} else if (currentTimeString.includes('AM') && currentHour === 12) {\n  \t\tcurrentHour = 0;\n\t}\n\n\t\/\/ Determine if the branch is open\n\tvar isOpen = false;\n\n\t\/\/ Handle cases where the shift ends the next day (e.g., 12:00 AM of the next day)\n\tvar isShiftEndNextDay = (shiftEndHour === 0 && shiftEndMinute === 0);\n\n\tif (isShiftEndNextDay) {\n  \t\/\/ If the current time is after the start time but before midnight\n  \tif ((currentHour > shiftStartHour || (currentHour === shiftStartHour && currentMinute >= shiftStartMinute))) {\n    \t\tisOpen = true;\n  \t}\n\t} else {\n  \t\/\/ The regular check if the current time is between the shift start and end times\n  \tif (\n    \t\t(currentHour > shiftStartHour || (currentHour === shiftStartHour && currentMinute >= shiftStartMinute)) &&\n    \t\t(currentHour < shiftEndHour || (currentHour === shiftEndHour && currentMinute <= shiftEndMinute))\n  \t) {\n    \tisOpen = true;\n  \t}\n\t}\n\n\t}\n\t}\n\n\t\/\/if (hoursOfOperation === '24 Hours') {\n  \t\t\/\/isOpen = true; \/\/ Open 24 hours\n\t\/\/}\n\n\t\/\/ Display the open or closed status\n\tvar status = isOpen ? 'Open' : 'Closed';\n\n      var row = document.createElement('div');\n      row.classList.add('row'); \n\n      \/\/ Create a single cell for name, address, phone and email\n      var detailsCell = document.createElement('div');\n      detailsCell.classList.add('col-sm-6', 'col-md-4'); \/\/ Bootstrap classes for responsive layout\n      detailsCell.innerHTML = '<br><h4 style=\"color: #FB7E0C;\">' + name + '<\/h4>' +\n                              'Address: ' + address + (address2 ? ', ' + address2 : '') + '<br>' + city + ', ' + state + ' ' + zip + '<br>' +\n                              'Phone: ' + phone + '<br>' +\n                              'Email: ' + email + '<br>';\n      row.appendChild(detailsCell);\n\n      \/\/ Add branch details to second column\n      var branchDetailsCell = document.createElement('div');\n      branchDetailsCell.classList.add('col-sm-6', 'col-md-4'); \/\/ Bootstrap classes for responsive layout\n      branchDetailsCell.innerHTML = '<br><h4 style=\"color: #FB7E0C;\">Branch Details<\/h4> ' + 'Number of Bays\/Washouts: ' + bays + '<br>' + hoursOfOperationWeek + '<br>' + hoursOfOperationWeekend + '<br>Branch Time: ' + currentTimeString + '<br>Currently: ' + status;\n      row.appendChild(branchDetailsCell);\n\n\t\/\/ Assuming avgWait is a string convert it to minutes\n\tvar avgWaitMinutes = convertTimeToMinutes(avgWait);\n\n\t\/\/ Parse integers from the openTickets and waitingTrucks variables\n\tvar openTicketsInt = 0;\n\tvar waitingTrucksInt = parseInt(waitingTrucks, 10);\n\tvar baysInt = parseInt(bays, 10);\n\n\t\/\/ Ensure avgWaitMinutes is a number\n\tvar avgWaitMinutesNum = Number(avgWaitMinutes);\n\n\tif (openTickets >= baysInt) {\n    \t\topenTicketsInt = 1;\n\t}\n\n\t\/\/ Now calculate the current wait time\n\tvar iteminwait = openTicketsInt + waitingTrucksInt;\n\tvar currentWaitTime = iteminwait * avgWaitMinutesNum;\n\n      \/\/ Add wait time to third column\n      var waitTimeCell = document.createElement('div');\n      waitTimeCell.classList.add('col-sm-12', 'col-md-4'); \/\/ Bootstrap classes for responsive layout\n      waitTimeCell.innerHTML = '<br><h4 style=\"color: #FB7E0C;\">Wait Time<\/h4> ' + 'Bays\/Washouts In Use: ' + openTickets + '<br>Trucks In Line: ' + waitingTrucks + '<br>Average Wait Today: ' + avgWait + '<br>Approximate  Wait Time: ' + formatMinutesToTime(currentWaitTime);\n      row.appendChild(waitTimeCell);\n\n      locationContainer.appendChild(row);\n\n      \/\/ If not the last table, then add div\n      if (i !== locations.length - 0) {\n        var lineDiv = document.createElement('hr');\n        lineDiv.style.border = '1px solid green'; \/\/ Style the <hr> green\n        locationContainer.appendChild(lineDiv);\n      }\n\n\tconsole.debug(name);\n\n    }\n\n\/\/ Function to convert Date object back to string time\nfunction formatTime(date) {\n  var hours = date.getHours();\n  var minutes = date.getMinutes();\n  var ampm = hours >= 12 ? 'PM' : 'AM';\n  hours = hours % 12;\n  hours = hours ? hours : 12; \/\/ the hour '0' should be '12'\n  minutes = minutes < 10 ? '0'+minutes : minutes;\n  var strTime = hours + ':' + minutes + ' ' + ampm;\n  return strTime;\n}\n\nfunction convertToDateTime(time) {\n  var date = new Date();\n  var parts = time.match(\/(\\d+):(\\d+) (AM|PM)\/);\n  if (parts) {\n    var hours = parseInt(parts[1], 10);\n    var minutes = parseInt(parts[2], 10);\n    var isPM = parts[3] === 'PM';\n    if (hours === 12) {\n      hours = isPM ? 12 : 0; \/\/ 12am and 12pm should be treated differently\n    } else {\n      hours = isPM ? hours + 12 : hours;\n    }\n    date.setHours(hours, minutes, 0, 0);\n    \n    \/\/ Handle the case where end time is 12:00 AM, which should be considered as the end of the day, not the start\n    if (hours === 0 && minutes === 0 && !isPM) {\n      date.setDate(date.getDate() + 1); \/\/ Add 1 day\n    }\n  }\n  return date;\n}\n\n\/\/Override POS hours\nfunction getBranchHours(branchId) {\n    var branchHoursInfo = null;\n\n    \/\/console.log('Searching for branch ID:', branchId);\n\n    for (var i = 0; i < branch_hours.branchhours.length; i++) {\n        if (String(branch_hours.branchhours[i].branch) === String(branchId)) {\n            branchHoursInfo = {\n                weekdaystart: branch_hours.branchhours[i].weekdaystart,\n                weekdayend: branch_hours.branchhours[i].weekdayend,\n                weekendstart: branch_hours.branchhours[i].weekendstart,\n                weekendend: branch_hours.branchhours[i].weekendend\n            };\n            \/\/console.log('Match found:', branchHoursInfo);\n            break;\n        }\n    }\n\n    if (branchHoursInfo === null) {\n        console.log('No match found for branch ID:', branchId);\n    }\n\n    return branchHoursInfo;\n}\n\n\/\/ Helper function to convert HH:MM to minutes\nfunction convertTimeToMinutes(timeStr) {\n    var parts = timeStr.split(':');\n    return parseInt(parts[0], 10) * 60 + parseInt(parts[1], 10);\n}\n\n\/\/ Helper function to format minutes back to HH:MM\nfunction formatMinutesToTime(minutes) {\n    var h = Math.floor(minutes \/ 60);\n    var m = minutes % 60;\n    return h.toString().padStart(2, '0') + ':' + m.toString().padStart(2, '0');\n}\n\n\/\/ Initialize the map\nfunction initMapLoc() {\n  console.log('google:', google);\n  console.log('google.maps.Geocoder:', google.maps.Geocoder);\n\n  var map = new google.maps.Map(document.getElementById('map'), {\n    center: { lat: 0, lng: 0 },\n    zoom: 10\n  });\n\n  \/\/ Create a bounds object\n  var bounds = new google.maps.LatLngBounds();\n\naddresses.forEach(function(fullAddress, index) {\n\n  var geocoder = new google.maps.Geocoder();\n\n\/\/ Split the full address into different parts\nvar parts = fullAddress.split(', ');\n\n\/\/ Extract the name, phone, email, and address from the parts\nvar name = parts[0];\nvar phone = parts[1];\nvar email = parts[2];\nvar address = parts.slice(3).join(', ');\n\n\n  geocoder.geocode({ address: address }, function(results, status) {\n    if (status === 'OK') {\n      var marker = new google.maps.Marker({\n        map: map,\n        position: results[0].geometry.location\n      });\n      \/\/ Extend the bounds to include the new marker\n      bounds.extend(marker.getPosition());\n\n      \/\/ Asynchronously adjust the bounds of the map\n      map.fitBounds(bounds);\n\n      \/\/ Create an InfoWindow for each marker\n      var infoWindow = new google.maps.InfoWindow({\n          content: '<div><img decoding=\"async\" src=\"https:\/\/pridetruckwash.com\/wp-content\/uploads\/2024\/01\/pride_recipt.png\" alt=\"Pride Truck Wash\" width=\"164\" height=\"60\"><\/div><br>' +\n                   '<h4 style=\"color: #FB7E0C;\">' + name + '<\/h4>' +\n                   '<div>' + address + '<\/div>' +\n                   '<div>' + phone + '<\/div>' \n      });\n\n      \/\/ Add a click listener to the marker\n      marker.addListener('click', function() {\n        \/\/ Open the InfoWindow when the marker is clicked\n        infoWindow.open(map, marker);\n      });\n\n    } else {\n      console.error('Geocode failed:', status);\n    }\n  });\n});\n}\n    <\/script>\n    <\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Pride Truck Wash Locations Details Hours and Details<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-home.php","meta":{"footnotes":""},"class_list":["post-463","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/pages\/463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":41,"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/pages\/463\/revisions"}],"predecessor-version":[{"id":16435,"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/pages\/463\/revisions\/16435"}],"wp:attachment":[{"href":"https:\/\/pridetruckwash.com\/index.php\/wp-json\/wp\/v2\/media?parent=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}