List<double> visineRuteSaGoogla = new List<double>();
int koliko = koordinateRuteLat.Count();
WebResponse response = null;
StreamReader reader = null;
string result = null;
for (int i = 0; i < koliko; i++)
{
string url = CreateRequest("" + koordinateRuteLat[i] + "," + koordinateRuteLng[i]);
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
response = request.GetResponse();
reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
result = reader.ReadToEnd();
dynamic m = JsonConvert.DeserializeObject<object>(result);
dynamic elev = m.results[0];
double visinaRutaTacke = elev.elevation;
visineRuteSaGoogla.Add(visinaRutaTacke);
}
catch (Exception ex)
{
// handle error
MessageBox.Show(ex.Message);
}
If the query is 50 elevation, no problem
how to make multiple queries of 50
I have no idea