scripts/routeCreation.js
/**
 * Create a Google Maps DirectionsRequest Object
 * @param {Object} routePoints An object containing at a minimum two attributes:
 * 	  {String} from The Destination a route will be calculated from
 *	  {String} to The Destination a route will be calculated to
 * @param {String} transitType The travel mode that will be used in calculation directions
 *				   between the origin and destination points
 * @return {DirectionsRequest} A Google Maps DirectionsRequest object containing the necessary
 *							   information needed to request directions for a route
 */
Create a Google Maps DirectionsRequest Object
@param {Object} routePoints An object containing at a minimum two attributes:
{String} from The Destination a route will be calculated from
{String} to The Destination a route will be calculated to
@param {String} transitType The travel mode that will be used in calculation directions
between the origin and destination points
@return {DirectionsRequest} A Google Maps DirectionsRequest object containing the necessary
information needed to request directions for a route
Create a Google Maps DirectionsRequest Object @param { Object } routePoints An object containing at a minimum two attributes : { String } from The Destination a route will be calculated from { String } to The Destination a route will be calculated to @param { String } transitType The travel mode that will be used in calculation directions between the origin and destination points @return { DirectionsRequest } A Google Maps DirectionsRequest object containing the necessary information needed to request directions for a route
function createDirectionsRequest(routePoints, transitType) {
	var request = {
		origin: routePoints.from,
		destination: routePoints.to,
		travelMode: transitType
	}
	return request;
}
function createDirectionsRequest ( routePoints , transitType ) { var request = { origin : routePoints . from , destination : routePoints . to , travelMode : transitType } return request ; }
Create a Google Maps DirectionsRequest Object
 @param {Object} routePoints An object containing at a minimum two attributes:
        {String} from The Destination a route will be calculated from
        {String} to The Destination a route will be calculated to
 @param {String} transitType The travel mode that will be used in calculation directions
                                 between the origin and destination points
 @return {DirectionsRequest} A Google Maps DirectionsRequest object containing the necessary
                                                         information needed to request directions for a route
Create a Google Maps DirectionsRequest Object @param { Object } routePoints An object containing at a minimum two attributes : { String } from The Destination a route will be calculated from { String } to The Destination a route will be calculated to @param { String } transitType The travel mode that will be used in calculation directions between the origin and destination points @return { DirectionsRequest } A Google Maps DirectionsRequest object containing the necessary information needed to request directions for a route