Altitude?

Hi, I've noticed in 3D view that the browser status bar displays the current Altitude at the cursor/map position. How can I retrieve this value programmatically? Say...when the user clicks on the map. Can't seem to find anything in the docs or in forums...

thanks for any help

alan

[291 byte] By [Generic123] at [2008-1-9]
# 1

Map.GetAltitude() would probably work. The docs say the view has to be fully downloaded first

cheers

brian

Brian_Flood at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 2
Generic123 wrote:
Hi, I've noticed in 3D view that the browser status bar displays the current Altitude at the cursor/map position. How can I retrieve this value programmatically? Say...when the user clicks on the map. Can't seem to find anything in the docs or in forums...

thanks for any help

alan

In addition to using the map.GetAltitude() method, you want the user to click on map and get the altitude.

Now what exactly will this altitude value represent? Normally clicking on the map is for grabbing lat/longs, which is a normal 2 dimensional attribute, but altitude is a 3d attribute, so you'll need to be more specific here: Do you want the user to click, zoom into a "best fit" location, and then grab the altitude?

DerekChan at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 3

Hi, thanks for your replies

The GetAltitude() method isn't the same thing. From what I can tell, it returns the altitude of the camera (the current height of the view position). I'm talking about the altitude of land above sea level.

For example, if you go into 3D mode and run the cursor over sea, the altitude will be "0 feet". Run it towards a shore and it will increase. I need to retrieve that value.

There isn't a problem with it being a "3d attribute" as it's represented by a 2D plane so any given vector will ultimately intersect with land (or sea!).

Basically, all I want is a method to get the altitude value written in the statusbar!

For now, I have written a fudge to just extract it directly from "window.status", not very professional eh? :). Can't believe there isn't a way to get it ...

cheers

Alan

Generic123 at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 4
Yes, windows.status seems to be the only way to extract it. Likely its not available to be used yet because 3D mode was released recently (2 months ago) and MS hasn't gotten around to implementing it
DerekChan at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 5

I dont know if you're still looking but there are a few simple webservices which will give elevation, e.g.

http://www.earthtools.org/webservices.htm

Example URL http://www.earthtools.org/height/52.4822/-1.8946 returns:

<?xml version="1.0" encoding="ISO-8859-1" ?>

- <height xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.earthtools.org/height.xsd">
<version>1.0</version>
- <location>
<latitude>52.4822</latitude>
<longitude>-1.8946</longitude>
</location>
<meters>141</meters>
<feet>462.6</feet>
</height>

You could call that when the user clicks the map.

I think you can also download the database and create your own ws.

Chris

Tuney at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 6

I guess the benifit of that is you could make it work in 2D mode as well.

There is a fair bit of overhead though as compared to getting it from the 3D app that has the data already.

John.

SoulSolutions at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 7

I realize that this thread is pretty old but I REALLY need to be able to get the elevation for a given lat/lon.

Has anyone figured this out yet?

I finally figured out how to place a custom pushpin at a given altitude/elevation but that leaves me with another problem.

I am writing an application where I am plotting aircraft in 3D. My aircraft altitudes are in MSL, it appears that when setting a VE pushpin that the only option is to set the altitude (in meters) above the geoid in the map view. I think I can work with that but I need a method to retrieve the elevation at a given Lat/Lon so I can convert the MSL altitude of each aircraft to meters above the geoid.

A web service (as suggested above) will not work for me. I am placing up to 300 aircraft on the map at a time and the overhead would be too much.

I really like VE and I want to make this work. I have created this same application using Google Earth and I can't believe how easy Google makes it. In Google Earth I can set aircraft icons in MSL.

I'm a Microsoft fanboy so I want this to work!

Please, Please, Please Microsoft, let us set pushpins at MSL or at least give us a way to retrieve the elevation at a lat/lon.

Dugrhill at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 8

If you can hang in there a bit longer, V6 has altitude built into the VELatLong object.

doug

SnoopDoug_98205 at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 9

Doug,

Great news! Yes, I CAN hang in there. I'll be here. Any general time frame we can expect v6?

Any chance you need an Alpha or Beta tester?

Would love to help!

Doug

Dugrhill at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 10

I have to be careful as I am just a contract writer and am not involved in the release decision. I would expect to see some sort of announcement in this forum when various release points are reached. If I find out they are looking for additional external testers, I will encourage them to post the request in this forum.

doug

SnoopDoug_98205 at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 11

Good enough Doug, I understand.

Thanks a bunch for the heads up!

Looking forward to v6.

Dugrhill at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...

Windows Live Developer Forums

Site Classified