예제 #1
0
        public static IEnumerable <GeocodingResponse> GeocodeAsync(MapsApiContext context, IEnumerable <LatLng> locations)
        {
            var request = new GeocodingRequest(context);

            foreach (var location in locations)
            {
                request.Location = location;
                yield return(request.GetResponseAsync());
            }
        }
예제 #2
0
        public static IEnumerable <GeocodingResponse> GeocodeAsync(MapsApiContext context, IEnumerable <string> addresses)
        {
            var request = new GeocodingRequest(context);

            foreach (var address in addresses)
            {
                request.Address = address;
                yield return(request.GetResponseAsync());
            }
        }
예제 #3
0
        public static async Task <IEnumerable <GeocodingResponse> > GeocodeAsync(MapsApiContext context, IEnumerable <LatLng> locations)
        {
            var result  = new List <GeocodingResponse>();
            var request = new GeocodingRequest(context);

            foreach (var location in locations)
            {
                request.Location = location;
                result.Add(await request.GetResponseAsync());
            }

            return(result);
        }
예제 #4
0
        public static async Task <IEnumerable <GeocodingResponse> > GeocodeAsync(MapsApiContext context, IEnumerable <string> addresses)
        {
            var result = new List <GeocodingResponse>();

            foreach (var address in addresses)
            {
                var request = new GeocodingRequest(address, context);
                //request.Address = address;
                result.Add(await request.GetResponseAsync());
            }

            return(result);
        }