VEMap.SetBirdseyeScene(veLatLong, orientation, zoomLevel, callback) 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 specified bird's eye image.
VEMap.SetBirdseyeScene(veLatLong, orientation, zoomLevel, callback);
Parameters
Parameter | Description |
---|---|
veLatLong |
A VELatLong Class object specifying the center of the image. Optional. If this parameter is not supplied the center of the map is used. |
orientation |
A VEOrientation Enumeration value specifying the direction to which which the image is viewed. Optional. If this value is not supplied, the default value VEOrientation.North is used. |
zoomLevel |
The level of zoom. Optional. If this parameter is not supplied, the value 1 is used. |
callback |
The name of the function called when the SetBirdseyeScene method completes. |
Return Value
The callback function receives a VEBirdseyeScene Class object.
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>