Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

AltitudeReference Enumeration

Bing

Defines the reference point from which the altitude is measured.

Constants

Name Description

ground

The altitude is measured from the ground level.

ellipsoid

The altitude is measured from the WGS 84 ellipsoid of the Earth.

Methods

Name Definition Return Value Description

isValid

isValid(reference: AltitudeReference )

boolean

Determines if the specified reference is a supported AltitudeReference.

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>

      <script type="text/javascript">
      function GetMap()
      {  
         // Create two locations with different altitude references.
         var groundLoc = new Microsoft.Maps.Location(47, -122, 100, Microsoft.Maps.AltitudeReference.ground);
         var ellipsoidLoc = new Microsoft.Maps.Location(47, -122, 100, Microsoft.Maps.AltitudeReference.ellipsoid);

 
         // Set the map view
         var mapOptions = {credentials: "Bing Maps Key",
                           center: groundLoc, 
                           mapTypeId: Microsoft.Maps.MapTypeId.birdseye, 
                           zoom:16};

         var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), mapOptions);

         // Add two pushpins to demonstrate the difference when using different altitude references
         map.entities.push(new Microsoft.Maps.Pushpin(groundLoc, {text: "G"}));
         map.entities.push(new Microsoft.Maps.Pushpin(ellipsoidLoc, {text: "E"}));
      
      }
      </script>
   </head>
   <body onload="GetMap();">
      <div id='mapDiv' style="position:relative; width:600px; height:600px;"></div>       
   </body>
</html>
Show:
© 2015 Microsoft