Welcome to MSDN Blogs Sign in | Join | Help

Virtual Earth API: Setting Altitude of Shapes

The Virtual Earth v6 map control API added support for setting altitude of VEShapes in Virtual Earth 3D.  There is a new SetAltitude method on VEShape which takes in 2 parameters:

VEShape.SetAltitude(altitude, altitudeMode);

The altitude parameter is the altitude specified in meters.  The altitudeMode parameter is an optional VEAltitudeMode enumeration specifying the mode of the altitude.  If not specified, by default it is VEAltitudeMode.RelativeToGround which is meters above ground level.  You can also specify VEAltitudeMode.Absolute which is meters above the WGS84 ellipsoid.  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. 

There is also a new SetLineToGround 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.

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:

Virtual Earth API Shape Altitude Sample

 

Published Wednesday, November 14, 2007 8:01 PM by keithkin

Comments

# MSDN Blog Postings » Virtual Earth API: Setting Altitude of Shapes

Wednesday, November 21, 2007 8:11 AM by Walter Stiers - Academic Relations Team (BeLux)

# Virtual Earth API: Series of information

A set of blog entries has been published recently. The details are on Keith Kinnan's Weblog . They also

Wednesday, November 21, 2007 9:04 AM by Noticias externas

# Virtual Earth API: Series of information

A set of blog entries has been published recently. The details are on Keith Kinnan's Weblog . They

Anonymous comments are disabled
 
Page view tracker