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()); } }
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()); } }
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); }
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); }