Powering your home, your business, your world. (2024)

Breadcrumbs

Home > Dealer Locator
Please select a location:
Please answer a few questions so that we can help you find out where to buy your Generac product.
  1. What Product or Service are you looking for?
      • or
    • Country

Powering your home, your business, your world. (1)

Please select your location and the product/service you are looking for to view retailers, service center & dealers in your area.

"; content += "

"; content += "

"; google.maps.event.addListener(marker, 'click', function () { map.setCenter(point); var oZoom = map.getZoom(); if (oZoom != ZoomScale) { map.setZoom(ZoomScale); } if (eventMapInfoWindow != null) { eventMapInfoWindow.close(); } eventMapInfoWindow = new google.maps.InfoWindow({ 'content': content }); eventMapInfoWindow.open(map, marker); }); } function addGeoCodeMarker(map, location) { var address = location.Address; var dealerCount = location.DealerCount; var dealerName = location.DealerName; var dealerAddress1 = location.DealerAddress1; var dealerCity = location.DealerCity; var dealerState = location.DealerState; var dealerZip = location.DealerZip;var dealerPhone = location.DealerPhone;// Set whether to center map here to avoid 'race conditions' with other geocode results returning before the intended one, centering the map in an unexpected place when// many markers are being added to the mapvar doMapCenter = setCenterMap;setCenterMap = false; var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { if (doMapCenter) { map.setCenter(results[0].geometry.location); } location["geometry"] = results[0].geometry.location; createMarker(map, results[0].geometry.location, location); } else { console.log("%cGeoCode Error: " + status, "color: red"); } }); } function displayMap() { eventMapMarkers = [];eventMapInfoWindow = null;setCenterMap = true; var mapDiv = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_plcBasicGoogleMaps'.replace("plcBasicGoogleMaps", 'map')); var map = new google.maps.Map(mapDiv, { zoom: Scale, mapTypeId: google.maps.MapTypeId.ROADMAP });var count = (firstMarkerSet <= dealerLocations.length) ? firstMarkerSet : dealerLocations.length; for (i = 0; i < count; i++) { console.log(dealerLocations[i]); addGeoCodeMarker(map, dealerLocations[i]); //console.log("Adding marker:" + i) } } function searchLocations() { var webMethod = "/GeneracCorporate/Webservices/DealerLocatorWebService.asmx/SearchDealerLocator"; var city = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_CityTextBox').value; var postalCode = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_PostalCodeTextBox').value; var countryCodeUSA = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_locationUSRadioButton').checked; var countryCodeCAN = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_locationCARadioButton').checked; var countryCodeINT = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_locationINTRadioButton').checked; var stateddl = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_StateDropDown' + '_uniSelectorState_drpSingleSelect'); var state = stateddl.options[stateddl.selectedIndex].value; var radiusddl = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_RadiusDropDown'); var radius = radiusddl.options[radiusddl.selectedIndex].value; var category = $j("#categoryDropDown :selected").val(); var country = ""; if (countryCodeINT) { country = $j("#countryDropDown :selected").val(); } var options = { State: state, City: city, PostalCode: postalCode, Category: category, CountryCode: country, Radius: radius, IsUSASelected: countryCodeUSA, IsCANSelected: countryCodeCAN, IsINTSelected: countryCodeINT }; dealerLocations = []; // Get the field values $j.ajax({ type: "POST", url: webMethod, data: JSON.stringify({ searchOptions: options }), contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { var jsonResponse = $j.parseJSON(msg.d); $j("#pnlDealers").html(jsonResponse.DealerListLayout); //map the first item in list dealerLocations = jsonResponse.DealerObjectList; firstMarkerSet = 10; displayMap(); showPanel("pnlMaps", jsonResponse.IsPanelMapsVisible); showPanel("pnlRetailers", jsonResponse.IsPanelRetailersVisible); showPanel("pnlNoDealers", jsonResponse.IsPanelNoDealersVisible); showPanel("pnlDealers", jsonResponse.IsPanelDealersVisible); showPanel("pnlDealerInstruction", jsonResponse.IsPanelDealersInstructionVisible); if (jsonResponse.ErrorMessage === "" || jsonResponse.ErrorMessage === null ) { $j("#lblErrors").text(""); } else { $j("#lblErrors").text(jsonResponse.ErrorMessage); } if (jsonResponse.NoResultMessage != "") { $j("#lblNoResults").text(jsonResponse.NoResultMessage); } else { $j("#lblNoResults").text(""); } $j("#lblRadius2").text(jsonResponse.Radius2Text); }, complete: function (data, status) { $j('.btnSearchLoading').addClass('hide'); $j('.btnSearch').show(); } }); } function displayPanel(thePanel) { var panel = document.getElementById(thePanel); if (panel.style.visibility == 'hidden') { panel.style.visibility = 'visible'; } else { panel.style.visibility = 'hidden'; } } function GetQueryStringParams(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } }; function resetMap(itemId) { //aligning results from service with javacript array // itemId = itemId - 1; setCenterMap = true; if (itemId != 'undefined' && itemId.length > 0 && $j('.map-pop-up-' + itemId) != 'undefined') { if (eventMapMarkers != 'undefined') { //console.log("EventMapMarkers:", eventMapMarkers); var marker = eventMapMarkers[itemId]; if (marker != 'undefined') { // if (itemId > firstMarkerSet) { //console.log("replot"); var mapDiv = document.getElementById('p_lt_WebPartZone7_Content_PagePlaceholder_p_lt_ctl01_CustomBasicGoogleMaps_plcBasicGoogleMaps'.replace("plcBasicGoogleMaps", 'map')); var map = new google.maps.Map(mapDiv, { zoom: ZoomScale, mapTypeId: google.maps.MapTypeId.ROADMAP }); addGeoCodeMarker(map, dealerLocations[itemId]); firstMarkerSet = -1; // } new google.maps.event.trigger(marker, 'click'); } } } } function resetIconDescriptions() { $j('.dealer-services li').off('click').on('click', function () { var message = '' + this.className + '

' + iconDescriptions[this.className] + '

'; $j.fancybox({ content: message }); }); $j('.dealer-class').off('click').on('click', function () { var className = this.className.replace("dealer-class", "").replace(" ", ""); var message = '

' + iconDescriptions[className] + '

'; $j.fancybox({ content: message }); }); } function adjustGrid(selector) { var $retailers = $j('.dealer-locator-results-retailer'); $retailers.find('.retailer-item').removeClass('first'); $retailers.children('div:nth-child(' + selector + ')').addClass('first'); } function defineMq() { //media queries mediaCheck({ media: '(min-width: 1024px)', entry: function () { adjustGrid('4n+1'); } }); mediaCheck({ media: '(min-width: 768px) and (max-width: 1023px)', entry: function () { adjustGrid('3n+1'); } }); mediaCheck({ media: '(max-width: 767px)', entry: function () { adjustGrid('2n+1'); } }); } function addMq() { defineMq(); } //http://stackoverflow.com/questions/7844061/running-javascript-after-update-panel-refresh function panelUpdate() { Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); } function endRequestHandler(sender, args) { defineMq(); if (isMobile) { convertDealerLinktoGoogleMaps(); } }

Powering your home, your business, your world. (2024)

References

Top Articles
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 6552

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.