');var width=jQuery(window).width();var split=width/3;var parts=width/6; jQuery("#mobileVersionExtra").html('
'); //jQuery("#mobileVersionExtra").html('
menusearchinfo
'); jQuery("#extraCode").html(''); jQuery("#menu5").css({"position": "fixed","top": "0%","margin-left":"0px","margin-top":"0px","left":"0%","z-index":"4","width":width}); // $("#toggle-menu").css({"padding":"0px","position": "fixed","top": "0%","margin-left":parts-20,"margin-top":"5px","left":"0%","z-index":"4","visibility":"visible"});// $("#info").css({"padding":"0px","position": "fixed","top": "0%","margin-left":split*2+parts-20,"margin-top":"5px","left":"0%","z-index":"4","visibility":"visible"});// $("#search").css({"padding":"0px","position": "fixed","top": "0%","margin-left":split+parts-25,"margin-top":"5px","left":"0%","z-index":"4","visibility":"visible"}); jQuery("#toggle-menu").css({"padding":"0px","position": "fixed","top": "0%","margin-left":parts-16,"margin-top":"5px","left":"0%","z-index":"4","visibility":"visible"}); jQuery("#info").css({"padding":"0px","position": "fixed","top": "0%","margin-left":split*2+parts-16,"margin-top":"5px","left":"0%","z-index":"4","visibility":"visible"}); jQuery("#search").css({"padding":"0px","position": "fixed","top": "0%","margin-left":split+parts-16,"margin-top":"5px","left":"0%","z-index":"4","visibility":"visible"}); /*$('.ui-icon-info').css("background-color","green");*/ var width=jQuery(window).width();var middle=width/2;var middleVertical=jQuery(window).height()/2;if(isIphone) jQuery("#closeButton").css({"left":middle,"margin-left":"140px"});else jQuery("#closeButton").css({"left":middle,"margin-left":"138px"}); jQuery("#previewScreen").css({"position": "fixed","background-color":"#fff","width":width,"height":"100%","display":"inline","margin":"0","padding":"0"}); jQuery("#imgpreview").css({"position": "fixed","top":middleVertical,"left":middle,"margin-top":"-33px","margin-left":"-33px"});}
The distance between Amarillo, TX and Dallas, TX is 361 mi. The travel time is 6 hours and 4 minutes.
Τhe cost of gas from Amarillo, TX to Dallas, TX is 43.89 $ (31.4 mpg, 3.82 $/gal).
From: Amarillo, County: State: TexasTo: Dallas, County: State: Texas
Distance: 361 miles
Travel time: 6 h 4 min
Passengers:
Altitude Amarillo, TXAltitude Dallas, TXFrom Amarillo, TX to other cities
How far is from Amarillo, TX to Dallas, TX?
How many miles is Amarillo, TX to Dallas, TX?
The distance between Amarillo, TX and Dallas, TX is 361 mi, with travel time of 6 hours and 4 minutes.
Driving directions from Amarillo, TX to Dallas, TX
361 mi 6 h 4 min
1.
Head west on Southwest 15th Avenue
0.2 mi
2.
Turn left onto South Washington Street
0.4 mi
3.
Turn left onto West Interstate Drive
0 ft
4.
Take the ramp on the left
0.2 mi
5.
Merge left onto I 40
8.2 mi
6.
Take exit 78 towards US 287 South: Fort Worth
212 mi
7.
Keep right towards I 44 West: Wichita Falls
0.6 mi
8.
Merge left onto Central Freeway (I 44)
2.5 mi
9.
Continue onto Lloyd Ruby Overpass (US 277)
0.9 mi
10.
Continue onto Central East Freeway (US 281)
0.9 mi
11.
Keep right onto Central East Freeway (US 82)
1.8 mi
12.
Keep right onto Central East Freeway (US 82)
86 mi
13.
Take the ramp towards TX 114 East: Dallas
14.8 mi
14.
Keep left onto TX 114
13.1 mi
16.
Merge left onto North Stemmons Freeway (I 35E)
3.9 mi
17.
Take exit 429B towards Continental Avenue
0.1 mi
18.
Go straight onto North Stemmons Freeway
0.1 mi
19.
Turn left onto Continental Avenue
0.3 mi
20.
Make a slight right onto North Lamar Street
0 ft
21.
Turn left onto McKinney Avenue
0.2 mi
22.
Continue onto Woodall Rodgers Freeway
0.1 mi
23.
Turn right onto North Akard Street
0.4 mi
24.
Turn left onto Federal Street
0 ft
25.
You have arrived at your destination, on the left
0 ft
How much does it cost to drive from Amarillo, TX to Dallas, TX?
The fuel cost with gas from Amarillo, TX to Dallas, TX is 43.89$ (3.82 $/gal, 31.4 mpg).
Fuel cost = (360.81 mi / 31.4 mpg) x 3.82$ per gallon = 43.89$
In more detail, the result is obtained:
Fuel needed = Distance / Car fuel consumption = miles / car Consumption = 360.81 mi / 31.4 mpg = 11.49 gallons
Fuel needed = 11.49 gallons
Fuel cost = Fuel needed x Price per gallon = 11.49 gallons x 3.82$ per gallon = 43.89 $
Fuel cost from Amarillo, TX to Dallas, TX = 43.89 $
How much will each passenger pay for carpooling from Amarillo, TX to Dallas, TX?
The more people travel by carpooling, the lower the cost is for each passenger. Each passenger carpooling from Amarillo, TX to Dallas, TX with gasoline as fuel will pay:
For 2 passengers: 21.95 $ (43.89/2) each.
For 3 passengers: 14.63 $ (43.89/3) each.
For 4 passengers: 10.97 $ (43.89/4) each.
How much do you pay to travel from Amarillo, TX to Dallas, TX by diesel car (diesel cost estimator)?
The trip with diesel fuel from Amarillo, TX to Dallas, TX costs 27.05 $(3.92$/gal, 52.3 mpg).
For the carpooling trip with diesel fuel, each member will pay:
For 2 passengers: 13.53 $ (27.05/2).
For 3 passengers: 9.02 $ (27.05/3).
For 4 passengers: 6.76 $ (27.05/4).
Where is Amarillo, TX located?
Amarillo, TX is located in the state of Texas. It is located at an altitude of 3605 feet (1099 m) above sea level. Amarillo, TX has coordinates 35.19917o,-101.84528o. How-far.net provides a map of Amarillo, TX from which you can plan your trips to other US states and cities.
What is the location of Dallas, TX?
Dallas, TX is located in the state of Texas. It is located at an altitude of 430 feet (131 m) above sea level. Dallas, TX has coordinates 32.783o,-96.800o. How-far.net provides a map of Dallas, TX from which you can plan your trips to other US states and cities.
" ).text( message ).prependTo( "#log" ); jQuery( "#log" ).scrollTop( 0 ); } jQuery( "#to2" ).autocomplete({delay: 200,//autoFocus: true, source: function( request, response ) { valueSelect2=''; idSelect2=''; $.ajax( { url: baseurl+"/ajax/createItems4.php", dataType: "json", data: { word: request.term,currentUrl:currentUrl }, success: function(data) { if(data!="" && !(typeof data[0] === 'undefined') && !(typeof data[0]['value'] === 'undefined') && !(typeof data[0]['id'] === 'undefined') ){valueFocus=data[0]['value'];idFocus=data[0]['id'];} // jQuery('.spinner').hide(); response(data); } } ); }, minLength: 1, search: function( event, ui ) { // jQuery('.spinner').show(); },focus: function (event, ui) { this.value = ui.item.label; //valueFocus=ui.item.value; // idFocus=ui.item.id; // or jQuery('#autocomplete-input').val(ui.item.label);//alert(ui.item.id); // Prevent the default focus behavior. event.preventDefault(); // or return false;},/*change:function(event){ jQuery("#from").val(""); return false; },*/ select: function( event, ui ) { //log( "Selected: " + ui.item.value + " aka " + ui.item.id ); var parts=ui.item.id.split("!");valueSelect2=ui.item.value;idSelect2=ui.item.id;autocompleteFun(2);//showPostcode(ui.item.value,parts[2],parts[1],parts[0],15);return false; } } ).autocomplete("instance")._renderItem = function(ul, item) { return jQuery("
" + item.label + "
") .appendTo(ul); }; } ); if(!isMobile) { jQuery( function() { function log( message ) { jQuery( "" ).text( message ).prependTo( "#log" ); jQuery( "#log" ).scrollTop( 0 ); } jQuery( "#topic_title" ).autocomplete({delay: 200,//autoFocus: true, source: function( request, response ) { valueSelect=''; idSelect=''; $.ajax( { url: baseurl+"/ajax/createItems4.php", dataType: "json", data: { word: request.term,currentUrl:currentUrl }, success: function(data) { if(data!="" && !(typeof data[0] === 'undefined') && !(typeof data[0]['value'] === 'undefined') && !(typeof data[0]['id'] === 'undefined') ){valueFocus=data[0]['value'];idFocus=data[0]['id'];} // jQuery('.spinner').hide(); response(data); } } ); }, minLength: 1, search: function( event, ui ) { // jQuery('.spinner').show(); },focus: function (event, ui) { this.value = ui.item.label; // valueFocus=ui.item.value; //idFocus=ui.item.id; // or jQuery('#autocomplete-input').val(ui.item.label);//alert(ui.item.id); // Prevent the default focus behavior. event.preventDefault(); // or return false;}, select: function( event, ui ) { //log( "Selected: " + ui.item.value + " aka " + ui.item.id ); var parts=ui.item.id.split("!");//showPostcode(ui.item.value,parts[2],parts[1],parts[0],15);valueSelect=ui.item.value;idSelect=ui.item.id;autocompleteFun(3);return false; } } ).autocomplete("instance")._renderItem = function(ul, item) { return jQuery("
" + item.label + "
") .appendTo(ul); }; } ); jQuery( function() { function log( message ) { jQuery( "" ).text( message ).prependTo( "#log" ); jQuery( "#log" ).scrollTop( 0 ); } jQuery( "#topic_title2" ).autocomplete({delay: 200,//autoFocus: true, source: function( request, response ) { valueSelect2=''; idSelect2=''; $.ajax( { url: baseurl+"/ajax/createItems4.php", dataType: "json", data: { word: request.term,currentUrl:currentUrl }, success: function(data) { if(data!="" && !(typeof data[0] === 'undefined') && !(typeof data[0]['value'] === 'undefined') && !(typeof data[0]['id'] === 'undefined') ){valueFocus=data[0]['value'];idFocus=data[0]['id'];} // jQuery('.spinner').hide(); response(data); } } ); }, minLength: 1, search: function( event, ui ) { // jQuery('.spinner').show(); },focus: function (event, ui) { this.value = ui.item.label; //valueFocus=ui.item.value; // idFocus=ui.item.id; // or jQuery('#autocomplete-input').val(ui.item.label);//alert(ui.item.id); // Prevent the default focus behavior. event.preventDefault(); // or return false;}, select: function( event, ui ) { //log( "Selected: " + ui.item.value + " aka " + ui.item.id ); var parts=ui.item.id.split("!");//showPostcode(ui.item.value,parts[2],parts[1],parts[0],15);valueSelect2=ui.item.value;idSelect2=ui.item.id;autocompleteFun(4);return false; } } ).autocomplete("instance")._renderItem = function(ul, item) { return jQuery("
" + item.label + "
") .appendTo(ul); }; } ); }jQuery("#routereverse").click(function(e){reverseOrAlternativeFired=2;e.stopImmediatePropagation(); //calcRoute2(markerTo.getPosition(),markerFrom.getPosition()); if(reverseRouteCount==1) reverseRouteCount=2; else reverseRouteCount=1; if(marker!=='undefined' && marker2!=='undefined' && defineRouteFromUrlNOsearch==2 && fromUrl!='' && toUrl!='') { if(reverseRouteCount==1) setRouteByNames(fromUrl,toUrl,marker2.getLatLng().lat+','+marker2.getLatLng().lng,marker.getLatLng().lat+','+marker.getLatLng().lng);elsesetRouteByNames(toUrl,fromUrl,marker2.getLatLng().lat+','+marker2.getLatLng().lng,marker.getLatLng().lat+','+marker.getLatLng().lng);return; } if(marker!=='undefined' && marker2!=='undefined')setRouteByNames('','',marker2.getLatLng().lat+','+marker2.getLatLng().lng,marker.getLatLng().lat+','+marker.getLatLng().lng);});var startIcon = L.icon({ iconUrl: baseurl+'/images/start.png', //shadowUrl: 'leaf-shadow.png', /* iconSize: [38, 95], // size of the icon /*shadowSize: [50, 64], // size of the shadow*/ iconAnchor: [11, 40], // point of the icon which will correspond to marker's location /*shadowAnchor: [4, 62], // the same for the shadow*/ popupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var endIcon = L.icon({ iconUrl: baseurl+'/images/end.png', iconAnchor: [11, 40], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor }); var dotIcon = L.icon({ iconUrl: baseurl+'/images/dot.png', iconAnchor: [3, 5], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor });var diodiaIcon = L.icon({ iconUrl: baseurl+'/images/blue.png', iconAnchor: [16, 32], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var diodia2Icon = L.icon({ iconUrl: baseurl+'/images/tollstation.png', iconAnchor: [16, 37], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var diodia3Icon = L.icon({ iconUrl: baseurl+'/images/tollstation2.png', iconAnchor: [16, 37], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var countryIcon = L.icon({ iconUrl: baseurl+'/images/country5.png', //iconAnchor: [75, 15], // point of the icon which will correspond to marker's location//popupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor iconAnchor: [50, 12], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var cyprusIcon = L.icon({ iconUrl: baseurl+'/images/cyprus4.png', //iconAnchor: [75, 15], // point of the icon which will correspond to marker's location//popupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor iconAnchor: [30, 10], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var famagustaIcon = L.icon({ iconUrl: baseurl+'/images/famagusta2.png', //iconAnchor: [75, 15], // point of the icon which will correspond to marker's location//popupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor iconAnchor: [45, 10], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor});var dotIcon = L.icon({ iconUrl: baseurl+'/images/dot.png', //iconAnchor: [75, 15], // point of the icon which will correspond to marker's location//popupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor /* iconAnchor: [45, 10], // point of the icon which will correspond to marker's locationpopupAnchor: [0, -37] // point from which the popup should open relative to the iconAnchor*/});function showExtraMarkers(){}function initialize() { //alert(carConsumtion);if(map==null){if(isMobile)//Punto finale //Cancella tutto [{text: 'Punto di partenza',callback: menu1},{text: 'Punto finale',callback: menu2},{text: 'Cancella tutto',callback: menu3}]map = L.map('map-canvas', {center: [39.0277188,-98.1298828],zoom:3, gestureHandling: true,contextmenu: true,contextmenuWidth: 140,contextmenuItems: [{text: 'Starting point',callback: menu1},{text: 'Ending point',callback: menu2},'-',{text: 'Clear points',callback: menu3}],fullscreenControl: true,fullscreenControlOptions: {position: 'topleft'}});//.setView([53.83,-2.087], 5);elsemap = L.map('map-canvas', {center: [39.0277188,-98.1298828],zoom:4,contextmenu: true,contextmenuWidth: 140,contextmenuItems: [{text: 'Starting point',callback: menu1},{text: 'Ending point',callback: menu2},'-',{text: 'Clear points',callback: menu3}],fullscreenControl: true,fullscreenControlOptions: {position: 'topleft'}});var shortLat=0,shortLng=0; simpleLat=shortLat; simpleLng=shortLng;L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors',minZoom: 2,maxZoom: 19}).addTo(map);map.doubleClickZoom.disable();map.on('dblclick', function(e) { var cmenu=map.contextmenu;cmenu.showAt(e.latlng); });showExtraMarkers();map.on('zoomstart', function() {showExtraMarkers();});map.on('zoomend', function() {showExtraMarkers();});/*;*/if(fromUrl!='' && toUrl!=''){var coordsApoints,coordsBpoints;$.ajax({ url: baseurl+"/ajax/createItems444.php", dataType: "json", data: { text: fromUrl,url:urlCityA }, success: function(data) { urlCityA=''; if(data!="" && !(typeof data[0] === 'undefined') && !(typeof data[0]['lat'] === 'undefined') && !(typeof data[0]['lon'] === 'undefined') ) { coordsApoints=data[0]['lat']+","+data[0]['lon']; $.ajax( { url: baseurl+"/ajax/createItems444.php", dataType: "json", data: { text: toUrl,url:urlCityB }, success: function(data) { urlCityB=''; if(data!="" && !(typeof data[0] === 'undefined') && !(typeof data[0]['lat'] === 'undefined') && !(typeof data[0]['lon'] === 'undefined') ) { coordsBpoints=data[0]['lat']+","+data[0]['lon']; setRouteByNames(fromUrl,toUrl,coordsApoints,coordsBpoints);//1 all roads }}}) }}});}else if(pointOne!='' && pointTwo!=''){if(nameOfPointA!='')partenzaStart=nameOfPointA;//else//partenzaStart=data['waypoints'][0]['name'];if(nameOfPointB!='')arrivoEnd=nameOfPointB;if(nameOfPointA!='' && nameOfPointB!='')citiesNamesExist=1;elsecitiesNamesExist=2; setRouteByNames('','',pointOne,pointTwo);} } } jQuery("#withoutHighways").change(function(e){//alert("aa:"+fromUrl+" "+toUrl);reverseOrAlternativeFired=2;e.stopImmediatePropagation();//alert(jQuery("#withoutHighways").find('option:selected').val());if(fromUrl!='' && toUrl!='' && defineRouteFromUrlNOsearch==2 && marker!=='undefined' && marker2!=='undefined'){if(reverseRouteCount==1)setRouteByNames(fromUrl,toUrl,marker.getLatLng().lat+","+marker.getLatLng().lng,marker2.getLatLng().lat+","+marker2.getLatLng().lng);elsesetRouteByNames(toUrl,fromUrl,marker.getLatLng().lat+","+marker.getLatLng().lng,marker2.getLatLng().lat+","+marker2.getLatLng().lng);return;}if(marker!=='undefined' && marker2!=='undefined')setRouteByNames('','',marker.getLatLng().lat+","+marker.getLatLng().lng,marker2.getLatLng().lat+","+marker2.getLatLng().lng);} ); jQuery("#withoutHighways").change(function() { /*alert("2"); if(markerFrom!=null && markerTo!=null)setRouteByNames(fromUrl,toUrl,'','');*///calcRoute(markerFrom.getPosition(),markerTo.getPosition()); });jQuery("#ltorgallon").change(function(){if(jQuery("#ltorgallon").find('option:selected').val()==1){jQuery("#plusConsum").html("+");jQuery("#minusConsum").html("-");printFuelConsumtpion(totalConsumption,fuelPrice); }else if(jQuery("#ltorgallon").find('option:selected').val()==2){jQuery("#plusConsum").html("-");jQuery("#minusConsum").html("+");printFuelConsumtpion(totalConsumption,fuelPrice);}});jQuery("#plus").click(function(){ var pricePerLiter=parseFloat(fuelPrice); if(pricePerLiter<=15.2) { pricePerLiter=Math.round((pricePerLiter+0.01)*100)/100; //jQuery("#fuelPrice").html(pricePerLiter+" €/lt"); fuelPrice=pricePerLiter; printFuelConsumtpion(totalConsumption,fuelPrice); createCookie("carConsumtion",carConsumtion,2); createCookie("fuelPrice",fuelPrice,2); createCookie("fuelType",jQuery("#fuelchoice").find('option:selected').val(),2); /*jQuery.post("ajax/cookie.php", { carConsumtion:carConsumtion+"", fuelPrice:fuelPrice+"", fuelType:jQuery("#fuelchoice").find('option:selected').val()+"" }, function(data,status){ });*/ }});jQuery("#minus").click(function(){ var pricePerLiter=parseFloat(fuelPrice); if(pricePerLiter>=0.4) { pricePerLiter=Math.round((pricePerLiter-0.01)*100)/100; //jQuery("#fuelPrice").html(pricePerLiter+" €/lt"); fuelPrice=pricePerLiter; printFuelConsumtpion(totalConsumption,fuelPrice); createCookie("carConsumtion",carConsumtion,2); createCookie("fuelPrice",fuelPrice,2); createCookie("fuelType",jQuery("#fuelchoice").find('option:selected').val(),2); /* jQuery.post("ajax/cookie.php", { carConsumtion:carConsumtion+"", fuelPrice:fuelPrice+"", fuelType:jQuery("#fuelchoice").find('option:selected').val()+"" }, function(data,status){ });*/ }});jQuery("#plusConsum").click(function(){ var carConsumTemp=parseFloat(carConsumtion); if(carConsumTemp<=150 /*&& jQuery("#ltorgallon").find('option:selected').val()==1*/) { if(carConsumTemp<10) carConsumTemp=Math.round((carConsumTemp+0.2)*10)/10; else carConsumTemp=Math.round((carConsumTemp+0.5)*10)/10; jQuery("#carConsumption").html(carConsumTemp); carConsumtion=carConsumTemp; totalConsumption=Math.round((totalKM/carConsumtion)*100)/100; printFuelConsumtpion(totalConsumption,fuelPrice); createCookie("carConsumtion",carConsumtion,2); createCookie("fuelPrice",fuelPrice,2); createCookie("fuelType",jQuery("#fuelchoice").find('option:selected').val(),2); /* jQuery.post("ajax/cookie.php", { carConsumtion:carConsumtion+"", fuelPrice:fuelPrice+"", fuelType:jQuery("#fuelchoice").find('option:selected').val()+"" }, function(data,status){ });*/ }});jQuery("#minusConsum").click(function(){ var carConsumTemp=parseFloat(carConsumtion); if(carConsumTemp>=2.1 /*&& jQuery("#ltorgallon").find('option:selected').val()==1*/) { if(carConsumTemp<10) carConsumTemp=Math.round((carConsumTemp-0.2)*10)/10; elsecarConsumTemp=Math.round((carConsumTemp-0.5)*10)/10; jQuery("#carConsumption").html(carConsumTemp); carConsumtion=carConsumTemp; totalConsumption=Math.round((totalKM/carConsumtion)*100)/100; printFuelConsumtpion(totalConsumption,fuelPrice); createCookie("carConsumtion",carConsumtion,2); createCookie("fuelPrice",fuelPrice,2); createCookie("fuelType",jQuery("#fuelchoice").find('option:selected').val(),2); /*jQuery.post("ajax/cookie.php", { carConsumtion:carConsumtion+"", fuelPrice:fuelPrice+"", fuelType:jQuery("#fuelchoice").find('option:selected').val()+"" }, function(data,status){ //alert("Data: " + data + "\nStatus: " + status); });*/ }});function clearMap() { for(i in map._layers) { if(map._layers[i]._path != undefined) { try { map.removeLayer(map._layers[i]); } catch(e) { console.log("problem with " + e + map._layers[i]); } } }for(i=markersArrayItaly.length-1;i>=0;i--){map.removeLayer(markersArrayItaly[i]);}if(firstTimeInRouteThereIsDistanceInDB!=1){jQuery("#timetravel").html("0 min ");jQuery("#distance").html("0 mi, ");}elsefirstTimeInRouteThereIsDistanceInDB=0;if(straightPath!=null)map.removeLayer(straightPath);if(markerRio!=null)map.removeLayer(markerRio);markersArrayItaly=[];markersCounter=0;markerRio=null;straightPath=null;if(popup3!=null)map.removeLayer(popup3);popup3=null;if(popup2!=null)map.removeLayer(popup2);popup2=null;if(popup1!=null)map.removeLayer(popup1);popup1=null;} //function showInfo(route2,routeIndex)jQuery('#isTollSelected').click(function () { if(jQuery('#isTollSelected').is(':checked')) showMarkersToll(); else hideMarkersToll(); });function hideMarkersToll(){for(i=markersArrayItaly.length-1;i>=0;i--){map.removeLayer(markersArrayItaly[i]);}if(markerRio!=null){map.removeLayer(markerRio);}if(straightPath!=null){map.removeLayer(straightPath);}}function showMarkersToll(){ for(i=0;i'+metersInMiles(result['routes'][routeB]['distance'])+'
'+secondsInTime(result['routes'][routeB]['duration'])+'') .openOn(map);}if(result['routes'][routeA]){point2=Math.round((result['routes'][routeA]['geometry'].length/5)*1);popup2 = L.popup({ autoClose: false, closeOnClick: false }) .setLatLng([result['routes'][routeA]['geometry'][point2*2]['latitude'],result['routes'][routeA]['geometry'][point2*2]['longitude']]) .setContent('Route '+(routeA+1)+'
'+metersInMiles(result['routes'][routeA]['distance'])+'
'+secondsInTime(result['routes'][routeA]['duration'])+'') .openOn(map);}if(result['routes'][routeIndex]){point2=Math.round((result['routes'][routeIndex]['geometry'].length/2)*1);popup1 = L.popup({ autoClose: false, closeOnClick: false }) .setLatLng([result['routes'][routeIndex]['geometry'][point2]['latitude'],result['routes'][routeIndex]['geometry'][point2]['longitude']]) .setContent('Route '+focusRoute+'
'+metersInMiles(result['routes'][routeIndex]['distance'])+'
'+secondsInTime(result['routes'][routeIndex]['duration'])+'
'+'') .openOn(map);}//alert(routeIndex); jQuery("#spanRoute3").css({"font-weight":"normal"}); jQuery("#spanRoute2").css({"font-weight":"normal"}); jQuery("#spanRoute1").css({"font-weight":"bold"}); if(totalKMferry!=0) routeOnlyWithVehicle=0; totalKM = totalKM / 1609.344; totalKMferry=totalKMferry/1609.344; if(statusFullScreen==0 ||isMobile) { if(totalTime==0) jQuery("#timetravel").html(""); else { if(totalKMferry==0)/*Tempo: */jQuery("#timetravel").html(''+ secondsInTime(totalTime) + ''); else /*Tempo di guida: */jQuery("#timetravel").html(''+ secondsInTime(totalTime) + '
![Route Amarillo, TX to Dallas, TX (10) Route Amarillo, TX to Dallas, TX (10)](https://i0.wp.com/how-far.net/'+urlBase2+'images/ui-anim_basic_16x16.gif)
";//alert(res.length);/*for(j=0;j
";}*/tempText2=tempText2+"
";tempText=tempText+""+metersInKm(res[routeIndex][0])+" "+secondsInTime(res[routeIndex][1])+""+showShipInfo2(res[routeIndex][2],res[routeIndex][3])+"";tempText=tempText+"
";latsDirections=[];lonsDirections=[];directionsPerStep=[];i=0;var counterSteps=0;while(results[routeIndex]['legs'][i]){j=0;while(results[routeIndex]['legs'][i]['steps'][j]){//console.log(compileTranslation('en',results[routeIndex]['legs'][i]['steps'][j]));latsDirections.push(results[routeIndex]['legs'][i]['steps'][j]['maneuver']['location'][1]);lonsDirections.push(results[routeIndex]['legs'][i]['steps'][j]['maneuver']['location'][0]); message=compileTranslation("en",results[routeIndex]['legs'][i]['steps'][j]);directionsPerStep.push(message);if(true){var row="row";//tempText=tempText+"
"+(i+1)+".
";tempText=tempText+"
"+(counterSteps+1)+".
";tempText=tempText+"
";km='';//if(results[routeIndex]['guidance']['instructions'][i+1])km=metersInKm(results[routeIndex]['legs'][i]['steps'][j]['distance']);tempText=tempText+message;tempText=tempText+"
";tempText=tempText+"
"+km+"
";}else{}j++;counterSteps++;}i++;}tempText=tempText+"
"; jQuery('#directions-panel').html(tempText2+""+tempText); i=0; counterSteps=0;while(results[routeIndex]['legs'][i]){j=0;while(results[routeIndex]['legs'][i]['steps'][j]){ //temp=eval('row+i'); temp='row'+counterSteps; lat=results[routeIndex]['legs'][i]['steps'][j]['maneuver']['location'][1]; lng=results[routeIndex]['legs'][i]['steps'][j]['maneuver']['location'][0]; //temp2=eval("i"); temp2=i; jQuery('#'+temp).click(function(){var temp2=$(this).attr("id").substring(3);if(popupMessage!=null){map.removeLayer(popupMessage);popupMessage=null;}if(popup1!=null){map.removeLayer(popup1);popup1=null;}if(popup2!=null){map.removeLayer(popup2);popup2=null;}if(popup3!=null){map.removeLayer(popup3);popup3=null;}popupMessage = L.popup() .setLatLng([latsDirections[temp2],lonsDirections[temp2]]) .setContent(directionsPerStep[temp2]) .openOn(map); }); counterSteps++; j++;} i++;}jQuery("#cellRoute0").click(function(){ jQuery("#selectRoute").find("option")[0].selected = true; jQuery("#selectRoute").trigger("change");});jQuery("#cellRoute1").click(function(){ jQuery("#selectRoute").find("option")[1].selected = true; jQuery("#selectRoute").trigger("change");});jQuery("#cellRoute2").click(function(){ jQuery("#selectRoute").find("option")[2].selected = true; jQuery("#selectRoute").trigger("change");});}function printFuelConsumtpion(totalConsumption,fuelPrice){ //alert(totalConsumption+" "+fuelPrice);if((statusFullScreen==0 || isMobile) && jQuery("#ltorgallon").find('option:selected').val()==1){//jQuery("#consumptionMessage").html("Κατανάλωση: "); jQuery("#liters").html("Fuel consumption: "+totalConsumption+" gal");jQuery("#fuelPrice").html("Fuel price: "+fuelPrice+" $/gal");jQuery("#carConsumtion").html("Vehicle consumption: "+carConsumtion+" mpg");jQuery("#fuelCost").html("Fuel cost: "+Math.round(totalConsumption*fuelPrice*100)/100+" $");jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$');}else if((statusFullScreen==0 || isMobile) && jQuery("#ltorgallon").find('option:selected').val()==2){jQuery("#liters").html("Fuel consumption: "+Math.round((totalConsumption*3.785411784)*100)/100+" lt");jQuery("#fuelPrice").html("Fuel price: "+Math.round((fuelPrice/3.785411784)*100)/100+" $/lt");jQuery("#carConsumtion").html("Vehicle consumption: "+Math.round((378.5411784/(carConsumtion*1.609344))*100)/100+" lt/100km");jQuery("#fuelCost").html("Fuel cost: "+Math.round(totalConsumption*fuelPrice*100)/100+" $");jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$');}else if(jQuery("#ltorgallon").find('option:selected').val()==1){//jQuery("#consumptionMessage").html(""); jQuery("#liters").html(""+totalConsumption+" gal");jQuery("#fuelPrice").html(""+fuelPrice+" $/gal");jQuery("#carConsumtion").html(""+carConsumtion+" mpg");jQuery("#fuelCost").html(""+Math.round(totalConsumption*fuelPrice*100)/100+" $");jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$');}else if(jQuery("#ltorgallon").find('option:selected').val()==2){jQuery("#liters").html(""+Math.round((totalConsumption*3.785411784)*100)/100+" lt");jQuery("#fuelPrice").html(""+Math.round((fuelPrice/3.785411784)*100)/100+" $/lt");jQuery("#carConsumtion").html(""+Math.round((378.5411784/(carConsumtion*1.609344))*100)/100+" lt/100km");jQuery("#fuelCost").html(""+Math.round(totalConsumption*fuelPrice*100)/100+" $");jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$');}} jQuery("#fuelchoice").change(function(){if(jQuery("#fuelchoice").find('option:selected').val()=="1"){ fuelPrice=initialPetrolPrice; carConsumtion=initialPetrolConsum; totalConsumption=Math.round((totalKM/carConsumtion)*100)/100; jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$'); }else if(jQuery("#fuelchoice").find('option:selected').val()=="2"){fuelPrice=initialGazPrice;carConsumtion=initialGazConsum; totalConsumption=Math.round((totalKM/carConsumtion)*100)/100; jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$');}else if(jQuery("#fuelchoice").find('option:selected').val()=="3"){ fuelPrice=initialOilPrice; carConsumtion=initialOilConsum; totalConsumption=Math.round((totalKM/carConsumtion)*100)/100; jQuery('#pricePerPerson').html(' '+Math.round((totalConsumption*fuelPrice*100)/numOfPassengers)/100+'$'); } createCookie("carConsumtion",carConsumtion,2); createCookie("fuelPrice",fuelPrice,2); createCookie("fuelType",jQuery("#fuelchoice").find('option:selected').val(),2); calculateConsumptionFast(); }); function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toGMTString(); document.cookie = cname + "=" + cvalue + "; " + expires;}function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/";}function searchByEnterOrButtonPressed(){ if(jQuery("#from").val().length>3 && valueFocus!="" && idFocus!=""){var parts=idFocus.split("!");showPostcode(valueFocus,parts[2],parts[1],parts[0],15);//alert(valueFocus+" "+idFocus);}} jQuery("#searchRoute").click(function(){setTimeout(function(){searchByEnterOrButtonPressed();},400); }); setTimeout(function(){initialize();},10);}}function decode(encoded){ // array that holds the points var points=[ ] var index = 0, len = encoded.length; var lat = 0, lng = 0; while (index