/// <summary>
        /// Returns the distance between 2 points using the specified transport mode.
        /// </summary>
        /// <param name="pointA">
        /// The first point 
        /// </param>
        /// <param name="pointB">
        /// The second point 
        /// </param>
        /// <param name="transportMode">
        /// Specified the mode of transport used between points. 
        /// </param>
        /// <returns>
        /// The distance between pointA and pointB 
        /// </returns>
        public Arc GetDistance(Location pointA, Location pointB, TransportMode transportMode)
        {
            // Set parameters
            this.Parameters["mode"] = transportMode.ToString().ToLower();
            this.Parameters["origins"] = pointA.ToString();
            this.Parameters["destinations"] = pointB.ToString();

            // Make XML request
            XmlDocument doc = this.Request();

            if (doc["DistanceMatrixResponse"] == null)
            {
                throw new Exception("XML response is invalid.");
            }

            XmlNode response = doc["DistanceMatrixResponse"];

            // Check for null references
            if (response == null || response["status"] == null)
            {
                throw new Exception("XML response is invalid.");
            }

            // Check request status
            if (response["status"].InnerText != "OK")
            {
                throw new GoogleApiException(response["status"].InnerText);
            }

            // Check for null references
            if (response["row"] == null || response["row"]["element"] == null)
            {
                throw new Exception("XML response is invalid.");
            }

            // Extract element
            XmlNode element = response["row"]["element"];

            // Check for null references
            if (element["duration"]["value"] == null || element["distance"]["value"] == null)
            {
                throw new Exception("XML response is invalid.");
            }

            // Get results
            var duration = new TimeSpan(0, 0, Convert.ToInt32(element["duration"]["value"].InnerText));
            double distance = Convert.ToDouble(element["distance"]["value"].InnerText);

            // Return new object
            return new Arc(
                pointA,
                pointB,
                new TransportTimeSpan { TravelTime = duration, WaitingTime = default(TimeSpan) },
                distance,
                default(DateTime),
                transportMode.ToString());
        }
        /// <summary>
        /// Gets a human readable address that is closest to the provided location.
        /// </summary>
        /// <param name="location">
        /// A location for which you want to find the nearest address 
        /// </param>
        /// <returns>
        /// A string representing a human readable address corresponding to that location. 
        /// </returns>
        public string GetLocationString(Location location)
        {
            this.Parameters.Remove("address");

            // Set new request data
            this.Parameters["latlng"] = location.ToString();

            // Perform XML request
            XmlDocument doc = this.Request();

            if (doc["GeocodeResponse"] == null || doc["GeocodeResponse"]["status"] == null)
            {
                throw new Exception("XML response is invalid.");
            }

            // Check request status
            if (doc["GeocodeResponse"]["status"].InnerText != "OK")
            {
                throw new Exception("Error processing XML request");
            }

            // Get the useful node
            XmlNode locationNode = doc["GeocodeResponse"]["result"]["formatted_address"];

            // Return the new location string
            return locationNode.InnerText;
        }