scripts/routeCreation.js
/**
 * Translate the Travel Method specified in the Menu form into its corresponding
 * entry in the google.maps.TravelMode object
 * @return {String} The Transit Type value retrieved from google.maps.TravelMode
 */
Translate the Travel Method specified in the Menu form into its corresponding
entry in the google.maps.TravelMode object
@return {String} The Transit Type value retrieved from google.maps.TravelMode
Translate the Travel Method specified in the Menu form into its corresponding entry in the google . maps . TravelMode object @return { String } The Transit Type value retrieved from google . maps . TravelMode
function determineTransitType() {
	var transitType;
	if($("#method").val() == "driving")
		transitType = google.maps.TravelMode.DRIVING;
	else if($("#method").val() == "transit")
		transitType = google.maps.TravelMode.TRANSIT;
	return transitType;
}
function determineTransitType ( ) { var transitType ; if ( $ ( "#method" ) . val ( ) == "driving" ) transitType = google . maps . TravelMode . DRIVING ; else if ( $ ( "#method" ) . val ( ) == "transit" ) transitType = google . maps . TravelMode . TRANSIT ; return transitType ; }
Translate the Travel Method specified in the Menu form into its corresponding
 entry in the google.maps.TravelMode object
 @return {String} The Transit Type value retrieved from google.maps.TravelMode
Translate the Travel Method specified in the Menu form into its corresponding entry in the google . maps . TravelMode object @return { String } The Transit Type value retrieved from google . maps . TravelMode
/* While we could simply specify the transit type string without having to access
	 * google.maps.TravelMode, in theory it is safer to let Google Maps define the transit type
	 * to prevent any theoretical anomalies that may arise now or in the future from hard coding the
	 * transit type ourselves. Such anomalies are however, as stated, purely theoretical. */