VEMap.SetBirdseyeScene(id) Method

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Displays the bird's eye image specified by the VEBirdseyeScene Class ID.

VEMap.SetBirdseyeScene(id);

Parameters

Parameter Description

id

The ID of the VEBirdseyeScene Class object that you want to display

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"></script>

      <script type="text/javascript">
         var map = null;

         var defaultLatLong = new VELatLong(33.5074070839019, -111.94647789001467);
         var defaultZoom    = 17;

         function GetMap()
         {
            map = new VEMap('myMap');         
            map.LoadMap();

            map.SetCenterAndZoom(defaultLatLong, defaultZoom);
            map.SetMapStyle(VEMapStyle.Birdseye);

            map.SetBirdseyeScene(defaultLatLong, VEOrientation.North, defaultZoom, myCallback);
         }   
     
         function SetBirdseyeOrientation(orientation)
         {
            switch(orientation)
            {
               case 'north': map.SetBirdseyeOrientation(VEOrientation.North);
                             break;
               case 'south': map.SetBirdseyeOrientation(VEOrientation.South);
                             break;
               case 'east':  map.SetBirdseyeOrientation(VEOrientation.East);
                             break;
               default:      map.SetBirdseyeOrientation(VEOrientation.West);
                             break;
            }

            var be = map.GetBirdseyeScene();
            var id = be.GetID();                
            var link = "<a href='#' onclick='SetBirdseyeScene(" + id + ")'>" + id + "</a><br />";            
            idList.innerHTML += link;                
         }

         function SetBirdseyeScene(bsid)
         {
            map.SetBirdseyeScene(bsid);
         }

         function myCallback(be)
         {
            // Add this to the list of IDs
            var id = be.GetID();                
            var link = "<a href='#' onclick='SetBirdseyeScene(" + id + ")'>" + id + "</a> (default)<br />";            
            idList.innerHTML += link;
         }
      </script>
   </head>
   <body onload="GetMap();" style="font-family:Arial">
      <div id='myMap' style="position:relative; width:400px; height:400px;"></div>

      <p>
         Set Birdseye Orientation:
         <br/>
         <input id="btnNorth" type="button" value="N" onclick="SetBirdseyeOrientation('north')">
         <br/>
         <input id="btnWest"  type="button" value="W" onclick="SetBirdseyeOrientation('west')">
         <input id="btnEast"  type="button" value="E" onclick="SetBirdseyeOrientation('east')">
         <br/>
         <input id="btnSouth" type="button" value="S" onclick="SetBirdseyeOrientation('south')">
      </p>

      <h4>Bird's eye scene ID's:</h4>

      <div id="idList"></div>
   </body>
</html>

See Also

Reference

VEMap.SetBirdseyeScene(veLatLong, orientation, zoomLevel, callback) Method