public void GetUrl_one_location()
        {
            var req = new ElevationRequest();

            req.Locations.Add(new LatLng(40.714728, -73.998672));

            string expected = "json?locations=40.714728,-73.998672";
            string actual   = req.ToUri().OriginalString;

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        /// <summary>
        /// Sends the specified request to the Google Maps Elevation web
        /// service and parses the response as an ElevationResponse
        /// object.
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public ElevationResponse GetResponse(ElevationRequest request)
        {
            var url = new Uri(this.BaseUri, request.ToUri());

            return(Internal.Http.Get(url).As <ElevationResponse>());
        }
Esempio n. 3
0
        public async Task <ElevationResponse> GetResponseAsync(ElevationRequest request)
        {
            var url = new Uri(baseUri, request.ToUri());

            return(await http.GetAsync <ElevationResponse>(url));
        }
Esempio n. 4
0
        /// <summary>
        ///     Sends the specified request to the Google Maps Elevation web
        ///     service and parses the response as an ElevationResponse
        ///     object.
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public ElevationResponse GetResponse(ElevationRequest request)
        {
            var url = new Uri(baseUri, request.ToUri());

            return(http.Get <ElevationResponse>(url));
        }
		/// <summary>
		/// Sends the specified request to the Google Maps Elevation web
		/// service and parses the response as an ElevationResponse
		/// object.
		/// </summary>
		/// <param name="request"></param>
		/// <returns></returns>
		public ElevationResponse GetResponse(ElevationRequest request)
		{
			var url = new Uri(this.BaseUri, request.ToUri());
			return Internal.Http.Get(url).As<ElevationResponse>();
		}