Search places by city, state or zip code
location search
all places
'); if (mapCanvas.zoom == Zoom) { var mInfo = mapCanvas.getCenter(); var mCenter = mInfo.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326")); var mlon = Math.round(mCenter.lon); var mLat = Math.round(mCenter.lat); if (mLon == Math.round(cLon) && mLat == Math.round(cLat)) { $('#canReset').css('display','none'); } } Mostrar resultados(); } Função afterPageLoadResponse() { isPageLoad = false; if (cookies.center[2]) {redrawMap(cookies.center[0], cookies.center[1], cookies.center[2]); } if (cookies.sort[2]) { //sortList(cookies.sort[0], cookies.sort[1], cookies.sort[2]); } } function nominatimResult(resultado) { $("#searchresultsdiv").html(""); var resultados únicos = nueva matriz (resultado.longitud); var temResultado = falso; result.forEach(function (element, index, array) { var place_id = element.place_id; var display_name = element.display_name; var lat = element.lat; var lon = element.lon; var type = element.type; var resultClass = elemento['clase']; let esCondado = falso; if ((typeof element.extratags.border_type != "indefinido") && element.extratags.border_type === 'condado') isCounty = true; if ((resultClass = = 'lugar' || resultClass == 'limite' || resultClass == 'autopista') && !(uniqueResults.indexOf(display_name) > -1) && !(isCounty)) { uniqueResults[index] = display_name; hasResult = verdadero; $("#searchresultsdiv").append("" + show_name + "(" + Type + ")"); } }); if (!hasResult) { noSearchResults(); } else { setMapSearchCookie(mapSearchQuery); } chooseFirstResult(); } function primeResponse() { $("#searchresultsdiv").html(""); if (zipLonLatResult.split(',')[0].length > 0) { $("#searchresultsdiv").append("" + $('#autocompletar').val().trim() + "(Postal Code)"); setMapSearchCookie(mapSearchQuery); } else { noSearchResults(); } chooseFirstResult(); } function showThrobber() { $("#locThrobber").css('display', 'block'); } function hideThrobber() { $("#locThrobber").css('display', 'ninguno'); } Funktion mapSearch() { showThrobber(); mapSearchQuery = $('#autocompletar').val().trim(); mostrarResultados( ); hideResults(); if (isValidPostalCode(mapSearchQuery)) { mapSearchQuery = mapSearchQuery.replace(' ', ''); mapSearchQuery = mapSearchQuery.replace('-', ''); mapSearchQuery = mapSearchQuery.replace('_' , ''); requestURL = "//w.nd-cdn.us/desktopmodules/locationmanager/LocationService.asmx/GetZipLonLat"; $.ajax({ url: requestURL, contentType: "application/javascript; charset=utf-8 ", escreva: "POST", dataType: "script", dados: "zipcode=" + mapSearchQuery, complete: function () { primeResponse(); } }); } else { var url = '//nominatim.openstreetmap. org/search?q='; var consulta = encodeURIComponent(mapSearchQuery); var params = '&countrycodes=us,ca, p r,mx&format=json&jso n_callback=nominatimResult&email=tech@getnetdriven.com&extratags=1'; var topLeft = new OpenLayers.LonLat(mapCanvas.calculateBounds().left, mapCanvas.calculateBounds().top); var bottomRight = new OpenLayers.LonLat(mapCanvas.calculateBounds().right, mapCanvas.calculateBounds().bottom); topLeft.transform(neue OpenLayers.Projection("EPSG:900913"), neue OpenLayers.Projection("EPSG:4326")); bottomRight.transform (neu OpenLayers.Projection("EPSG:900913"), neue OpenLayers.Projection("EPSG:4326")); var limites = '&bounded=1&viewbox=' + topLeft.lon + ',' + topLeft.lat + ',' + bottomRight.lon + ',' + bottomRight.lat; requestURL = url + consulta /*+ limites*/ + params; $("#searchresultsdiv").html(""); $.ajax({ url: requestURL, contentType: "aplicativo/javascript; charset=utf-8", tipo: "POST", dataType: "script", dados: "{}" }); } } function toggleResults() { if ($("#mapsearchresultsX").attr('class') == 'expandresults') { showResults(); } mehr { ocultarResultados(); } } função mostrarResultados() { $("#mapsearchresults").css('mostrar', 'bloquear'); $("#mapsearchresults").css('altura', '371px'); $("#mapsearchresultsX").css('mostrar', 'bloquear'); $("#mapsearchresultsX").attr('class', 'accordianresults'); } function hideResults() { $("#mapsearchresults").css('height', '28px'); $("#mapsearchresultsX").attr('class', 'expandresults'); } function elegirPrimerResultado() { hideThrobber(); var resultLinks = $("#mapsearchresults .searchresult"); if (resultLinks.length!= 0) { if (resultLinks[0].click) { resultLinks[0].click(); } Else { var cle = document.createEvent("MouseEvent"); cle.initEvent("clic", verdadeiro, verdadeiro); var elem = enlacesresultados[0]; elem.dispatchEvent(cle); } if (resultLinks.length != 1 && !isPageLoad) {showResults(); } } si (isPageLoad) {afterPageLoadResponse(); } } function redrawMap(lon, lat, z) { var zLevel = zoom; if (argumentos.longitud == 3) { zLevel = z; } mapCanvas.setCenter (plotPoint (lon, lat), zLevel); if (!isPageLoad) setMapCenterCookie(lon + '|' + lat + '|' + zLevel); } Função RecenterMap(aTag) { tempLon = $(aTag).attr('lon'); tempLat = $(unaEtiqueta).attr('lat'); sortList(tempLon, tempLat, $(unaEtiqueta).attr('nome')); var mZoom = 9 - calcZoomOut(tempLon, tempLat); redrawMap (tempLon, tempLat, mZoom); } function useCurrentLoc() { var geo = navigator.geocalización; if (geo) {geo.getCurrentPosition(getCurrentLoc, noCurrentLoc); } mais { noCurrentLoc(); } } Função getCurrentLoc(loc) { var sudoAtag = $(''); sudoAtag.attr("length", loc.coords.length); sudoAtag.attr("lat", loc.coords.latitude); sudoAtag.attr("name", currentLocTxt); $(".searchTextField").val(currentLocTxt); setMapSearchCookie(currentLocTxt); RecentrMap(sudoAtag); } function noCurrentLoc() { alert("Geolocation services are not supported by your browser."); } function resetZoom() { redrawMap(tempLon, tempLat); } function calcZoomOut(lon, lat) { var far = Math.abs(lon - locListings[0].lon); if (Math.abs(lat - locListings[0].lat) > far) { far = Math.abs(lat - locListings[0].lat); } far = far * 70; // z9 = 50 miles var z = 0; var x = 40; var y = locListings[0].distance; while (x <= y) {x += x; z++; } returns z; } function chkLegend_Click(sender) { showThrobber(); selected types = new Array(); if ((sender == 'chkLegendAll' && $('#chkLegendAll').is(':checked')) || $('#MapLegendDiv input:checkbox:checked').length == 0) { $(' #chkLegendAll').attr('checked', 'checked'); type.forEach(function(element, index, array) { $('#chkLegend' + index).attr('checked', false); }); hideLocationResultsByType(false, '.loclisting'); MarkerLayerOther.setVisibility(true); MarkerLayer0.setVisibility(true); MarkerLayer1.setVisibility(true); MarkerLayer2.setVisibility(true); MarkerLayer3.setVisibility(true); MarkerLayer4.setVisibility(true); MarkerLayer5.setVisibility(true); MarkerLayer6.setVisibility(true); MarkerLayer7.setVisibility(true); MarkerLayer8.setVisibility(true); MarkerLayer9.setVisibility(true); selectTypes = ['loclisting', 'type0', 'type1', 'type2', 'type3', 'type4', 'type5', 'type6', 'type7', 'type8', 'type9']; } Else { MarkerLayerOther.setVisibility (false); $('#chkLegendAll').attr('checked', false); if ($('#chkLegend0').is(':checked')) { MarkerLayer0.setVisibility(true); selectTypes.push('type0'); } Else { MarkerLayer0.setVisibility(false); } if ($('#chkLegend1').is(':checked')) { MarkerLayer1.setVisibility(true); selectTypes.push('type1'); } Else { MarkerLayer1.setVisibility(false); } if ($('#chkLegend2').is(':checked')) { MarkerLayer2.setVisibility(true); selectTypes.push('type2'); } Else { MarkerLayer2.setVisibility(false); } if ($('#chkLegend3').is(':checked')) { MarkerLayer3.setVisibility(true); selectTypes.push('type3'); } Else { MarkerLayer3.setVisibility(false); } if ($('#chkLegend4').is(':checked')) { MarkerLayer4.setVisibility(true); selectTypes.push('type4'); } Else { MarkerLayer4.setVisibility(false); } if ($('#chkLegend5').is(':checked')) { MarkerLayer5.setVisibility(true); selectTypes.push('type5'); } Else { MarkerLayer5.setVisibility(false); } if ($('#chkLegend6').is(':checked')) { MarkerLayer6.setVisibility(true); selectTypes.push('type6'); } Else { MarkerLayer6.setVisibility(false); } if ($('#chkLegend7').is(':checked')) {MarkerLayer7.setVisibility(true); selectTypes.push('type7'); } Else { MarkerLayer7.setVisibility(false); } if ($('#chkLegend8').is(':checked')) { MarkerLayer8.setVisibility(true); selectTypes.push('type8'); } Else { MarkerLayer8.setVisibility(false); } if ($('#chkLegend9').is(':checked')) { MarkerLayer9.setVisibility(true); selectTypes.push('type9'); } Else { MarkerLayer9.setVisibility(false); } $('.loclisting').each(function () { var hideMe = true; var myClass = $(this).attr("class").split(" "); myClass.forEach(function (element, index , array) { if ($.inArray(myClass[index], SelectedTypes) >= 0) { hideMe = false; } }); hideLocationResultsByType(hideMe, '#' + $(this).attr("id")) ;}); } hide Throbber(); setMapFilterCookie(s selectedTypes.join('|')); } function hideLocationResultsByType(hide, type) { if (hide) {$(type).addClass('hiddenLoc'); } else { $(type).removeClass('hiddenLoc'); } } function hideBubbles() { $('.olPopup').css('display', 'none'); } dynamic functionSort(property) { var sortOrder = 1; if (property[0] === "-") { sortOrder = -1; property = property.substr(1, property.length - 1); } return function (a, b) { var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1:0; return result * sortOrder; } } function sortLocList() { locListings.forEach(function (element, index, array) { var el = $("#" + element.div).detach(); el.appendTo("#LocationListView"); }) ; setCookieDistance(); } function sortList(lon1, lat1, name) { if (!isPageLoad) setMapSortCookie(lon1 + '|' + lat1 + '|' + name); var isZipSearch = isValidPostalCode(mapSearchQuery); locListings.forEach(function (element, index, array) { if (isZipSearch && element.postalCode == mapSearchQuery) { element.distance = 0; } else if (!isZipSearch && element.city == name.split("," )[0].trim()) { element.distance = Math.round(haversine(lon1, element.lon, lat1, element.lat) * 10) / 10; } else { element.distance = Math.round(haversine (lon1, element.lon, lat1, element.lat) * 10) / 10; } $('#' + element.span).html(element.distance + (useMiles ? "Miles of" : "Kilometers of") + name.split(",")[0].trim()); }); locListings.sort(dynamicsort("spacing")); sortLocList(); $('.distance').removeClass('hideDistance'); $('.distanceBr').removeClass('hideDistanceBr'); } function toRad(Value) { /** Converts numeric degrees to radians */ return Value * Math.PI / 180; } function havesine(lon1, lon2, lat1, lat2) { var R = 6350; // miles if (useMiles){ R = 3945; //mi } var dLat = toRad(lat2-lat1); var dLon = toRad(lon2-lon1); lat1 = toRad(lat1); lat2 = toRad(lat2); var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos( lat2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); var d = R * c; back d; } function getParams() { var topLeft = new OpenLayers.LonLat(mapCanvas.calculateBounds().left, mapCanvas.calculateBounds().top); var bottomRight = new OpenLayers.LonLat(mapCanvas.calculateBounds().right, mapCanvas.calculateBounds().bottom); topLeft.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326") bottomRight.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection(" EPSG :4326")) var autocompleteOptions = { params: { "top": top left.lat, "bottom": bottom right.lat, "left": top left.lon, "right": bottom right.lon, " query ": $ ('#autocomplete').val().trim() } } $('#autocomplete').autocomplete().setOptions(autocompleteOptions); } function getLocation() { if (navigator.geolocation) { navigator .geolocation.getCurrentPosition(showPosition); } else { console.log( "Geolocation is not supported by this browser."); } } function showPosition(position) {requestURL = "//w.nd-cdn.us/desktopmodules / locationmanager/LocationService.asmx/GetZipFromGeo"; $.ajax({ url: requestURL, contentType: "application/javascript; charset=utf-8", type: "POST", dataType: "script", data: { latitude: position .coords.latitude, longitude: position.coords.lon gitude }, complete: function () { SearchByGelocation(zipLonLatResult) } }); } function SearchByGelocation(zip) { $('#autocomplete').val(zip); mapSearch(); } $(document).ready(function () { //getLocation(); initLocMap(); initPins(); if (getNDcookie('mapSearch')) cookies.search = getNDcookie('mapSearch'); if (getNDcookie( 'mapFilter')) cookies.types = getNDcookie('mapFilter').split('|');if (getNDcookie('mapCenter')) cookies.center = getNDcookie('mapCenter').split('|'); if (getNDcookie('mapSort')) cookies.sort = getNDcookie('mapSort').split('|'); // DELETE COOKIES deleteNDcookie('mapSearch'); deleteNDcookie('mapFilter'); deleteNDcookie('mapCenter' ) ); deleteNDcookie('mapSort'); if (cookies.types[0] && cookies.types.length < 11) { for (var qsT = 0; qsT < cookies.types.length; qsT++) { var i = $ . inArray(cookies.types[qsT].trim(), ['Type0', 'Type1', 'Type2', 'Type3', 'Type4', 'Type5', 'Type6', 'Type7', 'Type8' , 'type9']); if (i >= 0) { $('#chkLegend' + i).attr('checked', 'checked'); } } chkLegend_Click($('#txtLegendAll')); } else if (cookies.types.length >= 11) { chkLegend_Click($('#chkLegendAll')); } if (cookies.search != "") { if (cookies.s search = = "Current Location") { useCurrentLoc(); } else { $('#autocomplete').val(cookies.search); mapSearch(); } } /* AUTO COMPLETE */ $(function () { var autocompleteOptions, autocomplete1; autocompleteOptions = { serviceUrl: "/DesktopModules/LFLocations/AutoComplete.aspx", appendTo: $('#autocomplete-wrapper'), autoSelectFirst: true , onSelect: function () { mapSearch(); }, onSearchStart: function () { getParams(); }, noCache: true }; autocomplete1 = $('#autocomplete').autocomplete(autocompleteOptions); }); }); var locListings = new Array(5);locListings[0] = { 'div': 'loc1', 'span': 'loc1Distance', 'locId': 1, 'dflt': 0, 'lon': -76.90668, 'lat': 38.62605, 'distance': -1, 'zip code':'20603', 'city':'Waldorf' };locListings[1] = { 'div': 'loc40', 'span': ' loc40Distance ', 'locId': 40, 'dflt': 1, 'lon': -76.98245, 'lat': 38.53681, 'distance': -1, 'postalCode':'20646', 'city':'La Plata ' };locListings[2] = { 'div': 'loc41', 'span': 'loc41Distance', 'locId': 41, 'dflt': 2, 'lon': -76.45694, 'lat': 38.26546, ' distance': -1, 'postcode': '20653', 'city': 'Lexington Park' };locListings[3] = { 'div': 'loc42', 'span': 'loc42Distance', 'locId ' : 42, 'dflt': 3, 'lon': -76.77262, 'lat': 38.50726, 'distance': -1, 'postalCode':'20622', 'city':'Charlotte Hall' };locListings[ 4 ] = { 'div': 'loc43', 'span': 'loc43Distance', 'locId': 43, 'dflt': 4, 'lon': -76.90678, 'lat': 38.62611, 'distance': - 1 , 'postalCode':'20601', 'city':'Waldorf' }; locIds0 = new array(5);locIds0[0] = 1;locIds0[1] = 40;locIds0[2] = 41;locIds0[3] = 42;locIds0[4] = 43; markerPositions0 = new Array(5);markerPositions0[0] = plotPoint(-76.90668, 38.62605);markerPositions0[1] = plotPoint(-76.98245, 38.53681);markerPositions0[2] = plotPoint(-76.45694, 38.26546);markerPositions0[3 ] = plotPoint(-76.77262, 38.50726); markerPositions0[4] = plotPoint(-76.90678, 38.62611); icons0 = new array(5); icons0[0] = '//a2.nd-cdn.us/img/locations/thin/red.png'; icons0[1] = '//a2.nd-cdn.us /img/locations/thin/red.png';icons0[2] = '//a2.nd-cdn.us/img/locations/thin/red .png';icons0[3] = '//a2.nd-cdn.us/img/locations/thin/red.png';icons0[4] = '//a2.nd-cdn.us/img/locations /thin/red.png'; content0 = new array(5); content0[0] = "
Southern Automotive and Tire Centers
Rua São Patricio, 131Waldorf, DM 20603
301-645-5364
stpatricks@southerntire.net
";contenido0[1] = "
Cars and Tires Centro Sul
Rua Crain, 6380La Plata, MD 20646
301-934-0300
laplata@southerntire.net
";contenido0[2] = "
Southern Automotive and Tire Centers
21800 North Shangri-La DriveParque Lexington, MD 20653
301-862-4024
lexingtonpark@southerntire.net
";contenido0[3] = "
Southern Automotive and Tire Centers
30550 Camino PotomacCharlotte Hall, DM 20622
301-884-8116
charlottehall@southerntire.net
";contenido0[4] = "
Southern Automotive and Tire Centers
3060 alte WashingtonstraßeWaldorf, DM 20601
301-645-1411
waldorf@southerntire.net
";
use this locationSouthern Tire and Auto Centers - Waldorf, MD location details
Southern Automotive and Tire Centers
Managing Director: Mark Parker
Rua São Patricio, 131
Waldorf, DM 20603
Standard
Monday: 7:30am - 6:00pm
Monday: 7:30 am - 6:00 pm
Wednesday: 7:30 am - 6:00 pm M.
Quinta-feira: 7:30 a.m. - 6:00 p.m.
Vienna: 7:30 a.m. M - 6:00 PM
Saturday: 7:30 pm - 3:00 pm
Domingo:Cerrado
301-645-5364
[email protected]
use this locationSouthern Tire and Auto Center - La Plata, MD location details
Cars and Tires Centro Sul
Gerente: Ted Johnson
Rua Crain, 6380
La Plata, MD 20646
Standard
Monday: 7:30am - 6:00pm
Monday: 7:30 am - 6:00 pm
Wednesday: 7:30 am - 6:00 pm M.
Quinta-feira: 7:30 a.m. - 6:00 p.m.
Vienna: 7:30 a.m. M - 6:00 PM
Saturday: 7:30 pm - 3:00 pm
Domingo:Cerrado
301-934-0300
[email protected]
use this locationSouthern Tire and Auto Centers - Lexington Park, MD location details
Southern Automotive and Tire Centers
Managing Director: Sean Quade
21800 North Shangri-La Drive
Parque Lexington, MD 20653
Standard
Monday: 7:30am - 6:00pm
Monday: 7:30 am - 6:00 pm
Wednesday: 7:30 am - 6:00 pm M.
Quinta-feira: 7:30 a.m. - 6:00 p.m.
Vienna: 7:30 a.m. M - 6:00 PM
Saturday: 7:30 pm - 3:00 pm
Domingo:Cerrado
301-862-4024
[email protected]
use this locationSouthern Tire and Auto Centers - Charlotte Hall, MD location details
Southern Automotive and Tire Centers
Gerente: Rick Moore
30550 Camino Potomac
Charlotte Hall, DM 20622
Standard
Monday: 7:30am - 6:00pm
Monday: 7:30 am - 6:00 pm
Wednesday: 7:30 am - 6:00 pm M.
Quinta-feira: 7:30 a.m. - 6:00 p.m.
Vienna: 7:30 a.m. M - 6:00 PM
Saturday: 7:30 pm - 3:00 pm
Domingo:Cerrado
301-884-8116
[email protected]
use this locationSouthern Tire and Auto Centers - Waldorf, MD location details
Southern Automotive and Tire Centers
Manager: LeAnne Ayers
3060 alte Washingtonstraße
Waldorf, DM 20601
Standard
Monday: 7:30am - 6:00pm
Monday: 7:30 am - 6:00 pm
Wednesday: 7:30 am - 6:00 pm M.
Quinta-feira: 7:30 a.m. - 6:00 p.m.
Vienna: 7:30 a.m. M - 6:00 PM
Saturday: 7:30 pm - 3:00 pm
Domingo:Cerrado
301-645-1411
[email protected]