we hovered var index = $('#_genelecsitedealermap_dealerResult .dealer-box').index(this); var mrkrIndex = $(this).attr('data-markerIndex'); var accountType = $(this).attr('data-accountType'); var id = $(this).attr('id'); if(mrkrIndex != undefined && mrkrIndex != null) { for(var i=0; i< markers.length; i++) { markers[i].setMap(null); } markers.length = 0; document.getElementById("_genelecsitedealermap_dealerResult").innerHTML = ""; } function _genelecsitedealermap_moveToLocation(lat, lng){ var center = new google.maps.LatLng(lat, lng); map.panTo(center); } function clearLocations() { infoWindow.close(); for (var i = 0; i < markers.length; i++) { markers[i].setMap(null); } markers.length = 0; for (var i = 0; i < defaultMarkers.length; i++) { defaultMarkers[i].setMap(null); } defaultMarkers.length = 0; if(allStores != undefined && allStores != null) { allStores.length = 0;	} document.getElementById("_genelecsitedealermap_eventResult").innerHTML = ""; document.getElementById("_genelecsitedealermap_dealerResult").innerHTML = ""; } function searchLocationsNear(lat, lng) { clearLocations(); _genelecsitedealermap_removeBadge(); geocodeLatLng(lat, lng); _genelecsitedealermap_searchEvent(lat, lng); } function geocodeLatLng(lat, lng) { var countryShortName = ""; var latlng = new google.maps.LatLng(parseFloat(lat), parseFloat(lng)); geocoder.geocode({'location': latlng}, function(results, status) { if (status === 'OK') { if (results[0]) { for (i = 0; i < results[0].address_components.length; ++i) { var component = results[0].address_components[i]; if (!countryShortName && component.types.indexOf("country") > -1) countryShortName = component.short_name; } } else { console.log('No results found'); } } else { console.log('Geocoder failed due to: ' + status); } _genelecsitedealermap_searchDealer(lat, lng, countryShortName); }); } function _genelecsitedealermap_defaultMarker(lat, lng) { var latlng = new google.maps.LatLng( parseFloat(lat), parseFloat(lng)); var marker = new google.maps.Marker({ position: latlng, map: map, icon : normalIcon(), }); defaultMarkers.push(marker); } function createMarker(name, address, distance, city, country, zipcode, state, latlng, hideAddress,marketSegment, email, phone, samCertified, accountType, website, id, lat, lng, techService, showRoom, smartIPCertified) { var html = "" + name + "