scripts/database.js
/**
 * Determine whether or not to use a JSON object's "Name" attribute or "Coordinates" attribute.
 * @param {Object} journey A JSON Object containing at a minimum a "Name" attribute and a "Coordinates" attribute
 * @return {String} The value of the "Name" or "Coordinates" attribute that will be used to represent a
 *					location
 */
Determine whether or not to use a JSON object's "Name" attribute or "Coordinates" attribute.
Determine whether or not to use a JSON object ' s " Name " attribute or " Coordinates " attribute .
function useNameOrCoordinates(journey) {
	var location;
	if(journey["Name"] == null)
		location = journey["Coordinates"];
	else
		location = journey["Name"];
	return location;
}
function useNameOrCoordinates ( journey ) { var location ; if ( journey [ "Name" ] == null ) location = journey [ "Coordinates" ] ; else location = journey [ "Name" ] ; return location ; }
Determine whether or not to use a JSON object's "Name" attribute or "Coordinates" attribute.
Determine whether or not to use a JSON object ' s " Name " attribute or " Coordinates " attribute .
//Always use the "Name" attribute if it is defined; otherwise use the "Coordinates" attribute