1function initMap() { 2 var bounds = new google.maps.LatLngBounds({lat: 35.724829, lng: -120.395988}, {lat: 36.637624, lng: -119.381126}); 3 4 new google.maps.places.Autocomplete(document.getElementById('saddr'), {bounds: bounds, fields: ["name", "formatted_address"]}); 5 new google.maps.places.Autocomplete(document.getElementById('daddr'), {bounds: bounds, fields: ["name", "formatted_address"]}); 6} 7 8jQuery(function($) { 9 function dateToString(date, format) { 10 var day = date.getDate(); 11 if (day < 10) { 12 day = '0' + day; 13 } 14 var month = date.getMonth() + 1; 15 if (month < 10) { 16 month = '0' + month; 17 } 18 var year = date.getFullYear(); 19 return '' + month + '/' + day + '/' + year; 20 } 21 22 document.getElementById('fdate').value = dateToString(new Date()); 23 24 var picker = new Pikaday({ 25 field: document.getElementById('fdate'), 26 minDate: new Date(), 27 defaultDate: new Date(), 28 toString: dateToString, 29 parse: function(dateString, format) { 30 // dateString is the result of `toString` method 31 var parts = dateString.split('/'); 32 var month = parseInt(parts[0] - 1, 10); 33 var day = parseInt(parts[1], 10); 34 var year = parseInt(parts[2], 10); 35 return new Date(year, month, day); 36 } 37 }); 38 39 $('#ftime').timepicker({step: 15}); 40 $('#ftime').timepicker('setTime', new Date()); 41 42 $('#transitPlanner').submit(function(event) { 43 event.preventDefault(); 44 45 var zip = '93230'; 46 var loc = 'http://www.google.com/maps?ie=UTF8&f=d'; 47 48 loc += '&saddr=' + $('#saddr').val(); 49 loc += '&daddr=' + $('#daddr').val(); 50 loc += '&ttype=' + $('input[name="ttype"]:checked').val(); 51 loc += '&date=' + $('#fdate').val(); 52 loc += '&time=' + $('#ftime').val(); 53 loc += '&dirflg=r'; 54 55 location.href = loc; 56 }); 57});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.