Esempio n. 1
0
		public IEnumerable<Address> Geocode(string address)
		{
			if (string.IsNullOrWhiteSpace(address))
				throw new ArgumentException("address can not be null or empty!");

			var f = new GeocodeRequest(key, address) { UseOSM = this.UseOSM };
			MapQuestResponse res = Execute(f);
			return HandleSingleResponse(res);
		}
Esempio n. 2
0
        public IEnumerable <Address> Geocode(string address)
        {
            if (string.IsNullOrWhiteSpace(address))
            {
                throw new ArgumentException("address can not be null or empty!");
            }

            var f = new GeocodeRequest(key, address)
            {
                UseOSM = this.UseOSM
            };
            MapQuestResponse res = Execute(f);

            return(HandleSingleResponse(res));
        }
Esempio n. 3
0
        public async Task <IEnumerable <Address> > GeocodeAsync(string address)
        {
            if (string.IsNullOrWhiteSpace(address))
            {
                throw new ArgumentException("address can not be null or empty!");
            }

            var f = new GeocodeRequest(key, address)
            {
                UseOSM = this.UseOSM
            };
            MapQuestResponse res = await Execute(f).ConfigureAwait(false);

            return(HandleSingleResponse(res));
        }