Hi all,
I'm developing a software using Google Earth API COM (EARTHLib).
I need to get the altitude for user specified points so I used this code:
private void button7_Click(object sender, EventArgs e)
{
ge = new ApplicationGEClass();
PointOnTerrainGE pot = ge.GetPointOnTerrainFromScreenCoords(0, 0);
lblAlt.Text = pot.Altitude.ToString();
}
The problem is that
this code gives the altitude just for the center of the viewer screen.
I tried this to make a second point and replace (0,0) with a lat and long for the first point as arguments
private void button7_Click(object sender, EventArgs e)
{
ge = new ApplicationGEClass();
PointOnTerrainGE pot = ge.GetPointOnTerrainFromScreenCoords(0, 0);
PointOnTerrainGE pot2 = ge.GetPointOnTerrainFromScreenCoords(pot.Latitude, pot.Longitude);
lblAlt.Text = pot2.Altitude.ToString();
}
and since (0,0) represent just the viewer coordinates (not real coordinates) that doesn't solve the problem.
so there are two way to do it and here I need your help, the first solution is to place like a plus mark (+) in the center of the viewer to let the user know what point the altitude is given for, and the next solution is to replace (0,0) with real coordinates...
any one could help me with this please?