Keith Kinnan's Weblog
01-04-2008, 09:27 AM
<P>The Virtual Earth v6 map control API added support for setting altitude of VEShapes in Virtual Earth 3D. There is a new <STRONG>SetAltitude</STRONG> method on VEShape which takes in 2 parameters:</P>
<BLOCKQUOTE>
<P><STRONG>VEShape.SetAltitude(altitude, altitudeMode);</STRONG></P></BLOCKQUOTE>
<P>The <EM>altitude</EM> parameter is the altitude specified in meters. The <EM>altitudeMode parameter </EM>is an optional VEAltitudeMode enumeration specifying the mode of the altitude. If not specified, by default it is <STRONG>VEAltitudeMode.RelativeToGround</STRONG> which is meters above ground level. You can also specify <STRONG>VEAltitudeMode.Absolute </STRONG>which is meters above the <A href="http://en.wikipedia.org/wiki/WGS84" mce_href="http://en.wikipedia.org/wiki/WGS84">WGS84 ellipsoid</A>. When the VEShape is a pushpin, the altitude is a single floating point value. When the VEShape is a polyline or polygon, it is an array of floating point values specifying the altitude for each point in the shape. </P>
<P>There is also a new <STRONG>SetLineToGround </STRONG>method on the VEShape for polylines and polygon shapes which takes in a boolean to specify whether or not connect the points in the shape to the ground. By default it is false.</P>
<P>The following sample shows some custom VEShapes at different altitudes. It also demonstrates a polygon with points at different altitudes and the line to ground functionality:</P>
<BLOCKQUOTE>
<P><A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html" mce_href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html">Virtual Earth API Shape Altitude Sample</A></P>
<P><A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"><IMG height=339 src="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude02.jpg" width=394 border=0></A> <A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"><IMG height=300 src="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.jpg" width=400 border=0></A></P></BLOCKQUOTE><img src="http://blogs.msdn.com/aggbug.aspx?PostID=6223560" width="1" height="1">
More... (http://blogs.msdn.com/keithkin/archive/2007/11/14/virtual-earth-api-setting-altitude-of-shapes.aspx)
<BLOCKQUOTE>
<P><STRONG>VEShape.SetAltitude(altitude, altitudeMode);</STRONG></P></BLOCKQUOTE>
<P>The <EM>altitude</EM> parameter is the altitude specified in meters. The <EM>altitudeMode parameter </EM>is an optional VEAltitudeMode enumeration specifying the mode of the altitude. If not specified, by default it is <STRONG>VEAltitudeMode.RelativeToGround</STRONG> which is meters above ground level. You can also specify <STRONG>VEAltitudeMode.Absolute </STRONG>which is meters above the <A href="http://en.wikipedia.org/wiki/WGS84" mce_href="http://en.wikipedia.org/wiki/WGS84">WGS84 ellipsoid</A>. When the VEShape is a pushpin, the altitude is a single floating point value. When the VEShape is a polyline or polygon, it is an array of floating point values specifying the altitude for each point in the shape. </P>
<P>There is also a new <STRONG>SetLineToGround </STRONG>method on the VEShape for polylines and polygon shapes which takes in a boolean to specify whether or not connect the points in the shape to the ground. By default it is false.</P>
<P>The following sample shows some custom VEShapes at different altitudes. It also demonstrates a polygon with points at different altitudes and the line to ground functionality:</P>
<BLOCKQUOTE>
<P><A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html" mce_href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html">Virtual Earth API Shape Altitude Sample</A></P>
<P><A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"><IMG height=339 src="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude02.jpg" width=394 border=0></A> <A href="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.html"><IMG height=300 src="http://krkinnan.members.winisp.net/samples/v6/altitude/ve6altitude01.jpg" width=400 border=0></A></P></BLOCKQUOTE><img src="http://blogs.msdn.com/aggbug.aspx?PostID=6223560" width="1" height="1">
More... (http://blogs.msdn.com/keithkin/archive/2007/11/14/virtual-earth-api-setting-altitude-of-shapes.aspx)