Share via


VEMap.GetMapView メソッド

現在のマップ ビュー オブジェクトを VELatLongRectangle クラス オブジェクトとして返します。

構文

VEMap.GetMapView();

戻り値

現在のマップ ビューを表す VELatLongRectangle クラス オブジェクトです。

<!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 clickEvent = null;
         
function GetMap()
         {
map = new VEMap('myMap');
map.LoadMap();

GetMapView();
map.AttachEvent("onclick", GetMapView);
map.AttachEvent("onendpan", GetMapView);
map.AttachEvent("onendzoom", GetMapView);
map.AttachEvent("oninitmode", GetMapView);
         } 
         
function GetMapView()
         {
view = map.GetMapView();
topleft = view.TopLeftLatLong;
bottomright = view.BottomRightLatLong;
topright = view.TopRightLatLong;
bottomleft = view.BottomLeftLatLong;
info = "TopLeftLatLong:" + topleft + "<br/>";
info += "BottomRightLatLong:" + bottomright + "<br/>";
info += "TopRightLatLong:" + topright + " (3D モードのみ)<br/>";
info += "BottomLeftLatLong:" + bottomleft + " (3D モードのみ)";
infoDiv.innerHTML = info;
         }  
</script>
</head>
<body onload="GetMap();" style="font-family:MS PGothic">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
<div id="infoDiv"></div>
</body>
</html>