scripts/routeCreation.js
/**
 * Calculate the time duration that would be taken to travel from the current coordinate to the next
 * @param {DirectionsStep} currentStep The current step of a DirectionsLeg
 * @param {number} nextCoordDistance The distance (in meters) from the current coordinate in
 *				   currentStep to the next
 * @param {number} stepDistance The distance (in meters) of currentStep
 * @return {number} The time taken (in seconds) to travel from the current coordinate in currentStep
 *					to the next
 */
Calculate the time duration that would be taken to travel from the current coordinate to the next
@param {DirectionsStep} currentStep The current step of a DirectionsLeg
@param {number} nextCoordDistance The distance (in meters) from the current coordinate in
currentStep to the next
@param {number} stepDistance The distance (in meters) of currentStep
@return {number} The time taken (in seconds) to travel from the current coordinate in currentStep
to the next
Calculate the time duration that would be taken to travel from the current coordinate to the next @param { DirectionsStep } currentStep The current step of a DirectionsLeg @param { number } nextCoordDistance The distance ( in meters ) from the current coordinate in currentStep to the next @param { number } stepDistance The distance ( in meters ) of currentStep @return { number } The time taken ( in seconds ) to travel from the current coordinate in currentStep to the next
function calculatePathDetailsDuration(currentStep, nextCoordDistance, stepDistance) {
	var duration = currentStep.duration.value * nextCoordDistance / stepDistance;
	return duration;
}
function calculatePathDetailsDuration ( currentStep , nextCoordDistance , stepDistance ) { var duration = currentStep . duration . value * nextCoordDistance / stepDistance ; return duration ; }
Calculate the time duration that would be taken to travel from the current coordinate to the next
 @param {DirectionsStep} currentStep The current step of a DirectionsLeg
 @param {number} nextCoordDistance The distance (in meters) from the current coordinate in
                                 currentStep to the next
 @param {number} stepDistance The distance (in meters) of currentStep
 @return {number} The time taken (in seconds) to travel from the current coordinate in currentStep
                                      to the next
Calculate the time duration that would be taken to travel from the current coordinate to the next @param { DirectionsStep } currentStep The current step of a DirectionsLeg @param { number } nextCoordDistance The distance ( in meters ) from the current coordinate in currentStep to the next @param { number } stepDistance The distance ( in meters ) of currentStep @return { number } The time taken ( in seconds ) to travel from the current coordinate in currentStep to the next