TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sasa lazic
NA
104
49.9k
get altitude(elevation) from map provider
Dec 14 2013 2:25 AM
Ok whats the problem ?
I want to get elevation with Google maps.
I made code
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);
}
What is the problem
I keep getting a result out of range
If the query is 50 elevation, no problem
how to make multiple queries of 50
I have no idea
Reply
Answers (
0
)
C# Object Casting
recognition of geometric shapes in the image.