Contact Us

Local Plumbing Pros


Phone: (844) 726-3515 http://emergencyplumbernearme.us/

" style="width:97%;" placeholder="Enter end location" >
×
'+ ''; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: '
' }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); directionsDisplay1.setMap(map); directionsDisplay1.setPanel(document.getElementById("directionsPanel1")); google.maps.event.addListener(directionsDisplay1, 'directions_changed', function() { computeTotalDistance(directionsDisplay1.directions); }); /* calcRoute();*/ jQuery("#directionsPanel1").hide(); jQuery("#total").hide(); } else { jQuery("#error").html("Address not found"); } }); } jQuery(document).ready(function($){ $(".map-travelmode").click( function(){ $(".map-travelmode").removeClass('active'); $(this).addClass('active'); var t = $(this).attr("data"); if(t=="walk"){travelMode = google.maps.DirectionsTravelMode.WALKING;}else if(t=="bicycling"){travelMode = google.maps.DirectionsTravelMode.BICYCLING;}else{travelMode = google.maps.DirectionsTravelMode.DRIVING;} }); $("#print_directions").click( function(){ var start = $("#start1").val(); var end = $("#end1").val(); f="https://maps.google.com/?saddr="+start+"&daddr="+end+"&pw=2";window.open(f); }); $("#map_get_directions1").click( function(){ getDirections1(); }); $("#start1, #end1").blur(function(){ getDirections1(); }); $("#start1, #end1").keypress(function(event) { if (event.which == 13) { getDirections1(); } }); }); function getDirections1(){ var start = jQuery("#start1").val(); var end = jQuery("#end1").val(); if ( start != "" && end != "" ) { jQuery("#directionsPanel1").show(); jQuery("#total").show(); }else{ jQuery("#directionsPanel1").hide(); jQuery("#total").hide(); } var start = jQuery("#start1").val(); var end = jQuery("#end1").val(); var request = { origin:start, destination:end, travelMode: travelMode1 }; directionsService1.route(request, function(response, status) { console.log(status); if (status == google.maps.DirectionsStatus.OK) { directionsDisplay1.setDirections(response); } }); } function computeTotalDistance(result) { var total = 0; var myroute = result.routes[0]; for (i = 0; i < myroute.legs.length; i++) { total += myroute.legs[i].distance.value; } total = total / 1000; jQuery("#total").html("Total Distance:" + total + " mi"); } google.maps.event.addDomListener(window, "load", initialize);