VELatLong.SetAltitude メソッド

地球上の単一ポイントの高度を指定します。

構文

VELatLong.SetAltitude(altitude, mode)

パラメータ

パラメータ 説明

altitude

メートル単位の高度です。

mode

高度が地表面を基準とする相対高度であるか、または絶対高度であるかを示す、VEAltitudeMode 列挙体の値です。

<!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 SpaceNeedle = new VELatLong(47.6218, -122.3492);
var pinLocation = new VELatLong(47.6222, -122.34865);

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

map.LoadMap(SpaceNeedle, 17);

// 概観シーンを利用できる場合にそのことを検出します。
map.AttachEvent("onobliqueenter", OnObliqueEnterHandler);
         }

function OnObliqueEnterHandler()
         {
if(map.IsBirdseyeAvailable())
            {
var TopOfNeedle = new VELatLong(47.622, -122.3491); 
map.SetBirdseyeScene(TopOfNeedle);
            }
         }

function AddPin()
         {
if(map.IsBirdseyeAvailable())
            {
pinLocation.SetAltitude(604, VEAltitudeMode.RelativeToGround);
var pushpin = new VEShape(VEShapeType.Pushpin, pinLocation);
map.AddShape(pushpin);
            }
         }
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
<input id="addpin" type="button" value="ピンの場所を確認" name="addpin" 
onclick="AddPin();">
</body>
</html>

関連項目

参照

VELatLong.Altitude プロパティ
VELatLong.AltitudeMode プロパティ