VEMap.SetBirdseyeOrientation メソッド

既存の概観図 (VEBirdseyeScene クラス オブジェクト) の方向を、指定された方向に変更します。

構文

VEMap.SetBirdseyeOrientation(orientation);

パラメータ

パラメータ 説明

orientation

この値は、VEOrientation 列挙体または文字列値を使用して設定できます。有効な文字列値は、North、South、East、および West です。

戻り値

マップ モードが 3D に設定されている場合は false を返します (VEMap.GetMapMode メソッド2 を返します)。

<!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://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></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)
         {
// ID 一覧に項目を追加します。
var id = be.GetID();                
var link = "<a href='#' onclick='SetBirdseyeScene(" + id + ")'>" + id + "</a> (既定)<br />";            
idList.innerHTML += link;
         }
</script>
</head>
<body onload="GetMap();" style="font-family:MS PGothic">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>

<p>
概観図の方向を設定:
<br />
<input id="btnNorth" type="button" value="北" onclick="SetBirdseyeOrientation('north')">
<br />
<input id="btnWest"  type="button" value="西" onclick="SetBirdseyeOrientation('west')">
<input id="btnEast"  type="button" value="東" onclick="SetBirdseyeOrientation('east')">
<br />
<input id="btnSouth" type="button" value="南" onclick="SetBirdseyeOrientation('south')">
</p>

<h4>概観シーン ID:</h4>

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